Commit bce9f541 authored by Stefano Fabri's avatar Stefano Fabri

Corrected Mask operator (from documentation mask must be a char matrix with…

Corrected Mask operator (from documentation mask must be a char matrix with non-zero values in the region of interest)
parent 86ef7fab
...@@ -55,7 +55,7 @@ struct MaskPredicate ...@@ -55,7 +55,7 @@ struct MaskPredicate
MaskPredicate& operator=(const MaskPredicate&) {} MaskPredicate& operator=(const MaskPredicate&) {}
bool operator() (const KeyPoint& key_pt) const 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; const Mat& mask;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment