My Project
Public Member Functions | Protected Attributes | List of all members
TrackerFeaturesEC Class Reference

Version of TrackerFeatures using external container. More...

#include <EC.h>

Inheritance diagram for TrackerFeaturesEC:
TrackerFeatures Tracker

Public Member Functions

 TrackerFeaturesEC (int _max_features=100, int _min_features=90, double _quality_level=0.01, double _min_distance=10, int _pyr_levels=4, int win_size=6)
 Constructor.
 
template<typename T >
bool Track (cv::Mat &img, cv::Mat &mask, std::map< int, T > &container, int type_id=-1, int first_id=-1, int last_id=-1)
 Track features with matching type id. New features will have id's in the specified id range.
 
template<typename T , typename F >
bool Track (cv::Mat &img, cv::Mat &mask, std::map< int, T > &container, F do_handle_test, int type_id=0, int first_id=-1, int last_id=-1)
 Track features matching the given functor. New features will have id's in the specified id range. More...
 
template<typename T >
bool AddFeatures (std::map< int, T > &container, int type_id=0, int first_id=0, int last_id=65535)
 add features to the previously tracked frame if there are less than min_features
 
template<typename T >
int EraseNonTracked (std::map< int, T > &container, int type_id=-1)
 Erases the items matching with type_id having has_p2d == false . If type_id == -1 doesn't test the type.
 
void Purge ()
 Purge features that are considerably closer than the defined min_distance. More...
 
void Reset ()
 
double Reset (cv::Mat &img, cv::Mat &mask)
 
bool DelFeature (int index)
 
bool DelFeatureId (int id)
 
- Public Member Functions inherited from TrackerFeatures
 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)
 

Protected Attributes

bool purge
 
- Protected Attributes inherited from TrackerFeatures
int x_res
 
int y_res
 
int frame_count
 
double quality_level
 
double min_distance
 
int min_features
 
int max_features
 
cv::Mat status
 
cv::Mat img_eig
 
cv::Mat img_tmp
 
cv::Mat gray
 
cv::Mat prev_gray
 
cv::Mat pyramid
 
cv::Mat prev_pyramid
 
cv::Mat mask
 
int next_id
 
int win_size
 
int pyr_levels
 

Additional Inherited Members

- Public Attributes inherited from TrackerFeatures
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 inherited from TrackerFeatures
double TrackHid (const cv::Mat &img, cv::Mat &mask, bool add_features=true)
 Reset track features on specified mask area.
 

Detailed Description

Version of TrackerFeatures using external container.

Definition at line 291 of file EC.h.

Member Function Documentation

◆ Purge()

void Purge ( )
inline

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

Definition at line 464 of file EC.h.

◆ Track()

bool Track ( cv::Mat &  img,
cv::Mat &  mask,
std::map< int, T > &  container,
do_handle_test,
int  type_id = 0,
int  first_id = -1,
int  last_id = -1 
)
inline

Track features matching the given functor. New features will have id's in the specified id range.

Track features matching the given functor. If first_id >= 0 we call AddFeatures with the specified id range.

Definition at line 373 of file EC.h.


The documentation for this class was generated from the following file: