detectors.cpp.patch

Patch for detectors.cpp - Markus Moll, 2010-07-05 01:26 pm

Download (857 Bytes)

 
opencv/modules/features2d/src/detectors.cpp (working copy)
50 50
*/
51 51
struct MaskPredicate
52 52
{
53
    MaskPredicate( const Mat& _mask ) : mask(_mask)
53
    MaskPredicate( const Mat& _mask ) : mask(&_mask)
54 54
    {}
55
    MaskPredicate& operator=(const MaskPredicate&) {}
56 55
    bool operator() (const KeyPoint& key_pt) const
57 56
    {
58
      return mask.at<uchar>( (int)(key_pt.pt.y + 0.5f), (int)(key_pt.pt.x + 0.5f) ) == 0;
57
      return mask->at<uchar>( (int)(key_pt.pt.y + 0.5f), (int)(key_pt.pt.x + 0.5f) ) == 0;
59 58
    }
60 59

  
61
    const Mat& mask;
60
    const Mat* mask;
62 61
};
63 62

  
64 63
void FeatureDetector::removeInvalidPoints( const Mat& mask, vector<KeyPoint>& keypoints )