mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
Adding stubb of documentation for the Dynamic feature detectors
This commit is contained in:
parent
f5e5b677c9
commit
562a3bd5ea
@ -308,6 +308,47 @@ protected:
|
|||||||
};
|
};
|
||||||
\end{lstlisting}
|
\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<typename Adjuster>
|
||||||
|
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<KeyPoint>& 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}
|
\cvCppFunc{createFeatureDetector}
|
||||||
Feature detector factory that creates \cvCppCross{FeatureDetector} of given type with
|
Feature detector factory that creates \cvCppCross{FeatureDetector} of given type with
|
||||||
default parameters (rather using default constructor).
|
default parameters (rather using default constructor).
|
||||||
|
Loading…
Reference in New Issue
Block a user