Ask Your Question

Revision history [back]

Brute-force matching with crosscheck do not output closet couple

HI, I try to re-implement Brute-force matching ORB with crosscheck: I used: BFMatcher matcher = BFMatcher(cv::NORM_HAMMING, true); In the document of opencv said:

Second param is boolean variable, crossCheck which is false by default. If it is true, Matcher returns only those matches with value (i,j) such that i-th descriptor in set A has j-th descriptor in set B as the best match and vice-versa. That is, the two features in both sets should match each other. https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_matcher/py_matcher.html

But when I printed out the results and checked it there are exist value(i, j) j-th in B closest with i-th in A but i-th in A do not closest with j-th in B. For example: opencv bfmatch ouput a match couple is: i-th = 9 j-th=5 distance = 18. but I check j-th = 5 in B set closest with i-th = 9 in A set but not vice-versa.

image description

Do anyone have experience with this problem of BFMatch of opencv, or Do I misunderstood something here?

click to hide/show revision 2
None

updated 2018-06-01 02:40:11 -0600

berak gravatar image

Brute-force matching with crosscheck do not output closet couple

HI, I try to re-implement Brute-force matching ORB with crosscheck: I used: BFMatcher matcher = BFMatcher(cv::NORM_HAMMING, true); In the document of opencv said:

Second param is boolean variable, crossCheck which is false by default. If it is true, Matcher returns only those matches with value (i,j) such that i-th descriptor in set A has j-th descriptor in set B as the best match and vice-versa. That is, the two features in both sets should match each other. https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_matcher/py_matcher.html

But when I printed out the results and checked it there are exist value(i, j) j-th in B closest with i-th in A but i-th in A do not closest with j-th in B. For example: opencv bfmatch ouput a match couple is: i-th = 9 j-th=5 distance = 18. but I check j-th = 5 in B set closest with i-th = 9 in A set but not vice-versa.

image description

Do anyone have experience with this problem of BFMatch of opencv, or Do I misunderstood something here?