Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
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]

Public Member Functions

int AddFeatures (IplImage *mask=NULL)
 add features to the previously tracked frame if there are less than min_features More...
 
void ChangeSettings (int _max_features=100, int _min_features=90, double _quality_level=0.01, double _min_distance=10)
 Change settings while running. More...
 
bool DelFeature (int index)
 Stop tracking the identified feature (with index for features array) More...
 
bool DelFeatureId (int id)
 Stop tracking the identified feature (with feature id) More...
 
IplImage * NewFeatureMask ()
 Create and get the pointer to new_features_mask. More...
 
int Purge ()
 Purge features that are considerably closer than the defined min_distance. More...
 
void Reset ()
 Reset. More...
 
double Reset (IplImage *img, IplImage *mask)
 Reset track features on specified mask area. More...
 
double Track (IplImage *img)
 Track features. More...
 
double Track (IplImage *img, bool add_features)
 Track features. More...
 
double Track (IplImage *img, IplImage *mask)
 Track features. More...
 
 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. More...
 
 ~TrackerFeatures ()
 Destructor. More...
 
- Public Member Functions inherited from alvar::Tracker
virtual void Compensate (double *x, double *y)
 
 Tracker ()
 

Public Attributes

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

Protected Member Functions

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

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.

alvar::TrackerFeatures::~TrackerFeatures ( )

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.

bool alvar::TrackerFeatures::DelFeature ( int  index)

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

Definition at line 105 of file TrackerFeatures.cpp.

bool alvar::TrackerFeatures::DelFeatureId ( int  id)

Stop tracking the identified feature (with feature id)

Definition at line 115 of file TrackerFeatures.cpp.

IplImage * alvar::TrackerFeatures::NewFeatureMask ( )

Create and get the pointer to new_features_mask.

Definition at line 216 of file TrackerFeatures.cpp.

int alvar::TrackerFeatures::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

Examples:
SampleTrack.cpp.

Definition at line 122 of file TrackerFeatures.cpp.

void alvar::TrackerFeatures::Reset ( )

Reset.

Examples:
SampleTrack.cpp.

Definition at line 100 of file TrackerFeatures.cpp.

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

Reset track features on specified mask area.

Definition at line 201 of file TrackerFeatures.cpp.

double alvar::TrackerFeatures::Track ( IplImage *  img)
inlinevirtual

Track features.

Implements alvar::Tracker.

Examples:
SampleTrack.cpp.

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

int alvar::TrackerFeatures::feature_count

Track result: count of current features

Examples:
SampleTrack.cpp.

Definition at line 70 of file TrackerFeatures.h.

CvPoint2D32f* alvar::TrackerFeatures::features

Track result: current features

Examples:
SampleTrack.cpp.

Definition at line 66 of file TrackerFeatures.h.

int alvar::TrackerFeatures::frame_count
protected

Definition at line 43 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::gray
protected

Definition at line 51 of file TrackerFeatures.h.

int* alvar::TrackerFeatures::ids

Track result: ID:s for current features

Examples:
SampleTrack.cpp.

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.

int alvar::TrackerFeatures::max_features
protected

Definition at line 47 of file TrackerFeatures.h.

double alvar::TrackerFeatures::min_distance
protected

Definition at line 45 of file TrackerFeatures.h.

int alvar::TrackerFeatures::min_features
protected

Definition at line 46 of file TrackerFeatures.h.

int alvar::TrackerFeatures::next_id
protected

Definition at line 56 of file TrackerFeatures.h.

int alvar::TrackerFeatures::prev_feature_count

Track result: count of previous features

Definition at line 68 of file TrackerFeatures.h.

CvPoint2D32f* alvar::TrackerFeatures::prev_features

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.

int* alvar::TrackerFeatures::prev_ids

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.

int alvar::TrackerFeatures::pyr_levels
protected

Definition at line 58 of file TrackerFeatures.h.

IplImage* alvar::TrackerFeatures::pyramid
protected

Definition at line 53 of file TrackerFeatures.h.

double alvar::TrackerFeatures::quality_level
protected

Definition at line 44 of file TrackerFeatures.h.

char* alvar::TrackerFeatures::status
protected

Definition at line 48 of file TrackerFeatures.h.

int alvar::TrackerFeatures::win_size
protected

Definition at line 57 of file TrackerFeatures.h.

int alvar::TrackerFeatures::x_res
protected

Definition at line 42 of file TrackerFeatures.h.

int alvar::TrackerFeatures::y_res
protected

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 Mon Jun 10 2019 12:47:05