TrackerFeatures.h
Go to the documentation of this file.
1 /*
2  * This file is part of ALVAR, A Library for Virtual and Augmented Reality.
3  *
4  * Copyright 2007-2012 VTT Technical Research Centre of Finland
5  *
6  * Contact: VTT Augmented Reality Team <alvar.info@vtt.fi>
7  * <http://www.vtt.fi/multimedia/alvar.html>
8  *
9  * ALVAR is free software; you can redistribute it and/or modify it under the
10  * terms of the GNU Lesser General Public License as published by the Free
11  * Software Foundation; either version 2.1 of the License, or (at your option)
12  * any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
17  * for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with ALVAR; if not, see
21  * <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>.
22  */
23 
24 #ifndef TRACKERFEATURES_H
25 #define TRACKERFEATURES_H
26 
33 #include "Tracker.h"
34 
35 namespace alvar {
36 
41 protected:
42  int x_res, y_res;
44  double quality_level;
45  double min_distance;
48  char *status;
49  IplImage *img_eig;
50  IplImage *img_tmp;
51  IplImage *gray;
52  IplImage *prev_gray;
53  IplImage *pyramid;
54  IplImage *prev_pyramid;
55  IplImage *mask;
56  int next_id;
57  int win_size;
59 
61  double TrackHid(IplImage *img, IplImage *mask=NULL, bool add_features=true);
62 public:
64  CvPoint2D32f *prev_features;
66  CvPoint2D32f *features;
72  int *prev_ids;
74  int *ids;
84  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);
86  ~TrackerFeatures();
88  void ChangeSettings(int _max_features=100, int _min_features=90, double _quality_level=0.01, double _min_distance=10);
90  void Reset();
92  double Reset(IplImage *img, IplImage *mask);
94  bool DelFeature(int index);
96  bool DelFeatureId(int id);
98  double Track(IplImage *img) { return Track(img, true); }
100  double Track(IplImage *img, bool add_features);
102  double Track(IplImage* img, IplImage* mask);
104  int AddFeatures(IplImage *mask=NULL);
106  IplImage *NewFeatureMask();
111  int Purge();
112 };
113 
114 } // namespace alvar
115 
116 #endif
Main ALVAR namespace.
Definition: Alvar.h:174
This file implements a tracking interface.
CvPoint2D32f * features
Track result: current features
double Track(IplImage *img)
Track features.
int prev_feature_count
Track result: count of previous features
int * prev_ids
Track result: ID:s for previous features
CvPoint2D32f * prev_features
Track result: previous features
Pure virtual base class for tracking optical flow.
Definition: Tracker.h:43
int feature_count
Track result: count of current features
TrackerFeatures tracks features using OpenCV&#39;s cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK ...
#define ALVAR_EXPORT
Definition: Alvar.h:168
int * ids
Track result: ID:s for current features


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Mon Jun 10 2019 12:47:04