Version of TrackerFeatures using external container. More...
#include <EC.h>
Public Member Functions | |
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 | |
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) | |
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. | |
void | Reset () |
Reset. | |
double | Reset (IplImage *img, IplImage *mask) |
Reset track features on specified mask area. | |
template<typename T > | |
bool | Track (IplImage *img, IplImage *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 (IplImage *img, IplImage *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. | |
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. | |
Protected Attributes | |
bool | purge |
Version of TrackerFeatures using external container.
alvar::TrackerFeaturesEC::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 |
||
) | [inline] |
bool alvar::TrackerFeaturesEC::AddFeatures | ( | std::map< int, T > & | container, |
int | type_id = 0 , |
||
int | first_id = 0 , |
||
int | last_id = 65535 |
||
) | [inline] |
bool alvar::TrackerFeaturesEC::DelFeature | ( | int | index | ) | [inline] |
Stop tracking the identified feature (with index for features array)
Reimplemented from alvar::TrackerFeatures.
bool alvar::TrackerFeaturesEC::DelFeatureId | ( | int | id | ) | [inline] |
Stop tracking the identified feature (with feature id)
Reimplemented from alvar::TrackerFeatures.
int alvar::TrackerFeaturesEC::EraseNonTracked | ( | std::map< int, T > & | container, |
int | type_id = -1 |
||
) | [inline] |
void alvar::TrackerFeaturesEC::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
Reimplemented from alvar::TrackerFeatures.
void alvar::TrackerFeaturesEC::Reset | ( | ) | [inline] |
double alvar::TrackerFeaturesEC::Reset | ( | IplImage * | img, |
IplImage * | mask | ||
) | [inline] |
Reset track features on specified mask area.
Reimplemented from alvar::TrackerFeatures.
bool alvar::TrackerFeaturesEC::Track | ( | IplImage * | img, |
IplImage * | mask, | ||
std::map< int, T > & | container, | ||
int | type_id = -1 , |
||
int | first_id = -1 , |
||
int | last_id = -1 |
||
) | [inline] |
bool alvar::TrackerFeaturesEC::Track | ( | IplImage * | img, |
IplImage * | mask, | ||
std::map< int, T > & | container, | ||
F | do_handle_test, | ||
int | type_id = 0 , |
||
int | first_id = -1 , |
||
int | last_id = -1 |
||
) | [inline] |
bool alvar::TrackerFeaturesEC::purge [protected] |