Visual Servoing Platform  version 3.1.0
mbtKltMultiTracking.cpp
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * See the file LICENSE.txt at the root directory of this source
11  * distribution for additional information about the GNU GPL.
12  *
13  * For using ViSP with software that can not be combined with the GNU
14  * GPL, please contact Inria about acquiring a ViSP Professional
15  * Edition License.
16  *
17  * See http://visp.inria.fr for more information.
18  *
19  * This software was developed at:
20  * Inria Rennes - Bretagne Atlantique
21  * Campus Universitaire de Beaulieu
22  * 35042 Rennes Cedex
23  * France
24  *
25  * If you have questions regarding the use of this file, please contact
26  * Inria at visp@inria.fr
27  *
28  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30  *
31  * Description:
32  * Example of MBT KLT Tracking.
33  *
34  * Authors:
35  * Aurelien Yol
36  * Souriya Trinh
37  *
38  *****************************************************************************/
39 
46 #include <iostream>
47 #include <visp3/core/vpConfig.h>
48 
49 #if defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && \
50  defined(VISP_HAVE_DISPLAY) && (VISP_HAVE_OPENCV_VERSION >= 0x020100)
51 
52 #include <visp3/core/vpDebug.h>
53 #include <visp3/core/vpHomogeneousMatrix.h>
54 #include <visp3/core/vpIoTools.h>
55 #include <visp3/core/vpMath.h>
56 #include <visp3/gui/vpDisplayD3D.h>
57 #include <visp3/gui/vpDisplayGDI.h>
58 #include <visp3/gui/vpDisplayGTK.h>
59 #include <visp3/gui/vpDisplayOpenCV.h>
60 #include <visp3/gui/vpDisplayX.h>
61 #include <visp3/io/vpImageIo.h>
62 #include <visp3/io/vpParseArgv.h>
63 #include <visp3/io/vpVideoReader.h>
64 #include <visp3/mbt/vpMbKltMultiTracker.h>
65 
66 #define GETOPTARGS "x:m:i:n:de:chtfolwv"
67 
68 void usage(const char *name, const char *badparam)
69 {
70  fprintf(stdout, "\n\
71 Example of tracking based on the 3D model.\n\
72 \n\
73 SYNOPSIS\n\
74  %s [-i <test image path>] [-x <config file>]\n\
75  [-m <model name>] [-n <initialisation file base name>] [-e <last frame index>] \n\
76  [-t] [-c] [-d] [-h] [-f] [-o] [-w] [-l] [-v]\n", name);
77 
78  fprintf(stdout, "\n\
79 OPTIONS: \n\
80  -i <input image path> \n\
81  Set image input path.\n\
82  From this path read images \n\
83  \"mbt/cube/image%%04d.ppm\". These \n\
84  images come from ViSP-images-x.y.z.tar.gz available \n\
85  on the ViSP website.\n\
86  Setting the VISP_INPUT_IMAGE_PATH environment\n\
87  variable produces the same behavior than using\n\
88  this option.\n\
89 \n\
90  -x <config file> \n\
91  Set the config file (the xml file) to use.\n\
92  The config file is used to specify the parameters of the tracker.\n\
93 \n\
94  -m <model name> \n\
95  Specify the name of the file of the model\n\
96  The model can either be a vrml model (.wrl) or a .cao file.\n\
97 \n\
98  -e <last frame index> \n\
99  Specify the index of the last frame. Once reached, the tracking is stopped\n\
100 \n\
101  -f \n\
102  Do not use the vrml model, use the .cao one. These two models are \n\
103  equivalent and comes from ViSP-images-x.y.z.tar.gz available on the ViSP\n\
104  website. However, the .cao model allows to use the 3d model based tracker \n\
105  without Coin.\n\
106 \n\
107  -n <initialisation file base name> \n\
108  Base name of the initialisation file. The file will be 'base_name'.init .\n\
109  This base name is also used for the optional picture specifying where to \n\
110  click (a .ppm picture).\n\
111 \n\
112  -t \n\
113  Turn off the display of the the klt points. \n\
114 \n\
115  -d \n\
116  Turn off the display.\n\
117 \n\
118  -c\n\
119  Disable the mouse click. Useful to automate the \n\
120  execution of this program without human intervention.\n\
121 \n\
122  -o\n\
123  Use Ogre3D for visibility tests\n\
124 \n\
125  -w\n\
126  When Ogre3D is enable [-o] show Ogre3D configuration dialog that allows to set the renderer.\n\
127 \n\
128  -l\n\
129  Use the scanline for visibility tests.\n\
130 \n\
131  -v\n\
132  Compute covariance matrix.\n\
133 \n\
134  -h \n\
135  Print the help.\n\n");
136 
137  if (badparam)
138  fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
139 }
140 
141 bool getOptions(int argc, const char **argv, std::string &ipath, std::string &configFile, std::string &modelFile,
142  std::string &initFile, long &lastFrame, bool &displayKltPoints, bool &click_allowed, bool &display,
143  bool &cao3DModel, bool &useOgre, bool &showOgreConfigDialog, bool &useScanline, bool &computeCovariance)
144 {
145  const char *optarg_;
146  int c;
147  while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg_)) > 1) {
148 
149  switch (c) {
150  case 'e':
151  lastFrame = atol(optarg_);
152  break;
153  case 'i':
154  ipath = optarg_;
155  break;
156  case 'x':
157  configFile = optarg_;
158  break;
159  case 'm':
160  modelFile = optarg_;
161  break;
162  case 'n':
163  initFile = optarg_;
164  break;
165  case 't':
166  displayKltPoints = false;
167  break;
168  case 'f':
169  cao3DModel = true;
170  break;
171  case 'c':
172  click_allowed = false;
173  break;
174  case 'd':
175  display = false;
176  break;
177  case 'o':
178  useOgre = true;
179  break;
180  case 'l':
181  useScanline = true;
182  break;
183  case 'w':
184  showOgreConfigDialog = true;
185  break;
186  case 'v':
187  computeCovariance = true;
188  break;
189  case 'h':
190  usage(argv[0], NULL);
191  return false;
192  break;
193 
194  default:
195  usage(argv[0], optarg_);
196  return false;
197  break;
198  }
199  }
200 
201  if ((c == 1) || (c == -1)) {
202  // standalone param or error
203  usage(argv[0], NULL);
204  std::cerr << "ERROR: " << std::endl;
205  std::cerr << " Bad argument " << optarg_ << std::endl << std::endl;
206  return false;
207  }
208 
209  return true;
210 }
211 
212 int main(int argc, const char **argv)
213 {
214  try {
215  std::string env_ipath;
216  std::string opt_ipath;
217  std::string ipath;
218  std::string opt_configFile;
219  std::string configFile;
220  std::string opt_modelFile;
221  std::string modelFile;
222  std::string opt_initFile;
223  std::string initFile;
224  long opt_lastFrame = -1;
225  bool displayKltPoints = true;
226  bool opt_click_allowed = true;
227  bool opt_display = true;
228  bool cao3DModel = false;
229  bool useOgre = false;
230  bool showOgreConfigDialog = false;
231  bool useScanline = false;
232  bool computeCovariance = false;
233  bool quit = false;
234 
235  // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH
236  // environment variable value
237  env_ipath = vpIoTools::getViSPImagesDataPath();
238 
239  // Set the default input path
240  if (!env_ipath.empty())
241  ipath = env_ipath;
242 
243  // Read the command line options
244  if (!getOptions(argc, argv, opt_ipath, opt_configFile, opt_modelFile, opt_initFile, opt_lastFrame, displayKltPoints,
245  opt_click_allowed, opt_display, cao3DModel, useOgre, showOgreConfigDialog, useScanline,
246  computeCovariance)) {
247  return (-1);
248  }
249 
250  // Test if an input path is set
251  if (opt_ipath.empty() && env_ipath.empty()) {
252  usage(argv[0], NULL);
253  std::cerr << std::endl << "ERROR:" << std::endl;
254  std::cerr << " Use -i <visp image path> option or set VISP_INPUT_IMAGE_PATH " << std::endl
255  << " environment variable to specify the location of the " << std::endl
256  << " image path where test images are located." << std::endl
257  << std::endl;
258 
259  return (-1);
260  }
261 
262  // Get the option values
263  if (!opt_ipath.empty())
264  ipath = vpIoTools::createFilePath(opt_ipath, "mbt/cube/image%04d.pgm");
265  else
266  ipath = vpIoTools::createFilePath(env_ipath, "mbt/cube/image%04d.pgm");
267 
268  if (!opt_configFile.empty())
269  configFile = opt_configFile;
270  else if (!opt_ipath.empty())
271  configFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube.xml");
272  else
273  configFile = vpIoTools::createFilePath(env_ipath, "mbt/cube.xml");
274 
275  if (!opt_modelFile.empty()) {
276  modelFile = opt_modelFile;
277  } else {
278  std::string modelFileCao = "mbt/cube.cao";
279  std::string modelFileWrl = "mbt/cube.wrl";
280 
281  if (!opt_ipath.empty()) {
282  if (cao3DModel) {
283  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
284  } else {
285 #ifdef VISP_HAVE_COIN3D
286  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileWrl);
287 #else
288  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
289  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
290 #endif
291  }
292  } else {
293  if (cao3DModel) {
294  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
295  } else {
296 #ifdef VISP_HAVE_COIN3D
297  modelFile = vpIoTools::createFilePath(env_ipath, modelFileWrl);
298 #else
299  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
300  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
301 #endif
302  }
303  }
304  }
305 
306  if (!opt_initFile.empty())
307  initFile = opt_initFile;
308  else if (!opt_ipath.empty())
309  initFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube");
310  else
311  initFile = vpIoTools::createFilePath(env_ipath, "mbt/cube");
312 
313  vpImage<unsigned char> I1, I2;
314  vpVideoReader reader;
315 
316  reader.setFileName(ipath);
317  try {
318  reader.open(I1);
319  I2 = I1;
320  } catch (...) {
321  std::cout << "Cannot open sequence: " << ipath << std::endl;
322  return -1;
323  }
324 
325  if (opt_lastFrame > 1 && opt_lastFrame < reader.getLastFrameIndex())
326  reader.setLastFrameIndex(opt_lastFrame);
327 
328  reader.acquire(I1);
329  I2 = I1;
330 
331 // initialise a display
332 #if defined VISP_HAVE_X11
333  vpDisplayX display1, display2;
334 #elif defined VISP_HAVE_GDI
335  vpDisplayGDI display1, display2;
336 #elif defined VISP_HAVE_OPENCV
337  vpDisplayOpenCV display1, display2;
338 #elif defined VISP_HAVE_D3D9
339  vpDisplayD3D display1, display2;
340 #elif defined VISP_HAVE_GTK
341  vpDisplayGTK display1, display2;
342 #else
343  opt_display = false;
344 #endif
345  if (opt_display) {
346 #if (defined VISP_HAVE_DISPLAY)
349  display1.init(I1, 100, 100, "Test tracking (Left)");
350  display2.init(I2, (int)I1.getWidth() / vpDisplay::getDownScalingFactor(I1) + 110, 100, "Test tracking (Right)");
351 #endif
352  vpDisplay::display(I1);
353  vpDisplay::display(I2);
354  vpDisplay::flush(I1);
355  vpDisplay::flush(I2);
356  }
357 
358  vpMbKltMultiTracker tracker(2);
359  vpHomogeneousMatrix c1Mo, c2Mo;
360 
361  // Load tracker config file (camera parameters and moving edge settings)
362  vpCameraParameters cam1, cam2;
363 #if defined(VISP_HAVE_XML2)
364  // From the xml file
365  tracker.loadConfigFile(configFile, configFile);
366 #else
367  // By setting the parameters:
368  cam1.initPersProjWithoutDistortion(547, 542, 338, 234);
369  cam2.initPersProjWithoutDistortion(547, 542, 338, 234);
370 
371  vpKltOpencv klt;
372  klt.setMaxFeatures(10000);
373  klt.setWindowSize(5);
374  klt.setQuality(0.01);
375  klt.setMinDistance(5);
376  klt.setHarrisFreeParameter(0.01);
377  klt.setBlockSize(3);
378  klt.setPyramidLevels(3);
379 
380  tracker.setCameraParameters(cam1, cam2);
381  tracker.setKltOpencv(klt);
382  tracker.setKltMaskBorder(5);
383  tracker.setAngleAppear(vpMath::rad(65));
384  tracker.setAngleDisappear(vpMath::rad(75));
385 
386  // Specify the clipping to use
387  tracker.setNearClippingDistance(0.01);
388  tracker.setFarClippingDistance(0.90);
389  tracker.setClipping(tracker.getClipping() | vpMbtPolygon::FOV_CLIPPING);
390 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
391 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
392 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
393 #endif
394 
395  // Display the klt points
396  tracker.setDisplayFeatures(displayKltPoints);
397 
398  // Tells if the tracker has to use Ogre3D for visibility tests
399  tracker.setOgreVisibilityTest(useOgre);
400  if (useOgre)
401  tracker.setOgreShowConfigDialog(showOgreConfigDialog);
402 
403  // Tells if the tracker has to use the scanline visibility tests
404  tracker.setScanLineVisibilityTest(useScanline);
405 
406  // Tells if the tracker has to compute the covariance matrix
407  tracker.setCovarianceComputation(computeCovariance);
408 
409  // Retrieve the camera parameters from the tracker
410  tracker.getCameraParameters(cam1, cam2);
411 
412  // Loop to position the cube
413  if (opt_display && opt_click_allowed) {
414  while (!vpDisplay::getClick(I1, false)) {
415  vpDisplay::display(I1);
416  vpDisplay::displayText(I1, 15, 10, "click after positioning the object", vpColor::red);
417  vpDisplay::flush(I1);
418  vpTime::wait(100);
419  }
420  }
421 
422  // Load the 3D model (either a vrml file or a .cao file)
423  tracker.loadModel(modelFile);
424 
425  // Initialise the tracker by clicking on the image
426  // This function looks for
427  // - a ./cube/cube.init file that defines the 3d coordinates (in meter,
428  // in the object basis) of the points used for the initialisation
429  // - a ./cube/cube.ppm file to display where the user have to click
430  // (optionnal, set by the third parameter)
431  if (opt_display && opt_click_allowed) {
432  tracker.initClick(I1, I2, initFile, initFile, true);
433  tracker.getPose(c1Mo, c2Mo);
434  // display the 3D model at the given pose
435  tracker.display(I1, I2, c1Mo, c2Mo, cam1, cam2, vpColor::red);
436  } else {
437  vpHomogeneousMatrix c1Moi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
438  vpHomogeneousMatrix c2Moi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
439  tracker.initFromPose(I1, I2, c1Moi, c2Moi);
440  }
441 
442  // track the model
443  tracker.track(I1, I2);
444  tracker.getPose(c1Mo, c2Mo);
445 
446  if (opt_display) {
447  vpDisplay::flush(I1);
448  vpDisplay::flush(I2);
449  }
450 
451  while (!reader.end()) {
452  // acquire a new image
453  reader.acquire(I1);
454  I2 = I1;
455  // display the image
456  if (opt_display) {
457  vpDisplay::display(I1);
458  vpDisplay::display(I2);
459  }
460 
461  // Test to reset the tracker
462  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 10) {
463  std::cout << "----------Test reset tracker----------" << std::endl;
464  if (opt_display) {
465  vpDisplay::display(I1);
466  vpDisplay::display(I2);
467  }
468  tracker.resetTracker();
469 #if defined(VISP_HAVE_XML2)
470  tracker.loadConfigFile(configFile, configFile);
471 #else
472  // By setting the parameters:
473  cam1.initPersProjWithoutDistortion(547, 542, 338, 234);
474  cam2.initPersProjWithoutDistortion(547, 542, 338, 234);
475 
476  vpKltOpencv klt;
477  klt.setMaxFeatures(10000);
478  klt.setWindowSize(5);
479  klt.setQuality(0.01);
480  klt.setMinDistance(5);
481  klt.setHarrisFreeParameter(0.01);
482  klt.setBlockSize(3);
483  klt.setPyramidLevels(3);
484 
485  tracker.setCameraParameters(cam1, cam2);
486  tracker.setKltOpencv(klt);
487  tracker.setKltMaskBorder(5);
488  tracker.setAngleAppear(vpMath::rad(65));
489  tracker.setAngleDisappear(vpMath::rad(75));
490 
491  // Specify the clipping to use
492  tracker.setNearClippingDistance(0.01);
493  tracker.setFarClippingDistance(0.90);
494  tracker.setClipping(tracker.getClipping() | vpMbtPolygon::FOV_CLIPPING);
495 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
496 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
497 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
498 #endif
499  tracker.loadModel(modelFile);
500  tracker.setCameraParameters(cam1, cam2);
501  tracker.setOgreVisibilityTest(useOgre);
502  tracker.setScanLineVisibilityTest(useScanline);
503  tracker.setCovarianceComputation(computeCovariance);
504  tracker.initFromPose(I1, I2, c1Mo, c2Mo);
505  }
506 
507  // Test to set an initial pose
508  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 50) {
509  c1Mo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
510  c2Mo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
511  std::cout << "Test set pose" << std::endl;
512  tracker.setPose(I1, I2, c1Mo, c2Mo);
513  }
514 
515  // track the object: stop tracking from frame 40 to 50
516  if (reader.getFrameIndex() - reader.getFirstFrameIndex() < 40 ||
517  reader.getFrameIndex() - reader.getFirstFrameIndex() >= 50) {
518  tracker.track(I1, I2);
519  tracker.getPose(c1Mo, c2Mo);
520  if (opt_display) {
521  // display the 3D model
522  tracker.display(I1, I2, c1Mo, c2Mo, cam1, cam2, vpColor::darkRed);
523  // display the frame
524  vpDisplay::displayFrame(I1, c1Mo, cam1, 0.05);
525  vpDisplay::displayFrame(I2, c2Mo, cam2, 0.05);
526  }
527  }
528 
529  if (opt_click_allowed) {
530  vpDisplay::displayText(I1, 10, 10, "Click to quit", vpColor::red);
531  if (vpDisplay::getClick(I1, false)) {
532  quit = true;
533  break;
534  }
535  }
536 
537  if (computeCovariance) {
538  std::cout << "Covariance matrix: \n" << tracker.getCovarianceMatrix() << std::endl << std::endl;
539  }
540 
541  vpDisplay::flush(I1);
542  vpDisplay::flush(I2);
543  }
544 
545  std::cout << "Reached last frame: " << reader.getFrameIndex() << std::endl;
546 
547  if (opt_click_allowed && !quit) {
549  }
550 
551  reader.close();
552 
553 #if defined(VISP_HAVE_XML2)
554  // Cleanup memory allocated by xml library used to parse the xml config
555  // file in vpMbKltTracker::loadConfigFile()
557 #endif
558 
559 #if defined(VISP_HAVE_COIN3D) && (COIN_MAJOR_VERSION == 2 || COIN_MAJOR_VERSION == 3)
560  // Cleanup memory allocated by Coin library used to load a vrml model in
561  // vpMbKltTracker::loadModel() We clean only if Coin was used.
562  if (!cao3DModel)
563  SoDB::finish();
564 #endif
565 
566  return 0;
567  } catch (vpException &e) {
568  std::cout << "Catch an exception: " << e << std::endl;
569  return 1;
570  }
571 }
572 
573 #else
574 
575 int main()
576 {
577  std::cout << "visp_mbt, visp_gui modules and OpenCV are required to run "
578  "this example."
579  << std::endl;
580  return 0;
581 }
582 
583 #endif
VISP_EXPORT int wait(double t0, double t)
Definition: vpTime.cpp:150
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static std::string getViSPImagesDataPath()
Definition: vpIoTools.cpp:1210
void setHarrisFreeParameter(double harris_k)
Implementation of an homogeneous matrix and operations on such kind of matrices.
virtual void setDownScalingFactor(unsigned int scale)
Definition: vpDisplay.cpp:232
static const vpColor darkRed
Definition: vpColor.h:181
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:129
void setMaxFeatures(const int maxCount)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
Definition: vpDisplayX.h:151
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:71
static void flush(const vpImage< unsigned char > &I)
long getFirstFrameIndex()
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
Definition: vpParseArgv.cpp:69
static const vpColor red
Definition: vpColor.h:180
void setQuality(double qualityLevel)
void initPersProjWithoutDistortion(const double px, const double py, const double u0, const double v0)
void open(vpImage< vpRGBa > &I)
long getLastFrameIndex()
Display for windows using Direct3D 3rd party. Thus to enable this class Direct3D should be installed...
Definition: vpDisplayD3D.h:107
static std::string createFilePath(const std::string &parent, const std::string &child)
Definition: vpIoTools.cpp:1435
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Generic class defining intrinsic camera parameters.
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
Definition: vpDisplayGTK.h:138
void acquire(vpImage< vpRGBa > &I)
void setFileName(const char *filename)
void setPyramidLevels(const int pyrMaxLevel)
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
static double rad(double deg)
Definition: vpMath.h:102
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
static void cleanup()
Definition: vpXmlParser.h:310
void setWindowSize(const int winSize)
long getFrameIndex() const
void setLastFrameIndex(const long last_frame)
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, const vpImagePoint &offset=vpImagePoint(0, 0))
unsigned int getDownScalingFactor()
Definition: vpDisplay.h:229
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Definition: vpKltOpencv.h:78
void setBlockSize(const int blockSize)
unsigned int getWidth() const
Definition: vpImage.h:229
Model based stereo (or more) tracker using only KLT.