TrackerFeatures.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of ALVAR, A Library for Virtual and Augmented Reality.
00003  *
00004  * Copyright 2007-2012 VTT Technical Research Centre of Finland
00005  *
00006  * Contact: VTT Augmented Reality Team <alvar.info@vtt.fi>
00007  *          <http://www.vtt.fi/multimedia/alvar.html>
00008  *
00009  * ALVAR is free software; you can redistribute it and/or modify it under the
00010  * terms of the GNU Lesser General Public License as published by the Free
00011  * Software Foundation; either version 2.1 of the License, or (at your option)
00012  * any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful, but WITHOUT
00015  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00016  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
00017  * for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public License
00020  * along with ALVAR; if not, see
00021  * <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>.
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 } // namespace alvar
00115 
00116 #endif


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Thu Jun 6 2019 21:12:54