0

I'm looking for documentation on the chamferMatching method from the OpenCV 2.4 C++. The OpenCV implementation given in /OpenCV-2.4.0/samples/cpp/chamfer.cpp which only uses the first four parameters. There are a total of 14 parameters which can be set which include:

Parameters:

img (Cv::Mat)

templ (Cv::Mat)

results (Std::Vector::Std_Vector_Cv_Point)

cost (Std::Vector::Float)

templ_scale (Double) (defaults to: 1)

max_matches (Fixnum) (defaults to: 20)

min_match_distance (Double) (defaults to: 1.0)

pad_x (Fixnum) (defaults to: 3)

pad_y (Fixnum) (defaults to: 3)

scales (Fixnum) (defaults to: 5)

min_scale (Double) (defaults to: 0.6)

max_scale (Double) (defaults to: 1.6)

orientation_weight (Double) (defaults to: 0.5)

truncate (Double) (defaults to: 20)

If anyone can point me out to an example or documentation which explains each of these parameters it would be highly appreciated.

user1248490
  • 963
  • 9
  • 16
user1401950
  • 967
  • 2
  • 12
  • 28

1 Answers1

5

I spent many days looking for an answer to the same question of yours but I didn't find any. The best clarification I got so far is from the original paper of fast directional chamfer matching:

Link

http://www.umiacs.umd.edu/~mingyliu/papers/liu_cvpr2010.pdf

img (Cv::Mat) The test image

templ (Cv::Mat) The template which contains the shape you are looking for in the test image

results (Std::Vector::Std_Vector_Cv_Point) points vector which contains the matched point in the test image

cost (Std::Vector::Float) floats vector of the match cost for each result

templ_scale (Double) (defaults to: 1) magnification of the template image. not that it is Reciprocal

max_matches (Fixnum) (defaults to: 20) how many results you want

min_match_distance (Double) (defaults to: 1.0) what is the (maximum) matching cost you allow

pad_x (Fixnum) (defaults to: 3) pad X, of the search window

pad_y (Fixnum) (defaults to: 3) pad Y, of the search window

scales (Fixnum) (defaults to: 5) how many scales you want to use for the template

min_scale (Double) (defaults to: 0.6) obvious

max_scale (Double) (defaults to: 1.6) obvious

orientation_weight (Double) (defaults to: 0.5) by what percentage you want the orientation of a pixel to contribute in the cost calculation, default is 50%

truncate (Double) (defaults to: 20) the threshold at which the distance will be truncated (using threshold()

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
  • 1
    After reading the implementation of Chamfer Matching, I realized that the truncate is simply the threshold at which the distance will be truncated (using threshold() ). – Hussein Adnan Mohammed Jul 16 '15 at 23:05