1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Fix: BFMatcher isMaskSupported false on crossCheck

isMaskSupported now returns false when the matcher is
created with crossCheck enabled, because the mask
path is unsupported in that mode. knnMatchImpl also
drops the mask so it cannot reach batchDistance and
trigger its mask.empty() assertion.

https://github.com/opencv/opencv/issues/22093
This commit is contained in:
Anand Mahesh
2026-07-13 07:58:58 +05:30
parent 8fdf15e26e
commit 0fb620f0f0
3 changed files with 78 additions and 2 deletions
@@ -1220,7 +1220,7 @@ public:
virtual ~BFMatcher() {}
virtual bool isMaskSupported() const CV_OVERRIDE { return true; }
virtual bool isMaskSupported() const CV_OVERRIDE { return !crossCheck; }
/** @brief Brute-force matcher create method.
@param normType One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are