#include <feature_adjuster.h>
Public Member Functions | |
virtual cv::Ptr < StatefulFeatureDetector > | clone () const |
virtual bool | empty () const |
VideoDynamicAdaptedFeatureDetector (cv::Ptr< cv::AdjusterAdapter > adjuster, int min_features=400, int max_features=500, int max_iters=5) | |
Protected Member Functions | |
virtual void | detectImpl (const cv::Mat &image, std::vector< cv::KeyPoint > &keypoints, const cv::Mat &mask=cv::Mat()) const |
Private Member Functions | |
VideoDynamicAdaptedFeatureDetector & | operator= (const VideoDynamicAdaptedFeatureDetector &) |
VideoDynamicAdaptedFeatureDetector (const VideoDynamicAdaptedFeatureDetector &) | |
Private Attributes | |
cv::Ptr< cv::AdjusterAdapter > | adjuster_ |
int | escape_iters_ |
int | max_features_ |
int | min_features_ |
In contrast to the original DynamicAdaptedFeatureDetector, this variant is enhanced for processing of video sequences. It is meant to work with the DetectorAdjuster. It keeps the DetectorAdjuster alive, so that the final threshold will be retained throughout detection calls. For video sequences the "good" threshold will in general be similar for successive frames, therefore the last "good" threshold is a good starting point for the next frame.
In case of too many features, this variant will just decrease the threshold of the DetectorAdjuster without triggering redetection, so the user needs to get rid of the superfluous keypoints. Mostly the keypoints are scored anyway, so this avoids costly and unnecessary redetections.
Definition at line 53 of file feature_adjuster.h.
VideoDynamicAdaptedFeatureDetector::VideoDynamicAdaptedFeatureDetector | ( | cv::Ptr< cv::AdjusterAdapter > | adjuster, |
int | min_features = 400 , |
||
int | max_features = 500 , |
||
int | max_iters = 5 |
||
) |
adjuster | 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 |
VideoDynamicAdaptedFeatureDetector::VideoDynamicAdaptedFeatureDetector | ( | const VideoDynamicAdaptedFeatureDetector & | ) | [private] |
cv::Ptr< StatefulFeatureDetector > VideoDynamicAdaptedFeatureDetector::clone | ( | ) | const [virtual] |
Implements StatefulFeatureDetector.
Definition at line 166 of file feature_adjuster.cpp.
void VideoDynamicAdaptedFeatureDetector::detectImpl | ( | const cv::Mat & | image, |
std::vector< cv::KeyPoint > & | keypoints, | ||
const cv::Mat & | mask = cv::Mat() |
||
) | const [protected, virtual] |
Definition at line 189 of file feature_adjuster.cpp.
bool VideoDynamicAdaptedFeatureDetector::empty | ( | ) | const [virtual] |
Definition at line 176 of file feature_adjuster.cpp.
VideoDynamicAdaptedFeatureDetector& VideoDynamicAdaptedFeatureDetector::operator= | ( | const VideoDynamicAdaptedFeatureDetector & | ) | [private] |
cv::Ptr<cv::AdjusterAdapter> VideoDynamicAdaptedFeatureDetector::adjuster_ [mutable, private] |
Definition at line 77 of file feature_adjuster.h.
int VideoDynamicAdaptedFeatureDetector::escape_iters_ [private] |
Definition at line 75 of file feature_adjuster.h.
int VideoDynamicAdaptedFeatureDetector::max_features_ [private] |
Definition at line 76 of file feature_adjuster.h.
int VideoDynamicAdaptedFeatureDetector::min_features_ [private] |
Definition at line 76 of file feature_adjuster.h.