First time here? Check out the FAQ!

Ask Your Question
0

BinaryDescriptorMatcher matching Mask not working as specified in the Documentation

asked Apr 7 '17

leunam gravatar image

The Mask does not work as the documentation states: ( docs.opencv.org/3.1.0/db/d39/classcv_1_1DescriptorMatcher.html#a8737756123c4aba88ae5fc15982e0dee ) Optional mask (or masks) can be passed to specify which query and training descriptors can be matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if mask.at<uchar>(i,j) is non-zero.

But the implementation only lets you choose which queryDescriptors shall be matched (against all trainDescriptors, no choice against which of them).

GitHubCode: github.com/opencv/opencv_contrib/blob/master/modules/line_descriptor/src/binary_descriptor_matcher.cpp#L197

Am I mistaken or is the documentation inconsistent with the implementation. The documentations states what would actually be desirable here.

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Apr 7 '17

berak gravatar image

you're right, that's a typo, it probably should be:

queryDescriptors[i] can be matched with trainDescriptors[j] only if mask.at<uchar>(i,0) is non-zero.
Preview: (hide)

Comments

Oh, that's sad - it changes the behaviour. You can not prefilter which descriptor should be matched against which, only exclude some totally, which could also be done by just leaving them out of the query vector. I didn't read the multi index hashing paper - maybe it has the disadvantage that you can only always match against all trainDescriptors?

This should be fixed in the Documentation, at multiple places... Who can fix the wrong Documentation?

leunam gravatar imageleunam (Apr 7 '17)edit

again, you cannot filter on the train descriptors, only on the query ones. imho, you simply misunderstood that

berak gravatar imageberak (Apr 10 '17)edit

I got that -> So I think the Documentation should be corrected. Who is able to do that?

leunam gravatar imageleunam (Apr 13 '17)edit

Question Tools

1 follower

Stats

Asked: Apr 7 '17

Seen: 209 times

Last updated: Apr 07 '17