How to use the chamfer matching algorithm to search for "similar images"

I would like to ask for additional information on how the facet matching algorithm (border matching algorithm) can be used to search for “similar” images. I would like to know if a “rating” can be given for the agreed results.

+7
matching image computer-vision edge
source share
1 answer

The chamfer matching algorithm basically calculates the distance (inconsistency) between two images. The basic idea is as follows:

  • Extract the edge / contours of the query image as well as the target image.
  • Take one point / pixel of the path in the query image and find the distance of the nearest point / pixel of the path in the target image.
  • Sum the distances for all edge points / pixels of the query image.

This gives the chamfer distance, that is, the value of the dissonance between the two images. The lower the value, the better the result. However, you should take care of scaling and sliding windows if the target image is larger than the request image, which often happens.

You can find a working example for opencv \ modules \ contrib.

+13
source share

All Articles