Corrected Mask operator (from documentation mask must be a char matrix with non-zero values in the region of interest)

This commit is contained in:
Stefano Fabri 2010-07-02 17:36:28 +00:00
parent 86ef7fab03
commit bce9f54152

View File

@ -55,7 +55,7 @@ struct MaskPredicate
MaskPredicate& operator=(const MaskPredicate&) {}
bool operator() (const KeyPoint& key_pt) const
{
return mask.at<uchar>( (int)(key_pt.pt.y + 0.5f), (int)(key_pt.pt.x + 0.5f) ) != 0;
return mask.at<uchar>( (int)(key_pt.pt.y + 0.5f), (int)(key_pt.pt.x + 0.5f) ) == 0;
}
const Mat& mask;