Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef TRACKERFEATURES_H
00025 #define TRACKERFEATURES_H
00026
00033 #include "Tracker.h"
00034
00035 namespace alvar {
00036
00040 class ALVAR_EXPORT TrackerFeatures : public Tracker {
00041 protected:
00042 int x_res, y_res;
00043 int frame_count;
00044 double quality_level;
00045 double min_distance;
00046 int min_features;
00047 int max_features;
00048 char *status;
00049 IplImage *img_eig;
00050 IplImage *img_tmp;
00051 IplImage *gray;
00052 IplImage *prev_gray;
00053 IplImage *pyramid;
00054 IplImage *prev_pyramid;
00055 IplImage *mask;
00056 int next_id;
00057 int win_size;
00058 int pyr_levels;
00059
00061 double TrackHid(IplImage *img, IplImage *mask=NULL, bool add_features=true);
00062 public:
00064 CvPoint2D32f *prev_features;
00066 CvPoint2D32f *features;
00068 int prev_feature_count;
00070 int feature_count;
00072 int *prev_ids;
00074 int *ids;
00084 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);
00086 ~TrackerFeatures();
00088 void ChangeSettings(int _max_features=100, int _min_features=90, double _quality_level=0.01, double _min_distance=10);
00090 void Reset();
00092 double Reset(IplImage *img, IplImage *mask);
00094 bool DelFeature(int index);
00096 bool DelFeatureId(int id);
00098 double Track(IplImage *img) { return Track(img, true); }
00100 double Track(IplImage *img, bool add_features);
00102 double Track(IplImage* img, IplImage* mask);
00104 int AddFeatures(IplImage *mask=NULL);
00106 IplImage *NewFeatureMask();
00111 int Purge();
00112 };
00113
00114 }
00115
00116 #endif