Visual Servoing Platform  version 3.6.1 under development (2024-03-29)
mbtKltTracking.cpp
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2023 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 https://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 *****************************************************************************/
35 
42 #include <iostream>
43 #include <visp3/core/vpConfig.h>
44 
45 #if defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && \
46  defined(VISP_HAVE_DISPLAY) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO)
47 
48 #include <visp3/core/vpDebug.h>
49 #include <visp3/core/vpHomogeneousMatrix.h>
50 #include <visp3/core/vpIoTools.h>
51 #include <visp3/core/vpMath.h>
52 #include <visp3/gui/vpDisplayD3D.h>
53 #include <visp3/gui/vpDisplayGDI.h>
54 #include <visp3/gui/vpDisplayGTK.h>
55 #include <visp3/gui/vpDisplayOpenCV.h>
56 #include <visp3/gui/vpDisplayX.h>
57 #include <visp3/io/vpImageIo.h>
58 #include <visp3/io/vpParseArgv.h>
59 #include <visp3/io/vpVideoReader.h>
60 #include <visp3/mbt/vpMbKltTracker.h>
61 
62 #define GETOPTARGS "x:m:i:n:de:chtfolwv"
63 
64 void usage(const char *name, const char *badparam)
65 {
66 #if VISP_HAVE_DATASET_VERSION >= 0x030600
67  std::string ext("png");
68 #else
69  std::string ext("pgm");
70 #endif
71  fprintf(stdout, "\n\
72 Example of tracking based on the 3D model.\n\
73 \n\
74 SYNOPSIS\n\
75  %s [-i <test image path>] [-x <config file>]\n\
76  [-m <model name>] [-n <initialisation file base name>] [-e <last frame index>]\n\
77  [-t] [-c] [-d] [-h] [-f] [-o] [-w] [-l] [-v]\n",
78  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.%s\". 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  -n <initialisation file base name> \n\
110  Base name of the initialisation file. The file will be 'base_name'.init .\n\
111  This base name is also used for the Optional picture specifying where to \n\
112  click (a .ppm picture).\n\
113 \n\
114  -t \n\
115  Turn off the display of the the klt points. \n\
116 \n\
117  -d \n\
118  Turn off the display.\n\
119 \n\
120  -c\n\
121  Disable the mouse click. Useful to automate the \n\
122  execution of this program without human intervention.\n\
123 \n\
124  -o\n\
125  Use Ogre3D for visibility tests\n\
126 \n\
127  -w\n\
128  When Ogre3D is enable [-o] show Ogre3D configuration dialog thatallows to set the renderer.\n\
129 \n\
130  -l\n\
131  Use the scanline for visibility tests.\n\
132 \n\
133  -v\n\
134  Compute covariance matrix.\n\
135 \n\
136  -h \n\
137  Print the help.\n\n",
138  ext.c_str());
139 
140  if (badparam)
141  fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
142 }
143 
144 bool getOptions(int argc, const char **argv, std::string &ipath, std::string &configFile, std::string &modelFile,
145  std::string &initFile, long &lastFrame, bool &displayKltPoints, bool &click_allowed, bool &display,
146  bool &cao3DModel, bool &useOgre, bool &showOgreConfigDialog, bool &useScanline, bool &computeCovariance)
147 {
148  const char *optarg_;
149  int c;
150  while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg_)) > 1) {
151 
152  switch (c) {
153  case 'e':
154  lastFrame = atol(optarg_);
155  break;
156  case 'i':
157  ipath = optarg_;
158  break;
159  case 'x':
160  configFile = optarg_;
161  break;
162  case 'm':
163  modelFile = optarg_;
164  break;
165  case 'n':
166  initFile = optarg_;
167  break;
168  case 't':
169  displayKltPoints = false;
170  break;
171  case 'f':
172  cao3DModel = true;
173  break;
174  case 'c':
175  click_allowed = false;
176  break;
177  case 'd':
178  display = false;
179  break;
180  case 'o':
181  useOgre = true;
182  break;
183  case 'l':
184  useScanline = true;
185  break;
186  case 'w':
187  showOgreConfigDialog = true;
188  break;
189  case 'v':
190  computeCovariance = true;
191  break;
192  case 'h':
193  usage(argv[0], nullptr);
194  return false;
195  break;
196 
197  default:
198  usage(argv[0], optarg_);
199  return false;
200  break;
201  }
202  }
203 
204  if ((c == 1) || (c == -1)) {
205  // standalone param or error
206  usage(argv[0], nullptr);
207  std::cerr << "ERROR: " << std::endl;
208  std::cerr << " Bad argument " << optarg_ << std::endl << std::endl;
209  return false;
210  }
211 
212  return true;
213 }
214 
215 int main(int argc, const char **argv)
216 {
217  try {
218  std::string env_ipath;
219  std::string opt_ipath;
220  std::string ipath;
221  std::string opt_configFile;
222  std::string configFile;
223  std::string opt_modelFile;
224  std::string modelFile;
225  std::string opt_initFile;
226  std::string initFile;
227  long opt_lastFrame = -1;
228  bool displayKltPoints = true;
229  bool opt_click_allowed = true;
230  bool opt_display = true;
231  bool cao3DModel = false;
232  bool useOgre = false;
233  bool showOgreConfigDialog = false;
234  bool useScanline = false;
235  bool computeCovariance = false;
236  bool quit = false;
237 
238 #if VISP_HAVE_DATASET_VERSION >= 0x030600
239  std::string ext("png");
240 #else
241  std::string ext("pgm");
242 #endif
243 
244  // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH
245  // environment variable value
246  env_ipath = vpIoTools::getViSPImagesDataPath();
247 
248  // Set the default input path
249  if (!env_ipath.empty())
250  ipath = env_ipath;
251 
252  // Read the command line options
253  if (!getOptions(argc, argv, opt_ipath, opt_configFile, opt_modelFile, opt_initFile, opt_lastFrame, displayKltPoints,
254  opt_click_allowed, opt_display, cao3DModel, useOgre, showOgreConfigDialog, useScanline,
255  computeCovariance)) {
256  return EXIT_FAILURE;
257  }
258 
259  // Test if an input path is set
260  if (opt_ipath.empty() && env_ipath.empty()) {
261  usage(argv[0], nullptr);
262  std::cerr << std::endl << "ERROR:" << std::endl;
263  std::cerr << " Use -i <visp image path> option or set VISP_INPUT_IMAGE_PATH " << std::endl
264  << " environment variable to specify the location of the " << std::endl
265  << " image path where test images are located." << std::endl
266  << std::endl;
267 
268  return EXIT_FAILURE;
269  }
270 
271  // Get the option values
272  if (!opt_ipath.empty())
273  ipath = vpIoTools::createFilePath(opt_ipath, "mbt/cube/image%04d." + ext);
274  else
275  ipath = vpIoTools::createFilePath(env_ipath, "mbt/cube/image%04d." + ext);
276 
277  if (!opt_configFile.empty())
278  configFile = opt_configFile;
279  else if (!opt_ipath.empty())
280  configFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube.xml");
281  else
282  configFile = vpIoTools::createFilePath(env_ipath, "mbt/cube.xml");
283 
284  if (!opt_modelFile.empty()) {
285  modelFile = opt_modelFile;
286  }
287  else {
288  std::string modelFileCao = "mbt/cube.cao";
289  std::string modelFileWrl = "mbt/cube.wrl";
290 
291  if (!opt_ipath.empty()) {
292  if (cao3DModel) {
293  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
294  }
295  else {
296 #ifdef VISP_HAVE_COIN3D
297  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileWrl);
298 #else
299  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
300  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
301 #endif
302  }
303  }
304  else {
305  if (cao3DModel) {
306  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
307  }
308  else {
309 #ifdef VISP_HAVE_COIN3D
310  modelFile = vpIoTools::createFilePath(env_ipath, modelFileWrl);
311 #else
312  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
313  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
314 #endif
315  }
316  }
317  }
318 
319  if (!opt_initFile.empty())
320  initFile = opt_initFile;
321  else if (!opt_ipath.empty())
322  initFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube");
323  else
324  initFile = vpIoTools::createFilePath(env_ipath, "mbt/cube");
325 
327  vpVideoReader reader;
328 
329  reader.setFileName(ipath);
330  try {
331  reader.open(I);
332  }
333  catch (...) {
334  std::cout << "Cannot open sequence: " << ipath << std::endl;
335  return EXIT_FAILURE;
336  }
337 
338  if (opt_lastFrame > 1 && opt_lastFrame < reader.getLastFrameIndex())
339  reader.setLastFrameIndex(opt_lastFrame);
340 
341  reader.acquire(I);
342 
343 // initialise a display
344 #if defined(VISP_HAVE_X11)
346 #elif defined(VISP_HAVE_GDI)
348 #elif defined(HAVE_OPENCV_HIGHGUI)
350 #elif defined(VISP_HAVE_D3D9)
352 #elif defined(VISP_HAVE_GTK)
354 #else
355  opt_display = false;
356 #endif
357  if (opt_display) {
358 #if defined(VISP_HAVE_DISPLAY)
359  display.init(I, 100, 100, "Test tracking");
360 #endif
362  vpDisplay::flush(I);
363  }
364 
365  vpMbKltTracker tracker;
367 
368  // Load tracker config file (camera parameters and moving edge settings)
369  vpCameraParameters cam;
370 
371 #if defined(VISP_HAVE_PUGIXML)
372  // From the xml file
373  tracker.loadConfigFile(configFile);
374 #else
375  // Corresponding parameters manually set to have an example code
376  // By setting the parameters:
377  cam.initPersProjWithoutDistortion(547, 542, 338, 234);
378 
379  vpKltOpencv klt;
380  klt.setMaxFeatures(10000);
381  klt.setWindowSize(5);
382  klt.setQuality(0.01);
383  klt.setMinDistance(5);
384  klt.setHarrisFreeParameter(0.01);
385  klt.setBlockSize(3);
386  klt.setPyramidLevels(3);
387 
388  tracker.setCameraParameters(cam);
389  tracker.setKltOpencv(klt);
390  tracker.setKltMaskBorder(5);
391  tracker.setAngleAppear(vpMath::rad(65));
392  tracker.setAngleDisappear(vpMath::rad(75));
393 
394  // Specify the clipping to use
395  tracker.setNearClippingDistance(0.01);
396  tracker.setFarClippingDistance(0.90);
398 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
399 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
400 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
401 #endif
402 
403  // Display the klt points
404  tracker.setDisplayFeatures(displayKltPoints);
405 
406  // Tells if the tracker has to use Ogre3D for visibility tests
407  tracker.setOgreVisibilityTest(useOgre);
408  if (useOgre)
409  tracker.setOgreShowConfigDialog(showOgreConfigDialog);
410 
411  // Tells if the tracker has to use the scanline visibility tests
412  tracker.setScanLineVisibilityTest(useScanline);
413 
414  // Tells if the tracker has to compute the covariance matrix
415  tracker.setCovarianceComputation(computeCovariance);
416 
417  // Retrieve the camera parameters from the tracker
418  tracker.getCameraParameters(cam);
419 
420  // Loop to position the cube
421  if (opt_display && opt_click_allowed) {
422  while (!vpDisplay::getClick(I, false)) {
424  vpDisplay::displayText(I, 15, 10, "click after positioning the object", vpColor::red);
425  vpDisplay::flush(I);
426  }
427  }
428 
429  // Load the 3D model (either a vrml file or a .cao file)
430  tracker.loadModel(modelFile);
431 
432  // Initialise the tracker by clicking on the image
433  // This function looks for
434  // - a ./cube/cube.init file that defines the 3d coordinates (in meter,
435  // in the object basis) of the points used for the initialisation
436  // - a ./cube/cube.ppm file to display where the user have to click
437  // (Optional, set by the third parameter)
438  if (opt_display && opt_click_allowed) {
439  tracker.initClick(I, initFile, true);
440  tracker.getPose(cMo);
441  // display the 3D model at the given pose
442  tracker.display(I, cMo, cam, vpColor::red);
443  }
444  else {
445  vpHomogeneousMatrix cMoi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
446  tracker.initFromPose(I, cMoi);
447  }
448 
449  // track the model
450  tracker.track(I);
451  tracker.getPose(cMo);
452 
453  if (opt_display)
454  vpDisplay::flush(I);
455 
456  while (!reader.end()) {
457  // acquire a new image
458  reader.acquire(I);
459  // display the image
460  if (opt_display)
462 
463  // Test to reset the tracker
464  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 10) {
465  vpTRACE("Test reset tracker");
466  if (opt_display)
468  tracker.resetTracker();
469 
470 #if defined(VISP_HAVE_PUGIXML)
471  tracker.loadConfigFile(configFile);
472 #else
473  // Corresponding parameters manually set to have an example code
474  // By setting the parameters:
475  cam.initPersProjWithoutDistortion(547, 542, 338, 234);
476 
477  vpKltOpencv klt;
478  klt.setMaxFeatures(10000);
479  klt.setWindowSize(5);
480  klt.setQuality(0.01);
481  klt.setMinDistance(5);
482  klt.setHarrisFreeParameter(0.01);
483  klt.setBlockSize(3);
484  klt.setPyramidLevels(3);
485 
486  tracker.setCameraParameters(cam);
487  tracker.setKltOpencv(klt);
488  tracker.setKltMaskBorder(5);
489  tracker.setAngleAppear(vpMath::rad(65));
490  tracker.setAngleDisappear(vpMath::rad(75));
491 
492  // Specify the clipping to use
493  tracker.setNearClippingDistance(0.01);
494  tracker.setFarClippingDistance(0.90);
496 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
497 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
498 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
499 #endif
500  tracker.loadModel(modelFile);
501  tracker.setCameraParameters(cam);
502  tracker.setOgreVisibilityTest(useOgre);
503  tracker.setScanLineVisibilityTest(useScanline);
504  tracker.setCovarianceComputation(computeCovariance);
505  tracker.initFromPose(I, cMo);
506  }
507 
508  // Test to set an initial pose
509  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 50) {
510  cMo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
511  vpTRACE("Test set pose");
512  tracker.setPose(I, cMo);
513  // if (opt_display) {
514  // // display the 3D model
515  // tracker.display(I, cMo, cam, vpColor::darkRed);
516  // // display the frame
517  // vpDisplay::displayFrame (I, cMo, cam, 0.05);
522  // }
523  }
524 
525  // track the object: stop tracking from frame 40 to 50
526  if (reader.getFrameIndex() - reader.getFirstFrameIndex() < 40 ||
527  reader.getFrameIndex() - reader.getFirstFrameIndex() >= 50) {
528  tracker.track(I);
529  tracker.getPose(cMo);
530  if (opt_display) {
531  // display the 3D model
532  tracker.display(I, cMo, cam, vpColor::darkRed);
533  // display the frame
534  vpDisplay::displayFrame(I, cMo, cam, 0.05);
535  }
536  }
537 
538  if (opt_click_allowed) {
539  vpDisplay::displayText(I, 10, 10, "Click to quit", vpColor::red);
540  if (vpDisplay::getClick(I, false)) {
541  quit = true;
542  break;
543  }
544  }
545 
546  if (computeCovariance) {
547  std::cout << "Covariance matrix: \n" << tracker.getCovarianceMatrix() << std::endl << std::endl;
548  }
549 
550  if (opt_display)
551  vpDisplay::flush(I);
552  }
553 
554  std::cout << "Reached last frame: " << reader.getFrameIndex() << std::endl;
555 
556  if (opt_click_allowed && !quit) {
558  }
559 
560  reader.close();
561 
562  return EXIT_SUCCESS;
563  }
564  catch (const vpException &e) {
565  std::cout << "Catch an exception: " << e << std::endl;
566  return EXIT_FAILURE;
567  }
568 }
569 
570 #else
571 
572 int main()
573 {
574  std::cout << "visp_mbt, visp_gui modules and OpenCV are required to run "
575  "this example."
576  << std::endl;
577  return EXIT_SUCCESS;
578 }
579 
580 #endif
Generic class defining intrinsic camera parameters.
void initPersProjWithoutDistortion(double px, double py, double u0, double v0)
static const vpColor red
Definition: vpColor.h:211
static const vpColor darkRed
Definition: vpColor.h:212
Display for windows using Direct3D 3rd party. Thus to enable this class Direct3D should be installed....
Definition: vpDisplayD3D.h:101
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:128
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
Definition: vpDisplayGTK.h:128
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:128
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void display(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), const std::string &frameName="", const vpColor &textColor=vpColor::black, const vpImagePoint &textOffset=vpImagePoint(15, 15))
static void flush(const vpImage< unsigned char > &I)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
error that can be emitted by ViSP classes.
Definition: vpException.h:59
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:1781
static std::string createFilePath(const std::string &parent, const std::string &child)
Definition: vpIoTools.cpp:2142
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Definition: vpKltOpencv.h:73
void setBlockSize(int blockSize)
Definition: vpKltOpencv.h:266
void setQuality(double qualityLevel)
Definition: vpKltOpencv.h:355
void setHarrisFreeParameter(double harris_k)
Definition: vpKltOpencv.h:274
void setMaxFeatures(int maxCount)
Definition: vpKltOpencv.h:314
void setMinDistance(double minDistance)
Definition: vpKltOpencv.h:323
void setWindowSize(int winSize)
Definition: vpKltOpencv.h:376
void setPyramidLevels(int pyrMaxLevel)
Definition: vpKltOpencv.h:342
static double rad(double deg)
Definition: vpMath.h:127
Model based tracker using only KLT.
virtual void setKltOpencv(const vpKltOpencv &t)
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false) vp_override
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo) vp_override
virtual void setOgreVisibilityTest(const bool &v) vp_override
virtual void track(const vpImage< unsigned char > &I) vp_override
virtual void loadConfigFile(const std::string &configFile, bool verbose=true) vp_override
void setCameraParameters(const vpCameraParameters &cam) vp_override
virtual void setScanLineVisibilityTest(const bool &v) vp_override
void setKltMaskBorder(const unsigned int &e)
void resetTracker() vp_override
virtual void setOgreShowConfigDialog(bool showConfigDialog)
Definition: vpMbTracker.h:650
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 void setNearClippingDistance(const double &dist)
virtual void setFarClippingDistance(const double &dist)
virtual void setClipping(const unsigned int &flags)
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
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:405
void display(vpImage< unsigned char > &I, const std::string &title)
Display a gray-scale image.