Matching an image with a database
Show older comments
I am looking to compare a new image to a database of images, and then output the higher "similarity". The images I want to compare are similar, but the problem is though because they're not pixel by pixel equal. I've tried to use BoW (Bag Of Words) model already, as per recommendation, I tried various implementations without success, the best correct rate I got was 30%, which is something really low.
Let me show you what I am talking about: (imgur gallery with 5 example images) http://imgur.com/a/ukf5E#0. I want to detect that the four initial images are equal, and the fifth one is different. I wouldn't mind only detecting that the ones with the same angle orientation are equal, though. (In my example 2, 3 and 4)
So, that being said, are there any better methods than BoW for that? Or perhaps BoW should be enough if I implemented in a different way?
Thanks in advance.
2 Comments
Aravind Dhakshinamoorthy
on 14 Dec 2016
Try using the SIFT algorithm. It detects key points in both images and maps the similar ones. Greater number of similar points greater the similarity.
Hamad ALshahrani
on 30 Mar 2020
Write a Matlab program to find an image in the database similar to a query image which it is: a. Not in the database but for the same person. b. Not in the database and for another person. For both cases above, repeat the process 10 times on different faces and compute the accuracy ratio.
Accepted Answer
More Answers (3)
Anand
on 23 Mar 2013
save idx.mat idx;
save centers.mat centers;
Mohammed Magdy
on 7 Oct 2013
0 votes
hello please why did you use this number (2) here (features{i},2)
histFtrs{i} = hist(idx(start:start+size(features{i},2)),nWords)';
5 Comments
Anand
on 11 Oct 2013
I used that to get the second dimension of features{i}
>> size(features{1})
ans =
64 15
There are 15 features and that's the number I was looking to get.
Mohammed Magdy
on 13 Oct 2013
Hello i used gist descriptor (the descriptor for each image is a row vector 1*512. I choose nWords=30 but i don't have a good result. Please do you have any idea about this descriptor (GIST).
hamed abdulaziz
on 11 Mar 2014
I have medical images and I need to classify them to normal and abnomal using bag of words model where I divided each image to patches(blocks) and extracted local features from each patch,my question how can I use k-means algorithm to constrcut visual words vocabulary,could any one provide me matlab code for this job,and thanks in advance
Anand
on 12 Mar 2014
The code above shows how to do this. http://www.mathworks.com/matlabcentral/answers/67478#answer_79060
hamed abdulaziz
on 23 Mar 2014
Anand :Thank you,I saw the code above but I divided each image to patches(blocks) and extracted local features from each patch,where is the code doesn't do that,could you guide me with my thanks.
Yuva
on 20 Oct 2017
0 votes
I am doing my final year project on attedance system by face recognition using SIFT algorithm,if there is any code on this project please comment code or provide any link .
Categories
Find more on Recognition, Object Detection, and Semantic Segmentation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!