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