From 562a3bd5eaf3405118546ab086fb654f73dd6445 Mon Sep 17 00:00:00 2001 From: Ethan Rublee Date: Tue, 23 Nov 2010 16:47:30 +0000 Subject: [PATCH] Adding stubb of documentation for the Dynamic feature detectors --- doc/features2d_common_detection_description.tex | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/features2d_common_detection_description.tex b/doc/features2d_common_detection_description.tex index e4fed8e..28e155a 100644 --- a/doc/features2d_common_detection_description.tex +++ b/doc/features2d_common_detection_description.tex @@ -308,6 +308,47 @@ protected: }; \end{lstlisting} + +\cvclass{DynamicDetectorAdaptor} +An adaptively adjusting detector that iteratively detects until the desired number +of features are found. + +Adapters can easily be implemented for any detector through the creation of an Adjuster +object. + +Beware that this is not thread safe - as the adjustment of parameters breaks the const +of the detection routine... + +\begin{lstlisting} +template +class DynamicDetectorAdaptor: public FeatureDetector { +public: + DynamicDetectorAdaptor(int min_features, int max_features, int max_iters, + const Adjuster& a = Adjuster()); + ... +}; + +//expected Adjuster interface +class MyAdjuster { +public: + //this should call a FeatureDetector and populate keypoints + //e.g. FASTFeatureDetector(thresh).detect(img,mask,keypoints) + void detect(const Mat& img, const Mat& mask, std::vector& keypoints) const; + + //called if there are too few features detected, should adjust feature detector params + //accordingly + void tooFew(int min, int n_detected); + + //called if there are too many features detected, should adjust feature detector params + //accordingly + void tooMany(int max, int n_detected); + + //return whether or not the threshhold is beyond + //a useful point + bool good() const; +\end{lstlisting} + + \cvCppFunc{createFeatureDetector} Feature detector factory that creates \cvCppCross{FeatureDetector} of given type with default parameters (rather using default constructor). -- 2.7.4