Question

I've searched all possible related keywords that I can think of, but the results are not really what I'm looking for, as most algorithm I found puts high concern on COLOR.

The idea of my application is to identify a image pair with highest similarity.

For example, my input is a, the image pool contains b,c,d,e. The result would be something like b(90%), d(85%), e(80%), c(20%).

My question is what approach can be adopted for calculating such "image similarity"? Or I must build my own code from zero?

enter image description here

Was it helpful?

Solution 3

You could look at shape context http://en.wikipedia.org/wiki/Shape_context for computing similarity between shapes, there are many implementations of shape context available on the internet, the full paper can be accessed here http://www.cs.berkeley.edu/~malik/papers/BMP-shape.pdf

OTHER TIPS

Maybe you should take a look at Hough transform. The lines will correspond to peaks in the transformed image. Then you could identify these peak pixels and compare their locations to that of the original image somehow.

Take a look into SSIM for comparing two images. SSIM stands for Structural Similarity Index Metric which gives a single value based on the similarity between two images. Visit the wikipedia page Structural Similarity

First of all, the best tool for this is OpenCV, it works with most common programming languages.

you can see the documentation page, there are a lot of functionality that may help you.

the function approxPolyDP() (see the detail here) it approximates a polygonal curve (your shape) with the specified precision. Before this you have to detect the contour in the couple of images.

this example very helpful for you:

Improvements:

  • you may count the approximated segments
  • you may calculate the angles between each two segments.
  • you may find some geometric invariant measures (length of lines ratio, barycentric, area ratio...) this is the best
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top