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