Ask Your Question

Revision history [back]

Your question is kinda vague but, some of the possibilities are:

  • Using the color histogram or the grayscale histogram of an image and match that between images
  • You could use a histogram of oriented gradients by defining gradient directions and match that
  • You could define edges
  • ...

So basically what you want to do is template matching. For that you first define a global descriptor of an image - http://docs.opencv.org/modules/imgproc/doc/histograms.html - http://docs.opencv.org/modules/imgproc/doc/feature_detection.html

Then you match the result of your references with the input images and use a distance metric between both. Best match has closest distance, meaning it is the most equal one.

Google template based matching, you will find tons of examples.