How can i create a simple data base of images in matlab.
6 views (last 30 days)
Show older comments
i m working on face recognition and want to make a data base and store all image in it . so that i can compare the input image with the data base and display wether the input image exists is the data base or not. or to which image of data base the inpur image matches.
0 Comments
Answers (2)
Image Analyst
on 18 Feb 2013
The simplest "database" is to just have a folder of images. For a perfect match, simple subtract the two images and look for any non-zero pixels. If you're looking for non-perfect images (like a photo of me taken at two different times), then you need to look at face recognition, which is beyond the scope of what we can teach you in Answers responses, but you can find articles on it here: http://iris.usc.edu/Vision-Notes/bibliography/contentspeople.html#Face%20Recognition,%20Detection,%20Tracking,%20Gesture%20Recognition,%20Fingerprints,%20Biometrics
4 Comments
Suraj
on 22 Feb 2013
I don't understand how we can call a particular image for comparison in the kind of folder you mentioned above. I mean how do we implement imread('particular image') into a variable. Do I have to give the path of the image present in the database folder? And doesn't the path change if I transfer the code along with the database folder to another computer? Please include a sample code for demonstrating how I can call an image into matlab workspace and use it in the algorithm. I am particularly interested in finding the correlation coefficient of a sample image with all the images present in a folder. Thank you. And Saida, I am really sorry for digging my nose into this question. I couldn't hold myself back from asking it.
Image Analyst
on 22 Feb 2013
Check that the folder exists
if ~exist(folder, 'dir')
warningMessage = sprintf('Warning: this folder does not exist:\n%s', folder);
uiwait(warndlg(warningMessage));
return;
end
Of course the path may be different if you are on a different computer. So, you just change it, however you do that (e.g. via uigetdir() or whatever).
Then see the FAQ for how to read in images: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F Come back with your code if you still can't adapt the faq.
keerthana potharaj
on 30 Jan 2019
we are working on face recognition and want to make a data base and store all image in it . so that i can compare the input image with the data base and display wether the input image exists is the data base or not and mention the name of the particular image.pls help us.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!