restored 2 methods (for backward compatibility)
This commit is contained in:
parent
af28d19b3a
commit
c46b510f4c
@ -1248,6 +1248,13 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const = 0;
|
||||
|
||||
/*
|
||||
* Remove keypoints that are not in the mask.
|
||||
* Helper function, useful when wrapping a library call for keypoint detection that
|
||||
* does not support a mask argument.
|
||||
*/
|
||||
static void removeInvalidPoints( const Mat& mask, vector<KeyPoint>& keypoints );
|
||||
};
|
||||
|
||||
class CV_EXPORTS FastFeatureDetector : public FeatureDetector
|
||||
@ -1655,6 +1662,12 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void computeImpl( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const = 0;
|
||||
|
||||
/*
|
||||
* Remove keypoints within borderPixels of an image edge.
|
||||
*/
|
||||
static void removeBorderKeypoints( vector<KeyPoint>& keypoints,
|
||||
Size imageSize, int borderSize );
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -89,6 +89,12 @@ bool DescriptorExtractor::empty() const
|
||||
return false;
|
||||
}
|
||||
|
||||
void DescriptorExtractor::removeBorderKeypoints( vector<KeyPoint>& keypoints,
|
||||
Size imageSize, int borderSize )
|
||||
{
|
||||
KeyPointsFilter::runByImageBorder( keypoints, imageSize, borderSize );
|
||||
}
|
||||
|
||||
Ptr<DescriptorExtractor> DescriptorExtractor::create(const string& descriptorExtractorType)
|
||||
{
|
||||
DescriptorExtractor* de = 0;
|
||||
|
@ -82,6 +82,11 @@ bool FeatureDetector::empty() const
|
||||
return false;
|
||||
}
|
||||
|
||||
void FeatureDetector::removeInvalidPoints( const Mat& mask, vector<KeyPoint>& keypoints )
|
||||
{
|
||||
KeyPointsFilter::runByPixelsMask( keypoints, mask );
|
||||
}
|
||||
|
||||
Ptr<FeatureDetector> FeatureDetector::create( const string& detectorType )
|
||||
{
|
||||
FeatureDetector* fd = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user