ViSP  2.10.0
mbtEdgeKltTracking.cpp
1 /****************************************************************************
2  *
3  * $Id: mbtTracking.cpp 3957 2012-11-07 15:22:30Z fnovotny $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Example of Hybrid Tracking of MBT and MBT KTL.
36  *
37  * Authors:
38  * Aurelien Yol
39  *
40  *****************************************************************************/
41 
48 #include <visp/vpConfig.h>
49 #include <visp/vpDebug.h>
50 #include <visp/vpDisplayD3D.h>
51 #include <visp/vpDisplayGTK.h>
52 #include <visp/vpDisplayGDI.h>
53 #include <visp/vpDisplayOpenCV.h>
54 #include <visp/vpDisplayX.h>
55 #include <visp/vpHomogeneousMatrix.h>
56 #include <visp/vpImageIo.h>
57 #include <visp/vpIoTools.h>
58 #include <visp/vpMath.h>
59 #include <visp/vpMbEdgeKltTracker.h>
60 #include <visp/vpVideoReader.h>
61 #include <visp/vpParseArgv.h>
62 
63 #if defined (VISP_HAVE_OPENCV) && defined (VISP_HAVE_DISPLAY) && (VISP_HAVE_OPENCV_VERSION >= 0x020100)
64 
65 
66 #define GETOPTARGS "x:m:i:n:dchtfCo"
67 
68 void usage(const char *name, const char *badparam);
69 bool getOptions(int argc, const char **argv, std::string &ipath, std::string &configFile, std::string &modelFile,
70  std::string &initFile, bool &displayFeatures, bool &click_allowed, bool &display,
71  bool& cao3DModel, bool& trackCylinder, bool &useOgre);
72 
73 void usage(const char *name, const char *badparam)
74 {
75  fprintf(stdout, "\n\
76 Example of tracking based on the 3D model.\n\
77 \n\
78 SYNOPSIS\n\
79  %s [-i <test image path>] [-x <config file>]\n\
80  [-m <model name>] [-n <initialisation file base name>]\n\
81  [-t] [-c] [-d] [-h] [-f] [-C]",
82  name );
83 
84  fprintf(stdout, "\n\
85 OPTIONS: \n\
86  -i <input image path> \n\
87  Set image input path.\n\
88  From this path read images \n\
89  \"ViSP-images/mbt/cube/image%%04d.ppm\". These \n\
90  images come from ViSP-images-x.y.z.tar.gz available \n\
91  on the ViSP website.\n\
92  Setting the VISP_INPUT_IMAGE_PATH environment\n\
93  variable produces the same behaviour than using\n\
94  this option.\n\
95 \n\
96  -x <config file> \n\
97  Set the config file (the xml file) to use.\n\
98  The config file is used to specify the parameters of the tracker.\n\
99 \n\
100  -m <model name> \n\
101  Specify the name of the file of the model\n\
102  The model can either be a vrml model (.wrl) or a .cao file.\n\
103 \n\
104  -f \n\
105  Do not use the vrml model, use the .cao one. These two models are \n\
106  equivalent and comes from ViSP-images-x.y.z.tar.gz available on the ViSP\n\
107  website. However, the .cao model allows to use the 3d model based tracker \n\
108  without Coin.\n\
109 \n\
110  -C \n\
111  Track only the cube (not the cylinder). In this case the models files are\n\
112  cube.cao or cube.wrl instead of cube_and_cylinder.cao and \n\
113  cube_and_cylinder.wrl.\n\
114 \n\
115  -n <initialisation file base name> \n\
116  Base name of the initialisation file. The file will be 'base_name'.init .\n\
117  This base name is also used for the optionnal picture specifying where to \n\
118  click (a .ppm picture).\
119 \n\
120  -t \n\
121  Turn off the display of the the moving edges and Klt points. \n\
122 \n\
123  -d \n\
124  Turn off the display.\n\
125 \n\
126  -c\n\
127  Disable the mouse click. Useful to automaze the \n\
128  execution of this program without humain intervention.\n\
129 \n\
130  -o\n\
131  Use Ogre3D for visibility tests\n\
132 \n\
133  -h \n\
134  Print the help.\n\n");
135 
136  if (badparam)
137  fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
138 }
139 
140 
141 bool getOptions(int argc, const char **argv, std::string &ipath, std::string &configFile, std::string &modelFile,
142  std::string &initFile, bool &displayFeatures, bool &click_allowed, bool &display,
143  bool& cao3DModel, bool& trackCylinder, bool &useOgre)
144 {
145  const char *optarg_;
146  int c;
147  while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg_)) > 1) {
148 
149  switch (c) {
150  case 'i': ipath = optarg_; break;
151  case 'x': configFile = optarg_; break;
152  case 'm': modelFile = optarg_; break;
153  case 'n': initFile = optarg_; break;
154  case 't': displayFeatures = false; break;
155  case 'f': cao3DModel = true; break;
156  case 'c': click_allowed = false; break;
157  case 'd': display = false; break;
158  case 'C': trackCylinder = false; break;
159  case 'o' : useOgre = true; break;
160  case 'h': usage(argv[0], NULL); return false; break;
161 
162  default:
163  usage(argv[0], optarg_);
164  return false; break;
165  }
166  }
167 
168  if ((c == 1) || (c == -1)) {
169  // standalone param or error
170  usage(argv[0], NULL);
171  std::cerr << "ERROR: " << std::endl;
172  std::cerr << " Bad argument " << optarg_ << std::endl << std::endl;
173  return false;
174  }
175 
176  return true;
177 }
178 
179 int
180 main(int argc, const char ** argv)
181 {
182  try {
183  std::string env_ipath;
184  std::string opt_ipath;
185  std::string ipath;
186  std::string opt_configFile;
187  std::string configFile;
188  std::string opt_modelFile;
189  std::string modelFile;
190  std::string opt_initFile;
191  std::string initFile;
192  bool displayFeatures = true;
193  bool opt_click_allowed = true;
194  bool opt_display = true;
195  bool cao3DModel = false;
196  bool trackCylinder = true;
197  bool useOgre = false;
198  bool quit = false;
199 
200  // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH environment variable value
201  env_ipath = vpIoTools::getViSPImagesDataPath();
202 
203  // Set the default input path
204  if (! env_ipath.empty())
205  ipath = env_ipath;
206 
207  // Read the command line options
208  if (!getOptions(argc, argv, opt_ipath, opt_configFile, opt_modelFile, opt_initFile, displayFeatures, opt_click_allowed, opt_display, cao3DModel, trackCylinder, useOgre)) {
209  return (-1);
210  }
211 
212  // Test if an input path is set
213  if (opt_ipath.empty() && env_ipath.empty() ){
214  usage(argv[0], NULL);
215  std::cerr << std::endl
216  << "ERROR:" << std::endl;
217  std::cerr << " Use -i <visp image path> option or set VISP_INPUT_IMAGE_PATH "
218  << std::endl
219  << " environment variable to specify the location of the " << std::endl
220  << " image path where test images are located." << std::endl
221  << std::endl;
222 
223  return (-1);
224  }
225 
226  // Get the option values
227  if (!opt_ipath.empty())
228  ipath = vpIoTools::createFilePath(opt_ipath, "ViSP-images/mbt/cube/image%04d.pgm");
229  else
230  ipath = vpIoTools::createFilePath(env_ipath, "ViSP-images/mbt/cube/image%04d.pgm");
231 
232  if (!opt_configFile.empty())
233  configFile = opt_configFile;
234  else if (!opt_ipath.empty())
235  configFile = vpIoTools::createFilePath(opt_ipath, "ViSP-images/mbt/cube.xml");
236  else
237  configFile = vpIoTools::createFilePath(env_ipath, "ViSP-images/mbt/cube.xml");
238 
239  if (!opt_modelFile.empty()){
240  modelFile = opt_modelFile;
241  }else{
242  std::string modelFileCao;
243  std::string modelFileWrl;
244  if(trackCylinder){
245  modelFileCao = "ViSP-images/mbt/cube_and_cylinder.cao";
246  modelFileWrl = "ViSP-images/mbt/cube_and_cylinder.wrl";
247  }else{
248  modelFileCao = "ViSP-images/mbt/cube.cao";
249  modelFileWrl = "ViSP-images/mbt/cube.wrl";
250  }
251 
252  if(!opt_ipath.empty()){
253  if(cao3DModel){
254  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
255  }
256  else{
257 #ifdef VISP_HAVE_COIN
258  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileWrl);
259 #else
260  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
261  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
262 #endif
263  }
264  }
265  else{
266  if(cao3DModel){
267  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
268  }
269  else{
270 #ifdef VISP_HAVE_COIN
271  modelFile = vpIoTools::createFilePath(env_ipath, modelFileWrl);
272 #else
273  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
274  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
275 #endif
276  }
277  }
278  }
279 
280  if (!opt_initFile.empty())
281  initFile = opt_initFile;
282  else if (!opt_ipath.empty())
283  initFile = vpIoTools::createFilePath(opt_ipath, "ViSP-images/mbt/cube");
284  else
285  initFile = vpIoTools::createFilePath(env_ipath, "ViSP-images/mbt/cube");
286 
288  vpVideoReader reader;
289 
290  reader.setFileName(ipath);
291  try{
292  reader.open(I);
293  }catch(...){
294  std::cout << "Cannot open sequence: " << ipath << std::endl;
295  return -1;
296  }
297 
298  reader.acquire(I);
299 
300  // initialise a display
301 #if defined VISP_HAVE_X11
302  vpDisplayX display;
303 #elif defined VISP_HAVE_GDI
304  vpDisplayGDI display;
305 #elif defined VISP_HAVE_OPENCV
306  vpDisplayOpenCV display;
307 #elif defined VISP_HAVE_D3D9
308  vpDisplayD3D display;
309 #elif defined VISP_HAVE_GTK
310  vpDisplayGTK display;
311 #else
312  opt_display = false;
313 #endif
314  if (opt_display)
315  {
316 #if (defined VISP_HAVE_DISPLAY)
317  display.init(I, 100, 100, "Test tracking") ;
318 #endif
319  vpDisplay::display(I) ;
320  vpDisplay::flush(I);
321  }
322 
323  vpMbEdgeKltTracker tracker;
325  vpCameraParameters cam;
326 
327  // Initialise the tracker: camera parameters, moving edge and KLT settings
328 #if defined (VISP_HAVE_XML2)
329  // From the xml file
330  tracker.loadConfigFile(configFile);
331 #else
332  // By setting the parameters:
333  cam.initPersProjWithoutDistortion(547, 542, 338, 234);
334 
335  vpMe me;
336  me.setMaskSize(5);
337  me.setMaskNumber(180);
338  me.setRange(7);
339  me.setThreshold(5000);
340  me.setMu1(0.5);
341  me.setMu2(0.5);
342  me.setSampleStep(4);
343  me.setNbTotalSample(250);
344 
345  vpKltOpencv klt;
346  klt.setMaxFeatures(10000);
347  klt.setWindowSize(5);
348  klt.setQuality(0.01);
349  klt.setMinDistance(5);
350  klt.setHarrisFreeParameter(0.01);
351  klt.setBlockSize(3);
352  klt.setPyramidLevels(3);
353 
354  tracker.setCameraParameters(cam);
355  tracker.setMovingEdge(me);
356  tracker.setKltOpencv(klt);
357  tracker.setAngleAppear( vpMath::rad(65) );
358  tracker.setAngleDisappear( vpMath::rad(75) );
359  tracker.setMaskBorder(5);
360 
361  // Specify the clipping to
362  tracker.setNearClippingDistance(0.01);
363  tracker.setFarClippingDistance(0.90);
365  // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING | vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING | vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
366 #endif
367 
368  // Display the moving edges, and the Klt points
369  tracker.setDisplayFeatures(displayFeatures);
370 
371  // Tells if the tracker has to use Ogre3D for visibility tests
372  tracker.setOgreVisibilityTest(useOgre);
373 
374  // Retrieve the camera parameters from the tracker
375  tracker.getCameraParameters(cam);
376 
377  // Loop to position the cube
378  if (opt_display && opt_click_allowed)
379  {
380  while(!vpDisplay::getClick(I,false)){
382  vpDisplay::displayText(I, 15, 10, "click after positioning the object", vpColor::red);
383  vpDisplay::flush(I) ;
384  }
385  }
386 
387  // Load the 3D model (either a vrml file or a .cao file)
388  tracker.loadModel(modelFile);
389 
390  // Initialise the tracker by clicking on the image
391  // This function looks for
392  // - a ./cube/cube.init file that defines the 3d coordinates (in meter, in the object basis) of the points used for the initialisation
393  // - a ./cube/cube.ppm file to display where the user have to click (optionnal, set by the third parameter)
394  if (opt_display && opt_click_allowed)
395  {
396  tracker.initClick(I, initFile, true);
397  tracker.getPose(cMo);
398  // display the 3D model at the given pose
399  tracker.display(I,cMo, cam, vpColor::red);
400  }
401  else
402  {
403  vpHomogeneousMatrix cMoi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
404  tracker.initFromPose(I, cMoi);
405  }
406 
407  //track the model
408  tracker.track(I);
409  tracker.getPose(cMo);
410 
411  if (opt_display)
412  vpDisplay::flush(I);
413 
414  // Uncomment if you want to compute the covariance matrix.
415  // tracker.setCovarianceComputation(true); //Important if you want tracker.getCovarianceMatrix() to work.
416 
417  while (!reader.end())
418  {
419  // acquire a new image
420  reader.acquire(I);
421  // display the image
422  if (opt_display)
424 
425  // Test to reset the tracker
426  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 10) {
427  vpTRACE("Test reset tracker");
428  if (opt_display)
430  tracker.resetTracker();
431 #if defined (VISP_HAVE_XML2)
432  tracker.loadConfigFile(configFile);
433 #else
434  // By setting the parameters:
435  cam.initPersProjWithoutDistortion(547, 542, 338, 234);
436 
437  vpMe me;
438  me.setMaskSize(5);
439  me.setMaskNumber(180);
440  me.setRange(7);
441  me.setThreshold(5000);
442  me.setMu1(0.5);
443  me.setMu2(0.5);
444  me.setSampleStep(4);
445  me.setNbTotalSample(250);
446 
447  vpKltOpencv klt;
448  klt.setMaxFeatures(10000);
449  klt.setWindowSize(5);
450  klt.setQuality(0.01);
451  klt.setMinDistance(5);
452  klt.setHarrisFreeParameter(0.01);
453  klt.setBlockSize(3);
454  klt.setPyramidLevels(3);
455 
456  tracker.setCameraParameters(cam);
457  tracker.setMovingEdge(me);
458  tracker.setKltOpencv(klt);
459  tracker.setAngleAppear( vpMath::rad(65) );
460  tracker.setAngleDisappear( vpMath::rad(75) );
461  tracker.setMaskBorder(5);
462 
463  // Specify the clipping to
464  tracker.setNearClippingDistance(0.01);
465  tracker.setFarClippingDistance(0.90);
467  // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING | vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING | vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
468 #endif
469  tracker.loadModel(modelFile);
470  tracker.setCameraParameters(cam);
471  tracker.setOgreVisibilityTest(useOgre);
472  tracker.initFromPose(I, cMo);
473  }
474 
475  // Test to set an initial pose
476  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 50) {
477  cMo.buildFrom(0.04371844921, 0.08438820979, 0.5382029442, 2.200417277, 0.873535825, -0.3479076844);
478  vpTRACE("Test set pose");
479  tracker.setPose(I, cMo);
480  if (opt_display) {
481  // display the 3D model
482  tracker.display(I, cMo, cam, vpColor::darkRed);
483  // display the frame
484  vpDisplay::displayFrame (I, cMo, cam, 0.05);
485 // if (opt_click_allowed) {
486 // vpDisplay::flush(I);
487 // vpDisplay::getClick(I);
488 // }
489  }
490  }
491 
492  // track the object: stop tracking from frame 40 to 50
493  if (reader.getFrameIndex() - reader.getFirstFrameIndex() < 40 || reader.getFrameIndex() > reader.getFirstFrameIndex() + 50) {
494  tracker.track(I);
495  tracker.getPose(cMo);
496  if (opt_display) {
497  // display the 3D model
498  tracker.display(I, cMo, cam, vpColor::darkRed);
499  // display the frame
500  vpDisplay::displayFrame (I, cMo, cam, 0.05);
501  }
502  }
503 
504  if (opt_click_allowed) {
505  vpDisplay::displayText(I, 10, 10, "Click to quit", vpColor::red);
506  if (vpDisplay::getClick(I, false)) {
507  quit = true;
508  break;
509  }
510  }
511 
512  // Uncomment if you want to print the covariance matrix.
513  // Make sure tracker.setCovarianceComputation(true) has been called (uncomment below).
514  // std::cout << tracker.getCovarianceMatrix() << std::endl << std::endl;
515 
516  vpDisplay::flush(I) ;
517  }
518  if (opt_click_allowed && !quit) {
520  }
521  reader.close();
522 
523 #if defined (VISP_HAVE_XML2)
524  // Cleanup memory allocated by xml library used to parse the xml config file in vpMbEdgeKltTracker::loadConfigFile()
526 #endif
527 
528 #if defined(VISP_HAVE_COIN) && (COIN_MAJOR_VERSION == 3)
529  // Cleanup memory allocated by Coin library used to load a vrml model in vpMbEdgeKltTracker::loadModel()
530  // We clean only if Coin was used.
531  if(! cao3DModel)
532  SoDB::finish();
533 #endif
534 
535  return 0;
536  }
537  catch(vpException e) {
538  std::cout << "Catch an exception: " << e << std::endl;
539  return 1;
540  }
541 }
542 
543 #else
544 
545 int main()
546 {
547  std::cout << "OpenCV and display are required." << std::endl;
548  return 0;
549 }
550 
551 #endif
void setKltOpencv(const vpKltOpencv &t)
void setMovingEdge(const vpMe &me)
long getFrameIndex() const
long getFirstFrameIndex() const
static std::string getViSPImagesDataPath()
Definition: vpIoTools.cpp:1071
void setHarrisFreeParameter(double harris_k)
virtual unsigned int getClipping() const
Definition: vpMbTracker.h:220
virtual void setAngleDisappear(const double &a)
Definition: vpMbTracker.h:400
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
#define vpTRACE
Definition: vpDebug.h:418
void setMaskNumber(const unsigned int &a)
Definition: vpMe.cpp:480
static const vpColor darkRed
Definition: vpColor.h:168
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:132
void setMaxFeatures(const int maxCount)
void setSampleStep(const double &s)
Definition: vpMe.h:271
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
Definition: vpDisplay.cpp:887
void setNbTotalSample(const int &nb)
Definition: vpMe.h:199
Define the X11 console to display images.
Definition: vpDisplayX.h:152
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
void setMinDistance(double minDistance)
error that can be emited by ViSP classes.
Definition: vpException.h:76
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const char *title=NULL)
Contains predetermined masks for sites and holds moving edges tracking parameters.
Definition: vpMe.h:70
virtual void setClipping(const unsigned int &flags)
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
static void flush(const vpImage< unsigned char > &I)
Definition: vpDisplay.cpp:2232
virtual void setFarClippingDistance(const double &dist)
void setMu1(const double &mu_1)
Definition: vpMe.h:171
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
Definition: vpParseArgv.cpp:80
static const vpColor red
Definition: vpColor.h:167
void setQuality(double qualityLevel)
void initPersProjWithoutDistortion(const double px, const double py, const double u0, const double v0)
void open(vpImage< vpRGBa > &I)
virtual void setOgreVisibilityTest(const bool &v)
Display for windows using Direct3D.
Definition: vpDisplayD3D.h:109
void setMaskSize(const unsigned int &a)
Definition: vpMe.cpp:488
void getPose(vpHomogeneousMatrix &cMo_) const
Definition: vpMbTracker.h:328
static std::string createFilePath(const std::string &parent, const std::string child)
Definition: vpIoTools.cpp:1245
static void display(const vpImage< unsigned char > &I)
Definition: vpDisplay.cpp:210
The vpDisplayOpenCV allows to display image using the opencv library.
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)
virtual void track(const vpImage< unsigned char > &I)
virtual void getCameraParameters(vpCameraParameters &camera) const
Definition: vpMbTracker.h:213
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, const unsigned int thickness=1, const bool displayFullModel=false)
Generic class defining intrinsic camera parameters.
The vpDisplayGTK allows to display image using the GTK+ library version 1.2.
Definition: vpDisplayGTK.h:145
void acquire(vpImage< vpRGBa > &I)
static void displayFrame(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color=vpColor::none, unsigned int thickness=1)
Definition: vpDisplay.cpp:375
void setFileName(const char *filename)
virtual void setAngleAppear(const double &a)
Definition: vpMbTracker.h:389
void loadConfigFile(const char *configFile)
virtual void initClick(const vpImage< unsigned char > &I, const std::string &initFile, const bool displayHelp=false)
void setPyramidLevels(const int pyrMaxLevel)
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
Construction from translation vector and rotation matrix.
static double rad(double deg)
Definition: vpMath.h:100
virtual void setCameraParameters(const vpCameraParameters &cam)
Hybrid tracker based on moving-edges and keypoints tracked using KLT tracker.
static void cleanup()
Definition: vpXmlParser.h:220
void setMu2(const double &mu_2)
Definition: vpMe.h:185
void setWindowSize(const int winSize)
void setMaskBorder(const unsigned int &e)
virtual void loadModel(const char *modelFile, const bool verbose=false)
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV.
Definition: vpKltOpencv.h:79
void setBlockSize(const int blockSize)
void setThreshold(const double &t)
Definition: vpMe.h:299
virtual bool getClick(bool blocking=true)=0
void setDisplayFeatures(const bool displayF)
Definition: vpMbTracker.h:431
void setRange(const unsigned int &r)
Definition: vpMe.h:229
virtual void setNearClippingDistance(const double &dist)