Compare images and find the most similar
Mostra commenti meno recenti
Hello, I am new in this web site, but I am finding a good support and help by the community, so firstly, I want to say thank you in advance for your time and support.
My problem is that I want to compare one image with several models with differences each one, with the intention to clasify this image, for example the following music notes would be our data base:




and the image to clasify would be the following:

Then I am trying to compare my image with all the previous masks one by one, and find the most similar to my main image. I tried with the detectSURFFeatures, but the image doesn´t have sufficient details to this technique... so I am looking for other idea to do this.
Maybe comparing the Histograms between every image and finding the most similar? Please if someone have another idea, he/she is welcome. Thank you very much.
Risposta accettata
Più risposte (1)
Image Analyst
il 14 Gen 2014
The simplest way is to count the number of black pixels. That's assuming all your notes are perfect ones like this. As they get more corrupted and noisy, this method deteriorates. The number of black pixels for each note is unique so you can just use a lookup table to find out which note it is. For example
lookupTable = [1000, 850, 1100, 1200];
Then let's say your 'test" note has 870 black pixels, then just
blackInMyNote = 870;
[~, noteNumber] = min(abs(blackInMyNote - lookupTable))
noteNumber is your answer.
2 Commenti
Alberto
il 15 Gen 2014
Image Analyst
il 15 Gen 2014
Rotation with my method with high quality notes should be fine - it will still find the proper note and will work. With scaling, it won't, and you'll have to look into more sophisticated pattern recognition methods, or else try to scale the test image to be the proper size. Of course if you have a lot of clutter/garbage/noise then it gets more and more difficult to identify the proper note.
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!