an adaptively adjusting detector that iteratively detects until the desired number of features are detected. Beware that this is not thread safe - as the adjustment of parameters breaks the const of the detection routine... /TODO Make this const correct and thread safe More...
#include <features2d.hpp>
Public Member Functions | |
DynamicAdaptedFeatureDetector (const Ptr< AdjusterAdapter > &adjaster, int min_features=400, int max_features=500, int max_iters=5) | |
Protected Member Functions | |
virtual void | detectImpl (const Mat &image, vector< KeyPoint > &keypoints, const Mat &mask=Mat()) const |
an adaptively adjusting detector that iteratively detects until the desired number of features are detected. Beware that this is not thread safe - as the adjustment of parameters breaks the const of the detection routine... /TODO Make this const correct and thread safe
sample usage: will create a detector that attempts to find 100 - 110 FAST Keypoints, and will at most run FAST feature detection 10 times until that number of keypoints are found Ptr<FeatureDetector> detector(new DynamicAdaptedFeatureDetector(new FastAdjuster(20,true),100, 110, 10));
cv::DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector | ( | const Ptr< AdjusterAdapter > & | adjaster, | |
int | min_features = 400 , |
|||
int | max_features = 500 , |
|||
int | max_iters = 5 | |||
) |
adjaster | an AdjusterAdapter that will do the detection and parameter adjustment | |
max_features | the maximum desired number of features | |
max_iters | the maximum number of times to try to adjust the feature detector params for the FastAdjuster this can be high, but with Star or Surf this can get time consuming | |
min_features | the minimum desired features |
virtual void cv::DynamicAdaptedFeatureDetector::detectImpl | ( | const Mat & | image, | |
vector< KeyPoint > & | keypoints, | |||
const Mat & | mask = Mat() | |||
) | const [protected, virtual] |
Implements cv::FeatureDetector.