From: Ethan Rublee Date: Tue, 23 Nov 2010 16:47:30 +0000 (+0000) Subject: Adding stubb of documentation for the Dynamic feature detectors X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~8355 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=562a3bd5eaf3405118546ab086fb654f73dd6445;p=platform%2Fupstream%2Fopencv.git Adding stubb of documentation for the Dynamic feature detectors --- 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).