提交 354be115 编写于 作者: M Maria Dimashova

made MaskPredicate safer (#419)

上级 dfe4af9e
......@@ -48,17 +48,16 @@ namespace cv
/*
* FeatureDetector
*/
struct MaskPredicate
class MaskPredicate
{
MaskPredicate( const Mat& _mask ) : mask(_mask)
{}
MaskPredicate& operator=(const MaskPredicate&) { return *this; }
public:
MaskPredicate( const Mat& _mask ) : mask(_mask) {}
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;
}
const Mat& mask;
private:
const Mat mask;
};
FeatureDetector::~FeatureDetector()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册