diff --git a/modules/features2d/src/detectors.cpp b/modules/features2d/src/detectors.cpp index 69c328acc8..8857c80d11 100644 --- a/modules/features2d/src/detectors.cpp +++ b/modules/features2d/src/detectors.cpp @@ -55,7 +55,7 @@ struct MaskPredicate MaskPredicate& operator=(const MaskPredicate&) {} bool operator() (const KeyPoint& key_pt) const { - return mask.at( (int)(key_pt.pt.y + 0.5f), (int)(key_pt.pt.x + 0.5f) ) != 0; + return mask.at( (int)(key_pt.pt.y + 0.5f), (int)(key_pt.pt.x + 0.5f) ) == 0; } const Mat& mask;