Ask Your Question
1

How can I change the norm used by cv::FlannBasedMatcher?

asked 2014-10-07 09:42:54 -0600

JohnyK. gravatar image

Hi, I use the following code to create a cv::FlannBasedMatcher.

new cv::FlannBasedMatcher(new cv::flann::LshIndexParams(6, 12, 2));

How can I change the norm used by the matcher?

Thx

edit retag flag offensive close merge delete

Comments

2

I am afraid that you cannot do that, if you see this documentation. You can instead do something about the KDTreeIndexParams, or SearchParams. See this for more info.

thdrksdfthmn gravatar imagethdrksdfthmn ( 2014-10-07 10:16:56 -0600 )edit

Basically there are these norm types defined in the cv2.NORM_L2,cv2.NORM_L1,cv2.NORM_HAMMING,cv2.NORM_HAMMING2. This documentation may help you : http://docs.opencv.org/trunk/doc/py_tutorials/py_feature2d/py_matcher/py_matcher.html

Abhishek Kumar Annamraju gravatar imageAbhishek Kumar Annamraju ( 2014-10-07 11:41:43 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
3

answered 2014-10-08 03:33:18 -0600

thdrksdfthmn gravatar image

The norms are used for BFMatching (BruteForce). As you can see it is mentioned here:

"For BF matcher, first we have to create the BFMatcher object using cv2.BFMatcher(). It takes two optional params. First one is normType"

while,

"For FLANN based matcher, we need to pass two dictionaries which specifies the algorithm to be used, its related parameters etc. First one is IndexParams. For various algorithms, the information to be passed is explained in FLANN docs."

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-10-07 09:42:54 -0600

Seen: 472 times

Last updated: Oct 08 '14