how can I compare an input image with another image in the database?
Afficher commentaires plus anciens
I am doing character recognition.
Réponses (1)
Walter Roberson
le 2 Jan 2014
1 vote
Do feature extraction. Extract several features. Create a vector from the results of all the extracted features, concatenated together.
Do the same thing for each image to be compared.
To find the closest match, calculate the "distance" between the feature vectors. You can experiment with different "metrics", including Euclidean distance. When the distance is shortest, the match is the best (provided that you extracted useful features.)
6 commentaires
Sidra Aleem
le 10 Avr 2017
Modifié(e) : Sidra Aleem
le 10 Avr 2017
@ Walter Roberson I have extracted my features and have feature matrix for my input images. Feature matrix contains distance angles between a candidate feature point and its four nearest neighbouring feature points. Feature matrix is of dimension N x 8. N varies for each image depending on the number of feature point that image has. How can I find euclidean distance between feature matrix of my input image and images in my database?
Walter Roberson
le 10 Avr 2017
You cannot find euclidean distance unless you have the same length for all points. You could calculate the distance between any of those 1 x 8, but if for example one of the images had 3 feature points (so 3 x 8) and another image had 4 feature points (so 4 x 8) then you cannot find the euclidean distance between the (3 x 8) and the (4 x 8).
Sidra Aleem
le 11 Avr 2017
Modifié(e) : Sidra Aleem
le 11 Avr 2017
@ Walter Roberson can i compute the euclidean distance by making the dimension of my feature matrix same. For example first I will reshape the feature matrix to 1D array. After that either truncating the array with greater N and make it to same as that of other array "N"? Or can i pad the feature array with less N so that it becomes equal to N of other feature array? Then finding euclidean distance by either norm or simple L2 distance. Which one of these 2 measures will be better? All of this I have to do for "personal identification using retinal vascular network". With both these measures result will be effected. Is there any other way of doing it?
Walter Roberson
le 11 Avr 2017
If you truncate the information then you might as well not have it at all.
If you truncate the information, that is equivalent to discarding some of the feature points. But are the feature points ordered in some particular way? How do you know you are not discarding the feature points that would most closely match between the two?
If you pad, then again you have to ask whether the feature points are ordered in some particular way? How do you know that the feature points are being matched appropriately to best detect matches?
Sidra Aleem
le 11 Avr 2017
Modifié(e) : Sidra Aleem
le 11 Avr 2017
@Walter Roberson No. There is no ordering of feature points. I just thought of these 2 ways. Can you suggest me some way to solve this? Please help me with this i am stuck
Walter Roberson
le 12 Avr 2017
For any given image, instead of having one entry for all N sets of 8 values together, use N entries of length 8 so that you can match on any of the entries. Use the same class number for each of the N.
This then leaves you with the question of how to aggregate the scores. For example, having 3 high-quality matches to the same image gives you more confidence than having only one high-quality match. However, suppose you had one 98% confidence match to one image and the matches to the other features for the same image were not all that good: how would you rate that compared to having three 90% matches to a different target?
Catégories
En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!