Visual Servoing Platform  version 3.1.0
mbtEdgeMultiTracking.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 model based tracking.
33  *
34  * Authors:
35  * Nicolas Melchior
36  * Romain Tallonneau
37  * Aurelien Yol
38  * Souriya Trinh
39  *
40  *****************************************************************************/
41 
49 #include <iostream>
50 #include <visp3/core/vpConfig.h>
51 
52 #if defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_DISPLAY)
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/vpMbEdgeMultiTracker.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 behavior 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 optional 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 automate the \n\
127  execution of this program without human 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 that allows 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 
339  vpImage<unsigned char> I1, I2;
340  vpVideoReader reader;
341 
342  reader.setFileName(ipath);
343  try {
344  reader.open(I1);
345  I2 = I1;
346  } catch (...) {
347  std::cout << "Cannot open sequence: " << ipath << std::endl;
348  return -1;
349  }
350 
351  if (opt_lastFrame > 1 && opt_lastFrame < reader.getLastFrameIndex())
352  reader.setLastFrameIndex(opt_lastFrame);
353 
354  reader.acquire(I1);
355  I2 = I1;
356 
357 // initialise a display
358 #if defined VISP_HAVE_X11
359  vpDisplayX display1, display2;
360 #elif defined VISP_HAVE_GDI
361  vpDisplayGDI display1, display2;
362 #elif defined VISP_HAVE_OPENCV
363  vpDisplayOpenCV display1, display2;
364 #elif defined VISP_HAVE_D3D9
365  vpDisplayD3D display1, display2;
366 #elif defined VISP_HAVE_GTK
367  vpDisplayGTK display1, display2;
368 #else
369  opt_display = false;
370 #endif
371  if (opt_display) {
372 #if (defined VISP_HAVE_DISPLAY)
375  display1.init(I1, 100, 100, "Test tracking (Left)");
376  display2.init(I2, (int)(I1.getWidth() / vpDisplay::getDownScalingFactor(I1) + 110), 100, "Test tracking (Right)");
377 #endif
378  vpDisplay::display(I1);
379  vpDisplay::display(I2);
380  vpDisplay::flush(I1);
381  vpDisplay::flush(I2);
382  }
383 
384  vpMbEdgeMultiTracker tracker(2);
385  vpHomogeneousMatrix c1Mo, c2Mo;
386 
387  // Initialise the tracker: camera parameters, moving edge and KLT settings
388  vpCameraParameters cam1, cam2;
389 #if defined(VISP_HAVE_XML2)
390  // From the xml file
391  tracker.loadConfigFile(configFile, configFile);
392 #else
393  // By setting the parameters:
394  cam1.initPersProjWithoutDistortion(547, 542, 338, 234);
395  cam2.initPersProjWithoutDistortion(547, 542, 338, 234);
396 
397  vpMe me;
398  me.setMaskSize(5);
399  me.setMaskNumber(180);
400  me.setRange(7);
401  me.setThreshold(5000);
402  me.setMu1(0.5);
403  me.setMu2(0.5);
404  me.setSampleStep(4);
405 
406  tracker.setCameraParameters(cam1, cam2);
407  tracker.setMovingEdge(me);
408 
409  // Specify the clipping to use
410  tracker.setNearClippingDistance(0.01);
411  tracker.setFarClippingDistance(0.90);
412  tracker.setClipping(tracker.getClipping() | vpMbtPolygon::FOV_CLIPPING);
413 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
414 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
415 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
416 #endif
417 
418  // Display the moving edges, see documentation for the signification of
419  // the colours
420  tracker.setDisplayFeatures(displayFeatures);
421 
422  // Tells if the tracker has to use Ogre3D for visibility tests
423  tracker.setOgreVisibilityTest(useOgre);
424  if (useOgre)
425  tracker.setOgreShowConfigDialog(showOgreConfigDialog);
426 
427  // Tells if the tracker has to use the scanline visibility tests
428  tracker.setScanLineVisibilityTest(useScanline);
429 
430  // Tells if the tracker has to compute the covariance matrix
431  tracker.setCovarianceComputation(computeCovariance);
432 
433  // Tells if the tracker has to compute the projection error
434  tracker.setProjectionErrorComputation(projectionError);
435 
436  // Retrieve the camera parameters from the tracker
437  tracker.getCameraParameters(cam1, cam2);
438 
439  // Set camera transformation matrices
440  std::map<std::string, vpHomogeneousMatrix> mapOfCamTrans;
441  mapOfCamTrans["Camera1"] = vpHomogeneousMatrix();
442  mapOfCamTrans["Camera2"] = vpHomogeneousMatrix();
443  tracker.setCameraTransformationMatrix(mapOfCamTrans);
444 
445  // Loop to position the cube
446  if (opt_display && opt_click_allowed) {
447  while (!vpDisplay::getClick(I1, false)) {
448  vpDisplay::display(I1);
449  vpDisplay::displayText(I1, 15, 10, "click after positioning the object", vpColor::red);
450  vpDisplay::flush(I1);
451  vpTime::wait(100);
452  }
453  }
454 
455  // Load the 3D model (either a vrml file or a .cao file)
456  tracker.loadModel(modelFile);
457 
458  // Initialise the tracker by clicking on the image
459  // This function looks for
460  // - a ./cube/cube.init file that defines the 3d coordinates (in meter,
461  // in the object basis) of the points used for the initialisation
462  // - a ./cube/cube.ppm file to display where the user have to click
463  // (optionnal, set by the third parameter)
464  if (opt_display && opt_click_allowed) {
465  tracker.initClick(I1, I2, initFile, initFile, true);
466  tracker.getPose(c1Mo, c2Mo);
467  // display the 3D model at the given pose
468  tracker.display(I1, I2, c1Mo, c2Mo, cam1, cam2, vpColor::red);
469  } else {
470  vpHomogeneousMatrix c1Moi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
471  vpHomogeneousMatrix c2Moi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
472  tracker.initFromPose(I1, I2, c1Moi, c2Moi);
473  }
474 
475  // track the model
476  tracker.track(I1, I2);
477  tracker.getPose(c1Mo, c2Mo);
478 
479  if (opt_display) {
480  vpDisplay::flush(I1);
481  vpDisplay::flush(I2);
482  }
483 
484  while (!reader.end()) {
485  // acquire a new image
486  reader.acquire(I1);
487  I2 = I1;
488 
489  // display the image
490  if (opt_display) {
491  vpDisplay::display(I1);
492  vpDisplay::display(I2);
493  }
494 
495  // Test to reset the tracker
496  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 10) {
497  std::cout << "----------Test reset tracker----------" << std::endl;
498  if (opt_display) {
499  vpDisplay::display(I1);
500  vpDisplay::display(I2);
501  }
502  tracker.resetTracker();
503 #if defined(VISP_HAVE_XML2)
504  tracker.loadConfigFile(configFile, configFile);
505 #else
506  // By setting the parameters:
507  cam1.initPersProjWithoutDistortion(547, 542, 338, 234);
508  cam2.initPersProjWithoutDistortion(547, 542, 338, 234);
509 
510  vpMe me;
511  me.setMaskSize(5);
512  me.setMaskNumber(180);
513  me.setRange(7);
514  me.setThreshold(5000);
515  me.setMu1(0.5);
516  me.setMu2(0.5);
517  me.setSampleStep(4);
518 
519  tracker.setCameraParameters(cam1, cam2);
520  tracker.setMovingEdge(me);
521 
522  // Specify the clipping to use
523  tracker.setNearClippingDistance(0.01);
524  tracker.setFarClippingDistance(0.90);
525  tracker.setClipping(tracker.getClipping() | vpMbtPolygon::FOV_CLIPPING);
526 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
527 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
528 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
529 #endif
530  tracker.loadModel(modelFile);
531  tracker.setCameraParameters(cam1, cam2);
532  tracker.setOgreVisibilityTest(useOgre);
533  tracker.setScanLineVisibilityTest(useScanline);
534  tracker.setCovarianceComputation(computeCovariance);
535  tracker.setProjectionErrorComputation(projectionError);
536  tracker.initFromPose(I1, I2, c1Mo, c2Mo);
537  }
538 
539  // Test to set an initial pose
540  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 50) {
541  c1Mo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
542  c2Mo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
543  std::cout << "Test set pose" << std::endl;
544  tracker.setPose(I1, I2, c1Mo, c2Mo);
545  }
546 
547  // track the object: stop tracking from frame 40 to 50
548  if (reader.getFrameIndex() - reader.getFirstFrameIndex() < 40 ||
549  reader.getFrameIndex() - reader.getFirstFrameIndex() >= 50) {
550  tracker.track(I1, I2);
551  tracker.getPose(c1Mo, c2Mo);
552  if (opt_display) {
553  // display the 3D model
554  tracker.display(I1, I2, c1Mo, c2Mo, cam1, cam2, vpColor::darkRed);
555  // display the frame
556  vpDisplay::displayFrame(I1, c1Mo, cam1, 0.05);
557  vpDisplay::displayFrame(I2, c2Mo, cam2, 0.05);
558  }
559  }
560 
561  if (opt_click_allowed) {
562  vpDisplay::displayText(I1, 10, 10, "Click to quit", vpColor::red);
563  if (vpDisplay::getClick(I1, false)) {
564  quit = true;
565  break;
566  }
567  }
568 
569  if (computeCovariance) {
570  std::cout << "Covariance matrix: \n" << tracker.getCovarianceMatrix() << std::endl << std::endl;
571  }
572 
573  if (projectionError) {
574  std::cout << "Projection error: " << tracker.getProjectionError() << std::endl << std::endl;
575  }
576 
577  vpDisplay::flush(I1);
578  vpDisplay::flush(I2);
579  }
580 
581  std::cout << "Reached last frame: " << reader.getFrameIndex() << std::endl;
582 
583  if (opt_click_allowed && !quit) {
585  }
586  reader.close();
587 
588 #if defined(VISP_HAVE_XML2)
589  // Cleanup memory allocated by xml library used to parse the xml config
590  // file in vpMbEdgeTracker::loadConfigFile()
592 #endif
593 
594 #if defined(VISP_HAVE_COIN3D) && (COIN_MAJOR_VERSION == 2 || COIN_MAJOR_VERSION == 3)
595  // Cleanup memory allocated by Coin library used to load a vrml model in
596  // vpMbEdgeTracker::loadModel() We clean only if Coin was used.
597  if (!cao3DModel)
598  SoDB::finish();
599 #endif
600 
601  return 0;
602  } catch (vpException &e) {
603  std::cout << "Catch an exception: " << e << std::endl;
604  return 1;
605  }
606 }
607 
608 #else
609 
610 int main()
611 {
612  std::cout << "visp_mbt module is required to run this example." << std::endl;
613  return 0;
614 }
615 
616 #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
Implementation of an homogeneous matrix and operations on such kind of matrices.
void setMaskNumber(const unsigned int &a)
Definition: vpMe.cpp:454
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 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)
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...
error that can be emited by ViSP classes.
Definition: vpException.h:71
Definition: vpMe.h:60
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:180
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
void setMaskSize(const unsigned int &a)
Definition: vpMe.cpp:461
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 buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
static void cleanup()
Definition: vpXmlParser.h:310
void setMu2(const double &mu_2)
Definition: vpMe.h:248
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
void setThreshold(const double &t)
Definition: vpMe.h:300
void setRange(const unsigned int &r)
Definition: vpMe.h:271
unsigned int getWidth() const
Definition: vpImage.h:229
Make the complete stereo (or more) tracking of an object by using its CAD model.