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:
parent
86ef7fab03
commit
bce9f54152
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user