Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
alvar::TrackerFeatures Class Reference

TrackerFeatures tracks features using OpenCV's cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK More...

#include <TrackerFeatures.h>

Inheritance diagram for alvar::TrackerFeatures:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int AddFeatures (IplImage *mask=NULL)
 add features to the previously tracked frame if there are less than min_features
void ChangeSettings (int _max_features=100, int _min_features=90, double _quality_level=0.01, double _min_distance=10)
 Change settings while running.
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)
IplImage * NewFeatureMask ()
 Create and get the pointer to new_features_mask.
int 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.
double Track (IplImage *img)
 Track features.
double Track (IplImage *img, bool add_features)
 Track features.
double Track (IplImage *img, IplImage *mask)
 Track features.
 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)
 Constructor for TrackerFeatures tracks features using OpenCV's cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK.
 ~TrackerFeatures ()
 Destructor.

Public Attributes

int feature_count
 Track result: count of current features
CvPoint2D32f * features
 Track result: current features
int * ids
 Track result: ID:s for current features
int prev_feature_count
 Track result: count of previous features
CvPoint2D32f * prev_features
 Track result: previous features
int * prev_ids
 Track result: ID:s for previous features

Protected Member Functions

double TrackHid (IplImage *img, IplImage *mask=NULL, bool add_features=true)
 Reset track features on specified mask area.

Protected Attributes

int frame_count
IplImage * gray
IplImage * img_eig
IplImage * img_tmp
IplImage * mask
int max_features
double min_distance
int min_features
int next_id
IplImage * prev_gray
IplImage * prev_pyramid
int pyr_levels
IplImage * pyramid
double quality_level
char * status
int win_size
int x_res
int y_res

Detailed Description

TrackerFeatures tracks features using OpenCV's cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK

Examples:
SampleTrack.cpp.

Definition at line 40 of file TrackerFeatures.h.


Constructor & Destructor Documentation

alvar::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 
)

Constructor for TrackerFeatures tracks features using OpenCV's cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK.

Parameters:
_max_featuresThe maximum amount of features to be tracked
_min_featuresThe minimum amount of features. The featureset is filled up when the number of features is lower than this.
_quality_levelMultiplier for the maxmin eigenvalue; specifies minimal accepted quality of image corners.
_min_distanceLimit, 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_levelsNumber of pyramid levels

Definition at line 32 of file TrackerFeatures.cpp.

Destructor.

Definition at line 43 of file TrackerFeatures.cpp.


Member Function Documentation

int alvar::TrackerFeatures::AddFeatures ( IplImage *  mask = NULL)

add features to the previously tracked frame if there are less than min_features

Definition at line 227 of file TrackerFeatures.cpp.

void alvar::TrackerFeatures::ChangeSettings ( int  _max_features = 100,
int  _min_features = 90,
double  _quality_level = 0.01,
double  _min_distance = 10 
)

Change settings while running.

Definition at line 58 of file TrackerFeatures.cpp.

Stop tracking the identified feature (with index for features array)

Reimplemented in alvar::TrackerFeaturesEC.

Definition at line 105 of file TrackerFeatures.cpp.

Stop tracking the identified feature (with feature id)

Reimplemented in alvar::TrackerFeaturesEC.

Definition at line 115 of file TrackerFeatures.cpp.

Create and get the pointer to new_features_mask.

Definition at line 216 of file TrackerFeatures.cpp.

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 in alvar::TrackerFeaturesEC.

Definition at line 122 of file TrackerFeatures.cpp.

Reset.

Reimplemented in alvar::TrackerFeaturesEC.

Definition at line 100 of file TrackerFeatures.cpp.

double alvar::TrackerFeatures::Reset ( IplImage *  img,
IplImage *  mask 
)

Reset track features on specified mask area.

Reimplemented in alvar::TrackerFeaturesEC.

Definition at line 201 of file TrackerFeatures.cpp.

double alvar::TrackerFeatures::Track ( IplImage *  img) [inline, virtual]

Track features.

Implements alvar::Tracker.

Definition at line 98 of file TrackerFeatures.h.

double alvar::TrackerFeatures::Track ( IplImage *  img,
bool  add_features 
)

Track features.

Definition at line 207 of file TrackerFeatures.cpp.

double alvar::TrackerFeatures::Track ( IplImage *  img,
IplImage *  mask 
)

Track features.

Definition at line 211 of file TrackerFeatures.cpp.

double alvar::TrackerFeatures::TrackHid ( IplImage *  img,
IplImage *  mask = NULL,
bool  add_features = true 
) [protected]

Reset track features on specified mask area.

Definition at line 140 of file TrackerFeatures.cpp.


Member Data Documentation

Track result: count of current features

Definition at line 70 of file TrackerFeatures.h.

Track result: current features

Definition at line 66 of file TrackerFeatures.h.

Definition at line 43 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::gray [protected]

Definition at line 51 of file TrackerFeatures.h.

Track result: ID:s for current features

Definition at line 74 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::img_eig [protected]

Definition at line 49 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::img_tmp [protected]

Definition at line 50 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::mask [protected]

Definition at line 55 of file TrackerFeatures.h.

Definition at line 47 of file TrackerFeatures.h.

Definition at line 45 of file TrackerFeatures.h.

Definition at line 46 of file TrackerFeatures.h.

Definition at line 56 of file TrackerFeatures.h.

Track result: count of previous features

Definition at line 68 of file TrackerFeatures.h.

Track result: previous features

Definition at line 64 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::prev_gray [protected]

Definition at line 52 of file TrackerFeatures.h.

Track result: ID:s for previous features

Definition at line 72 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::prev_pyramid [protected]

Definition at line 54 of file TrackerFeatures.h.

Definition at line 58 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::pyramid [protected]

Definition at line 53 of file TrackerFeatures.h.

Definition at line 44 of file TrackerFeatures.h.

char* alvar::TrackerFeatures::status [protected]

Definition at line 48 of file TrackerFeatures.h.

Definition at line 57 of file TrackerFeatures.h.

Definition at line 42 of file TrackerFeatures.h.

Definition at line 42 of file TrackerFeatures.h.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Sat Dec 28 2013 16:46:16