views:

49

answers:

4

I have looked through all the OpenCV documentation that I could find and googled for what I'm looking for, but I think I must be using the wrong terminology.

What I want to do is something similar to template matching, but I do not need to search for instances of my image in another image. I need to compare my image to a library of other images and determine which is the best match. Is there a name for this kind of matching?

If there is no existing library for it, I am planning just to use a correlation function for each image in the library and take the best match.

+1  A: 

It sounds like image matching or image comparison (another keyword you might search for is image registration but that is a bit different).

carlosdc
"Image Matching". That sounds like the right phrase. It looks like this is most developed in the intellectual property arena. I feel silly now with such a simple answer, but I believe I was missing it because I always included OpenCV in my searches. Thanks for the lead.
yakiimo
+1  A: 

Try looking for SIFT/SURF.

Utkarsh Sinha
Thanks for your answer. I found those algorithms as well, but as I understand them, they are simply very advanced versions of template matching within images. Hopefully I will not need something that complex.
yakiimo
+1  A: 

One simple technique could be to compare the histograms of the two images. Check out this link for more information

http://opencv.willowgarage.com/documentation/cpp/histograms.html?highlight=histograms#cv-comparehist

You should also look at the sample programs that come with openCV called find_obj and find_obj_ferns

NotNamedDwayne
Thanks for that. I can add those to the set of available functions for matching. It seems that is the direction this is going anyway.
yakiimo
A: 

Well you want to match a template in a lot of images.

You can create a loop for matching teplates to images. And find minMaxLoc and values.

So you can see which image how match to template.

sundowatch
Right. That's my plan if there is no other framework for this type of matching. Thanks for the idea.
yakiimo