![]() |
My Project
|
TrackerFeatures tracks features using OpenCV's cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK More...
#include <TrackerFeatures.h>
Public Member Functions | |
| TrackerFeatures (int _max_features=100, int _min_features=90, double _quality_level=0.01, double _min_distance=10, int _pyr_levels=1, int _win_size=3) | |
| ~TrackerFeatures () | |
| Destructor. | |
| void | ChangeSettings (int _max_features=100, int _min_features=90, double _quality_level=0.01, double _min_distance=10) |
| Change settings while running. | |
| void | Reset () |
| Reset. | |
| double | Reset (const cv::Mat &img, cv::Mat &mask) |
| Reset track features on specified mask area. | |
| bool | DelFeature (int index) |
| Stop tracking the identified feature (with index for features array) | |
| bool | DelFeatureId (int id) |
| Stop tracking the identified feature (with feature id) | |
| double | Track (cv::Mat &img) |
| Track features. | |
| double | Track (cv::Mat &img, bool add_features) |
| Track features. | |
| double | Track (cv::Mat &img, cv::Mat &mask) |
| Track features. | |
| int | AddFeatures (cv::Mat &mask) |
| add features to the previously tracked frame if there are less than min_features | |
| cv::Mat | NewFeatureMask () |
| Create and get the pointer to new_features_mask. | |
| int | Purge () |
| Purge features that are considerably closer than the defined min_distance. More... | |
Public Member Functions inherited from Tracker | |
| virtual void | Compensate (double *x, double *y) |
Public Attributes | |
| std::vector< cv::Point2f > | prev_features |
| Track result: previous features | |
| std::vector< cv::Point2f > | features |
| Track result: current features | |
| int | prev_feature_count |
| Track result: count of previous features | |
| int | feature_count |
| Track result: count of current features | |
| int * | prev_ids |
| Track result: ID:s for previous features | |
| int * | ids |
| Track result: ID:s for current features | |
Protected Member Functions | |
| double | TrackHid (const cv::Mat &img, cv::Mat &mask, bool add_features=true) |
| Reset track features on specified mask area. | |
TrackerFeatures tracks features using OpenCV's cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK
Definition at line 40 of file TrackerFeatures.h.
| TrackerFeatures | ( | int | _max_features = 100, |
| int | _min_features = 90, |
||
| double | _quality_level = 0.01, |
||
| double | _min_distance = 10, |
||
| int | _pyr_levels = 1, |
||
| int | _win_size = 3 |
||
| ) |
\brief Constructor for \e TrackerFeatures tracks features using OpenCV's cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK
\param _max_features The maximum amount of features to be tracked
\param _min_features The minimum amount of features. The featureset is filled up when the number of features is lower than this.
\param _quality_level Multiplier for the maxmin eigenvalue; specifies minimal accepted quality of image corners.
\param _min_distance Limit, specifying minimum possible distance between returned corners; Euclidian distance is used.
If 0 given we use default value aiming for uniform cover: _min_distance = 0.8*sqrt(x_res*y_res/max_features))
| _pyr_levels | Number of pyramid levels |
| int Purge | ( | ) |
Purge features that are considerably closer than the defined min_distance.
Note, that we always try to maintain the smaller id's assuming that they are older ones