How can i create a simple data base of images in matlab.

6 次查看(过去 30 天)
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.

回答(2 个)

Image Analyst
Image Analyst 2013-2-18
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 个评论
Suraj
Suraj 2013-2-22
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
Image Analyst 2013-2-22
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
keerthana potharaj 2019-1-30
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.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by