54 #include <visp/vpConfig.h>
56 #ifdef VISP_HAVE_OPENCV
59 #pragma package <opencv>
62 #if (VISP_HAVE_OPENCV_VERSION >= 0x020101) // Require opencv >= 2.1.1
63 # include <opencv2/imgproc/imgproc.hpp>
64 # include <opencv2/video/tracking.hpp>
65 # include <opencv2/legacy/legacy.hpp>
66 # include <opencv2/highgui/highgui.hpp>
76 #include <visp/vpConfig.h>
77 #include <visp/vpImage.h>
78 #include <visp/vpImageIo.h>
79 #include <visp/vpDisplay.h>
80 #include <visp/vpDebug.h>
81 #include <visp/vpException.h>
82 #include <visp/vpTrackingException.h>
84 typedef int (*funccheck)(int,double,double);
85 typedef void (*funcinfo)(int,int,int,double,double);
86 typedef void (*funcevent)(int);
147 int globalcountFeatures;
154 double harris_free_parameter;
161 IplImage *prev_image;
163 IplImage *prev_pyramid;
167 int countPrevFeatures;
169 CvPoint2D32f *features;
170 CvPoint2D32f *prev_features;
173 long *prev_featuresid;
179 bool *lostDuringTrack;
185 funcevent OnInitialize;
186 funcinfo OnFeatureLost;
187 funcinfo OnNewFeature;
188 funcinfo OnMeasureFeature;
189 funccheck IsFeatureValid;
204 void initTracking(
const IplImage *I,
const IplImage *mask = NULL);
207 void track(
const IplImage *I);
214 void setInitialGuess(CvPoint2D32f **guess_pts);
217 void setMaxFeatures(
const int input);
227 void setQuality(
double input) {initialized = 0; quality=input;}
255 void setBlockSize(
const int input) {initialized = 0; block_size=input;}
256 void setUseHarris(
const int input) {initialized = 0; use_harris=input;}
311 void getFeature(
int index,
int &
id,
float &x,
float &y)
const;
312 void getPrevFeature(
int index,
int &
id,
float &x,
float &y)
const;
313 void addFeature(
const int &
id,
const float &x,
const float &y);
314 void suppressFeature(
int index);
320 unsigned int thickness=1);
321 static void display(
const vpImage<vpRGBa>& I,
const CvPoint2D32f* features_list,
323 unsigned int thickness=1);
326 const long *featuresid_list,
const int &nbFeatures,
328 static void display(
const vpImage<vpRGBa>& I,
const CvPoint2D32f* features_list,
329 const long *featuresid_list,
const int &nbFeatures,