16

I would like to ask for more information on how Chamfer Matching algorithm (an edge matching algorithm) can be used to find 'similar' images. I would like to know if it is possible to place a 'score' for the matched results.

TylerH
  • 20,799
  • 66
  • 75
  • 101
bloodfire1004
  • 493
  • 2
  • 8
  • 24

1 Answers1

21

The Chamfer Matching Algorithm basically calculates the distance (dis-similarity) between two images. The basic idea is to:

  1. Extract the edge/contours of a query image as well as target image.
  2. Take one point/pixel of contour in query image and find the distance of a closest point/pixel of contour in target image.
  3. Sum the distances for all edge points/pixels of query image.

This gives the Chamfer Distance i.e. a value of dis-similarity between two images. The lower the value better the result. However, you have to take care of scaling, and sliding windows as well if target image is larger than query image which is often the case.

You could find working exampling on opencv\modules\contrib.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Rudi
  • 700
  • 1
  • 8
  • 19