Ask Your Question
0

BinaryDescriptorMatcher matching Mask not working as specified in the Documentation

asked 2017-04-07 08:27:45 -0600

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-04-07 08:46:56 -0600

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.
edit flag offensive delete link more

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 ( 2017-04-07 12:42:10 -0600 )edit

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

berak gravatar imageberak ( 2017-04-10 12:45:46 -0600 )edit

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

leunam gravatar imageleunam ( 2017-04-13 08:39:06 -0600 )edit
berak gravatar imageberak ( 2017-04-13 08:40:51 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-04-07 08:24:46 -0600

Seen: 174 times

Last updated: Apr 07 '17