Visual Servoing Platform  version 3.4.0
mbtEdgeTracking.cpp
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2019 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 model based tracking.
33  *
34  * Authors:
35  * Nicolas Melchior
36  * Romain Tallonneau
37  * Aurelien Yol
38  *
39  *****************************************************************************/
40 
48 #include <iostream>
49 #include <visp3/core/vpConfig.h>
50 
51 #if (defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_DISPLAY)) \
52  && (defined(VISP_HAVE_LAPACK) || defined(VISP_HAVE_EIGEN3) || defined(VISP_HAVE_OPENCV))
53 
54 #include <visp3/core/vpDebug.h>
55 #include <visp3/core/vpHomogeneousMatrix.h>
56 #include <visp3/core/vpIoTools.h>
57 #include <visp3/core/vpMath.h>
58 #include <visp3/gui/vpDisplayD3D.h>
59 #include <visp3/gui/vpDisplayGDI.h>
60 #include <visp3/gui/vpDisplayGTK.h>
61 #include <visp3/gui/vpDisplayOpenCV.h>
62 #include <visp3/gui/vpDisplayX.h>
63 #include <visp3/io/vpImageIo.h>
64 #include <visp3/io/vpParseArgv.h>
65 #include <visp3/io/vpVideoReader.h>
66 #include <visp3/mbt/vpMbEdgeTracker.h>
67 
68 #define GETOPTARGS "x:m:i:n:de:chtfColwvp"
69 
70 void usage(const char *name, const char *badparam)
71 {
72  fprintf(stdout, "\n\
73 Example of tracking based on the 3D model.\n\
74 \n\
75 SYNOPSIS\n\
76  %s [-i <test image path>] [-x <config file>]\n\
77  [-m <model name>] [-n <initialisation file base name>] [-e <last frame index>]\n\
78  [-t] [-c] [-d] [-h] [-f] [-C] [-o] [-w] [-l] [-v] [-p]\n", name);
79 
80  fprintf(stdout, "\n\
81 OPTIONS: \n\
82  -i <input image path> \n\
83  Set image input path.\n\
84  From this path read images \n\
85  \"mbt/cube/image%%04d.ppm\". These \n\
86  images come from ViSP-images-x.y.z.tar.gz available \n\
87  on the ViSP website.\n\
88  Setting the VISP_INPUT_IMAGE_PATH environment\n\
89  variable produces the same behaviour than using\n\
90  this option.\n\
91 \n\
92  -x <config file> \n\
93  Set the config file (the xml file) to use.\n\
94  The config file is used to specify the parameters of the tracker.\n\
95 \n\
96  -m <model name> \n\
97  Specify the name of the file of the model\n\
98  The model can either be a vrml model (.wrl) or a .cao file.\n\
99 \n\
100  -e <last frame index> \n\
101  Specify the index of the last frame. Once reached, the tracking is stopped\n\
102 \n\
103  -f \n\
104  Do not use the vrml model, use the .cao one. These two models are \n\
105  equivalent and comes from ViSP-images-x.y.z.tar.gz available on the ViSP\n\
106  website. However, the .cao model allows to use the 3d model based tracker \n\
107  without Coin.\n\
108 \n\
109  -C \n\
110  Track only the cube (not the cylinder). In this case the models files are\n\
111  cube.cao or cube.wrl instead of cube_and_cylinder.cao and \n\
112  cube_and_cylinder.wrl.\n\
113 \n\
114  -n <initialisation file base name> \n\
115  Base name of the initialisation file. The file will be 'base_name'.init .\n\
116  This base name is also used for the optionnal picture specifying where to \n\
117  click (a .ppm picture).\n\
118 \n\
119  -t \n\
120  Turn off the display of the the moving edges. \n\
121 \n\
122  -d \n\
123  Turn off the display.\n\
124 \n\
125  -c\n\
126  Disable the mouse click. Useful to automaze the \n\
127  execution of this program without humain intervention.\n\
128 \n\
129  -o\n\
130  Use Ogre3D for visibility tests.\n\
131 \n\
132  -w\n\
133  When Ogre3D is enable [-o] show Ogre3D configuration dialog thatallows to set the renderer.\n\
134 \n\
135  -l\n\
136  Use the scanline for visibility tests.\n\
137 \n\
138  -v\n\
139  Compute covariance matrix.\n\
140 \n\
141  -p\n\
142  Compute gradient projection error.\n\
143 \n\
144  -h \n\
145  Print the help.\n\n");
146 
147  if (badparam)
148  fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
149 }
150 
151 bool getOptions(int argc, const char **argv, std::string &ipath, std::string &configFile, std::string &modelFile,
152  std::string &initFile, long &lastFrame, bool &displayFeatures, bool &click_allowed, bool &display,
153  bool &cao3DModel, bool &trackCylinder, bool &useOgre, bool &showOgreConfigDialog, bool &useScanline,
154  bool &computeCovariance, bool &projectionError)
155 {
156  const char *optarg_;
157  int c;
158  while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg_)) > 1) {
159 
160  switch (c) {
161  case 'e':
162  lastFrame = atol(optarg_);
163  break;
164  case 'i':
165  ipath = optarg_;
166  break;
167  case 'x':
168  configFile = optarg_;
169  break;
170  case 'm':
171  modelFile = optarg_;
172  break;
173  case 'n':
174  initFile = optarg_;
175  break;
176  case 't':
177  displayFeatures = false;
178  break;
179  case 'f':
180  cao3DModel = true;
181  break;
182  case 'c':
183  click_allowed = false;
184  break;
185  case 'd':
186  display = false;
187  break;
188  case 'C':
189  trackCylinder = false;
190  break;
191  case 'o':
192  useOgre = true;
193  break;
194  case 'l':
195  useScanline = true;
196  break;
197  case 'w':
198  showOgreConfigDialog = true;
199  break;
200  case 'v':
201  computeCovariance = true;
202  break;
203  case 'p':
204  projectionError = true;
205  break;
206  case 'h':
207  usage(argv[0], NULL);
208  return false;
209  break;
210 
211  default:
212  usage(argv[0], optarg_);
213  return false;
214  break;
215  }
216  }
217 
218  if ((c == 1) || (c == -1)) {
219  // standalone param or error
220  usage(argv[0], NULL);
221  std::cerr << "ERROR: " << std::endl;
222  std::cerr << " Bad argument " << optarg_ << std::endl << std::endl;
223  return false;
224  }
225 
226  return true;
227 }
228 
229 int main(int argc, const char **argv)
230 {
231  try {
232  std::string env_ipath;
233  std::string opt_ipath;
234  std::string ipath;
235  std::string opt_configFile;
236  std::string configFile;
237  std::string opt_modelFile;
238  std::string modelFile;
239  std::string opt_initFile;
240  std::string initFile;
241  long opt_lastFrame = -1;
242  bool displayFeatures = true;
243  bool opt_click_allowed = true;
244  bool opt_display = true;
245  bool cao3DModel = false;
246  bool trackCylinder = true;
247  bool useOgre = false;
248  bool showOgreConfigDialog = false;
249  bool useScanline = false;
250  bool computeCovariance = false;
251  bool projectionError = false;
252  bool quit = false;
253 
254  // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH
255  // environment variable value
256  env_ipath = vpIoTools::getViSPImagesDataPath();
257 
258  // Set the default input path
259  if (!env_ipath.empty())
260  ipath = env_ipath;
261 
262  // Read the command line options
263  if (!getOptions(argc, argv, opt_ipath, opt_configFile, opt_modelFile, opt_initFile, opt_lastFrame, displayFeatures,
264  opt_click_allowed, opt_display, cao3DModel, trackCylinder, useOgre, showOgreConfigDialog,
265  useScanline, computeCovariance, projectionError)) {
266  return (-1);
267  }
268 
269  // Test if an input path is set
270  if (opt_ipath.empty() && env_ipath.empty()) {
271  usage(argv[0], NULL);
272  std::cerr << std::endl << "ERROR:" << std::endl;
273  std::cerr << " Use -i <visp image path> option or set VISP_INPUT_IMAGE_PATH " << std::endl
274  << " environment variable to specify the location of the " << std::endl
275  << " image path where test images are located." << std::endl
276  << std::endl;
277 
278  return (-1);
279  }
280 
281  // Get the option values
282  if (!opt_ipath.empty())
283  ipath = vpIoTools::createFilePath(opt_ipath, "mbt/cube/image%04d.pgm");
284  else
285  ipath = vpIoTools::createFilePath(env_ipath, "mbt/cube/image%04d.pgm");
286 
287  if (!opt_configFile.empty())
288  configFile = opt_configFile;
289  else if (!opt_ipath.empty())
290  configFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube.xml");
291  else
292  configFile = vpIoTools::createFilePath(env_ipath, "mbt/cube.xml");
293 
294  if (!opt_modelFile.empty()) {
295  modelFile = opt_modelFile;
296  } else {
297  std::string modelFileCao;
298  std::string modelFileWrl;
299  if (trackCylinder) {
300  modelFileCao = "mbt/cube_and_cylinder.cao";
301  modelFileWrl = "mbt/cube_and_cylinder.wrl";
302  } else {
303  modelFileCao = "mbt/cube.cao";
304  modelFileWrl = "mbt/cube.wrl";
305  }
306 
307  if (!opt_ipath.empty()) {
308  if (cao3DModel) {
309  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
310  } else {
311 #ifdef VISP_HAVE_COIN3D
312  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileWrl);
313 #else
314  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
315  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
316 #endif
317  }
318  } else {
319  if (cao3DModel) {
320  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
321  } else {
322 #ifdef VISP_HAVE_COIN3D
323  modelFile = vpIoTools::createFilePath(env_ipath, modelFileWrl);
324 #else
325  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
326  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
327 #endif
328  }
329  }
330  }
331 
332  if (!opt_initFile.empty())
333  initFile = opt_initFile;
334  else if (!opt_ipath.empty())
335  initFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube");
336  else
337  initFile = vpIoTools::createFilePath(env_ipath, "mbt/cube");
338 
340  vpVideoReader reader;
341 
342  reader.setFileName(ipath);
343  try {
344  reader.open(I);
345  } catch (...) {
346  std::cout << "Cannot open sequence: " << ipath << std::endl;
347  return -1;
348  }
349 
350  if (opt_lastFrame > 1 && opt_lastFrame < reader.getLastFrameIndex())
351  reader.setLastFrameIndex(opt_lastFrame);
352 
353  reader.acquire(I);
354 
355 // initialise a display
356 #if defined VISP_HAVE_X11
357  vpDisplayX display;
358 #elif defined VISP_HAVE_GDI
359  vpDisplayGDI display;
360 #elif defined VISP_HAVE_OPENCV
361  vpDisplayOpenCV display;
362 #elif defined VISP_HAVE_D3D9
363  vpDisplayD3D display;
364 #elif defined VISP_HAVE_GTK
365  vpDisplayGTK display;
366 #else
367  opt_display = false;
368 #endif
369  if (opt_display) {
370 #if defined(VISP_HAVE_DISPLAY)
371  display.init(I, 100, 100, "Test tracking");
372 #endif
374  vpDisplay::flush(I);
375  }
376 
377  vpMbEdgeTracker tracker;
379 
380  // Initialise the tracker: camera parameters, moving edge and KLT settings
381  vpCameraParameters cam;
382  // From the xml file
383  tracker.loadConfigFile(configFile);
384 #if 0
385  // Corresponding parameters manually set to have an example code
386  // By setting the parameters:
387  cam.initPersProjWithoutDistortion(547, 542, 338, 234);
388 
389  vpMe me;
390  me.setMaskSize(5);
391  me.setMaskNumber(180);
392  me.setRange(7);
393  me.setThreshold(5000);
394  me.setMu1(0.5);
395  me.setMu2(0.5);
396  me.setSampleStep(4);
397 
398  tracker.setCameraParameters(cam);
399  tracker.setMovingEdge(me);
400 
401  // Specify the clipping to use
402  tracker.setNearClippingDistance(0.01);
403  tracker.setFarClippingDistance(0.90);
405 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
406 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
407 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
408 #endif
409 
410  // Display the moving edges, see documentation for the signification of
411  // the colours
412  tracker.setDisplayFeatures(displayFeatures);
413 
414  // Tells if the tracker has to use Ogre3D for visibility tests
415  tracker.setOgreVisibilityTest(useOgre);
416  if (useOgre)
417  tracker.setOgreShowConfigDialog(showOgreConfigDialog);
418 
419  // Tells if the tracker has to use the scanline visibility tests
420  tracker.setScanLineVisibilityTest(useScanline);
421 
422  // Tells if the tracker has to compute the covariance matrix
423  tracker.setCovarianceComputation(computeCovariance);
424 
425  // Tells if the tracker has to compute the projection error
426  tracker.setProjectionErrorComputation(projectionError);
427 
428  // Retrieve the camera parameters from the tracker
429  tracker.getCameraParameters(cam);
430 
431  // Loop to position the cube
432  if (opt_display && opt_click_allowed) {
433  while (!vpDisplay::getClick(I, false)) {
435  vpDisplay::displayText(I, 15, 10, "click after positioning the object", vpColor::red);
436  vpDisplay::flush(I);
437  }
438  }
439 
440  // Load the 3D model (either a vrml file or a .cao file)
441  tracker.loadModel(modelFile);
442 
443  // Initialise the tracker by clicking on the image
444  // This function looks for
445  // - a ./cube/cube.init file that defines the 3d coordinates (in meter,
446  // in the object basis) of the points used for the initialisation
447  // - a ./cube/cube.ppm file to display where the user have to click
448  // (optionnal, set by the third parameter)
449  if (opt_display && opt_click_allowed) {
450  tracker.initClick(I, initFile, true);
451  tracker.getPose(cMo);
452  // display the 3D model at the given pose
453  tracker.display(I, cMo, cam, vpColor::red);
454  } else {
455  vpHomogeneousMatrix cMoi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
456  tracker.initFromPose(I, cMoi);
457  }
458 
459  // track the model
460  tracker.track(I);
461  tracker.getPose(cMo);
462 
463  if (opt_display)
464  vpDisplay::flush(I);
465 
466  while (!reader.end()) {
467  // acquire a new image
468  reader.acquire(I);
469  // display the image
470  if (opt_display)
472 
473  // Test to reset the tracker
474  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 10) {
475  vpTRACE("Test reset tracker");
476  if (opt_display)
478  tracker.resetTracker();
479  tracker.loadConfigFile(configFile);
480 #if 0
481  // Corresponding parameters manually set to have an example code
482  // By setting the parameters:
483  cam.initPersProjWithoutDistortion(547, 542, 338, 234);
484 
485  vpMe me;
486  me.setMaskSize(5);
487  me.setMaskNumber(180);
488  me.setRange(7);
489  me.setThreshold(5000);
490  me.setMu1(0.5);
491  me.setMu2(0.5);
492  me.setSampleStep(4);
493 
494  tracker.setCameraParameters(cam);
495  tracker.setMovingEdge(me);
496 
497  // Specify the clipping to use
498  tracker.setNearClippingDistance(0.01);
499  tracker.setFarClippingDistance(0.90);
501 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
502 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
503 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
504 #endif
505  tracker.loadModel(modelFile);
506  tracker.setCameraParameters(cam);
507  tracker.setOgreVisibilityTest(useOgre);
508  tracker.setScanLineVisibilityTest(useScanline);
509  tracker.setCovarianceComputation(computeCovariance);
510  tracker.setProjectionErrorComputation(projectionError);
511  tracker.initFromPose(I, cMo);
512  }
513 
514  // Test to set an initial pose
515  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 50) {
516  cMo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
517  vpTRACE("Test set pose");
518  tracker.setPose(I, cMo);
519  // if (opt_display) {
520  // // display the 3D model
521  // tracker.display(I, cMo, cam, vpColor::darkRed);
522  // // display the frame
523  // vpDisplay::displayFrame (I, cMo, cam, 0.05);
528  // }
529  }
530 
531  // track the object: stop tracking from frame 40 to 50
532  if (reader.getFrameIndex() - reader.getFirstFrameIndex() < 40 ||
533  reader.getFrameIndex() - reader.getFirstFrameIndex() >= 50) {
534  tracker.track(I);
535  tracker.getPose(cMo);
536  if (opt_display) {
537  // display the 3D model
538  tracker.display(I, cMo, cam, vpColor::darkRed);
539  // display the frame
540  vpDisplay::displayFrame(I, cMo, cam, 0.05);
541  }
542  }
543 
544  if (opt_click_allowed) {
545  vpDisplay::displayText(I, 10, 10, "Click to quit", vpColor::red);
546  if (vpDisplay::getClick(I, false)) {
547  quit = true;
548  break;
549  }
550  }
551 
552  if (computeCovariance) {
553  std::cout << "Covariance matrix: \n" << tracker.getCovarianceMatrix() << std::endl << std::endl;
554  }
555 
556  if (projectionError) {
557  std::cout << "Projection error: " << tracker.getProjectionError() << std::endl << std::endl;
558  }
559 
560  if (opt_display)
561  vpDisplay::flush(I);
562  }
563 
564  std::cout << "Reached last frame: " << reader.getFrameIndex() << std::endl;
565 
566  if (opt_click_allowed && !quit) {
568  }
569  reader.close();
570 
571  return EXIT_SUCCESS;
572  } catch (const vpException &e) {
573  std::cout << "Catch an exception: " << e << std::endl;
574  return EXIT_FAILURE;
575  }
576 }
577 
578 #elif !(defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_DISPLAY))
579 int main()
580 {
581  std::cout << "Cannot run this example: visp_mbt, visp_gui modules are required."
582  << std::endl;
583  return EXIT_SUCCESS;
584 }
585 #else
586 int main()
587 {
588  std::cout << "Cannot run this example: install Lapack, Eigen3 or OpenCV" << std::endl;
589  return EXIT_SUCCESS;
590 }
591 #endif
virtual void setCovarianceComputation(const bool &flag)
Definition: vpMbTracker.h:499
void setMovingEdge(const vpMe &me)
long getFrameIndex() const
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static std::string getViSPImagesDataPath()
Definition: vpIoTools.cpp:1202
virtual void loadModel(const std::string &modelFile, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual unsigned int getClipping() const
Definition: vpMbTracker.h:256
Implementation of an homogeneous matrix and operations on such kind of matrices.
virtual void track(const vpImage< unsigned char > &I)
void setMaskNumber(const unsigned int &a)
Definition: vpMe.cpp:452
static const vpColor darkRed
Definition: vpColor.h:218
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:128
void setSampleStep(const double &s)
Definition: vpMe.h:278
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
virtual void initClick(const vpImage< unsigned char > &I, const std::string &initFile, bool displayHelp=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
Definition: vpDisplayX.h:150
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
virtual void setOgreShowConfigDialog(bool showConfigDialog)
Definition: vpMbTracker.h:643
error that can be emited by ViSP classes.
Definition: vpException.h:71
Definition: vpMe.h:60
Make the complete tracking of an object by using its CAD model.
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
static void flush(const vpImage< unsigned char > &I)
long getFirstFrameIndex()
void setMu1(const double &mu_1)
Definition: vpMe.h:241
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
Definition: vpParseArgv.cpp:69
static const vpColor red
Definition: vpColor.h:217
virtual void setNearClippingDistance(const double &dist)
virtual void setOgreVisibilityTest(const bool &v)
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:106
static std::string createFilePath(const std::string &parent, const std::string &child)
Definition: vpIoTools.cpp:1446
virtual void setScanLineVisibilityTest(const bool &v)
void setMaskSize(const unsigned int &a)
Definition: vpMe.cpp:459
#define vpTRACE
Definition: vpDebug.h:416
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
virtual double getProjectionError() const
Definition: vpMbTracker.h:310
Generic class defining intrinsic camera parameters.
void init(vpImage< unsigned char > &I, int win_x=-1, int win_y=-1, const std::string &win_title="")
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
Definition: vpDisplayGTK.h:134
void acquire(vpImage< vpRGBa > &I)
virtual void setFarClippingDistance(const double &dist)
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
void initPersProjWithoutDistortion(double px, double py, double u0, double v0)
virtual void getCameraParameters(vpCameraParameters &cam) const
Definition: vpMbTracker.h:248
void setMu2(const double &mu_2)
Definition: vpMe.h:248
virtual void loadConfigFile(const std::string &configFile, bool verbose=true)
virtual void getPose(vpHomogeneousMatrix &cMo) const
Definition: vpMbTracker.h:414
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))
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)
void setThreshold(const double &t)
Definition: vpMe.h:300
void setFileName(const std::string &filename)
virtual void setCameraParameters(const vpCameraParameters &cam)
void setRange(const unsigned int &r)
Definition: vpMe.h:271
virtual void setClipping(const unsigned int &flags)
virtual void setDisplayFeatures(bool displayF)
Definition: vpMbTracker.h:517
virtual void setProjectionErrorComputation(const bool &flag)
Definition: vpMbTracker.h:584
virtual vpMatrix getCovarianceMatrix() const
Definition: vpMbTracker.h:265