Visual Servoing Platform version 3.6.0
Loading...
Searching...
No Matches
mbtEdgeTracking.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 model based tracking.
33 *
34*****************************************************************************/
35
43#include <iostream>
44#include <visp3/core/vpConfig.h>
45
46#if (defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_DISPLAY)) && \
47 (defined(VISP_HAVE_LAPACK) || defined(VISP_HAVE_EIGEN3) || defined(VISP_HAVE_OPENCV))
48
49#include <visp3/core/vpDebug.h>
50#include <visp3/core/vpHomogeneousMatrix.h>
51#include <visp3/core/vpIoTools.h>
52#include <visp3/core/vpMath.h>
53#include <visp3/gui/vpDisplayD3D.h>
54#include <visp3/gui/vpDisplayGDI.h>
55#include <visp3/gui/vpDisplayGTK.h>
56#include <visp3/gui/vpDisplayOpenCV.h>
57#include <visp3/gui/vpDisplayX.h>
58#include <visp3/io/vpImageIo.h>
59#include <visp3/io/vpParseArgv.h>
60#include <visp3/io/vpVideoReader.h>
61#include <visp3/mbt/vpMbEdgeTracker.h>
62
63#define GETOPTARGS "x:m:i:n:de:chtfColwvp"
64
65void usage(const char *name, const char *badparam)
66{
67#if VISP_HAVE_DATASET_VERSION >= 0x030600
68 std::string ext("png");
69#else
70 std::string ext("pgm");
71#endif
72 fprintf(stdout, "\n\
73Example of tracking based on the 3D model.\n\
74\n\
75SYNOPSIS\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\
82OPTIONS: \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.%s\". 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 Optional 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 automate the \n\
128 execution of this program without human 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 ext.c_str());
148
149 if (badparam)
150 fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
151}
152
153bool getOptions(int argc, const char **argv, std::string &ipath, std::string &configFile, std::string &modelFile,
154 std::string &initFile, long &lastFrame, bool &displayFeatures, bool &click_allowed, bool &display,
155 bool &cao3DModel, bool &trackCylinder, bool &useOgre, bool &showOgreConfigDialog, bool &useScanline,
156 bool &computeCovariance, bool &projectionError)
157{
158 const char *optarg_;
159 int c;
160 while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg_)) > 1) {
161
162 switch (c) {
163 case 'e':
164 lastFrame = atol(optarg_);
165 break;
166 case 'i':
167 ipath = optarg_;
168 break;
169 case 'x':
170 configFile = optarg_;
171 break;
172 case 'm':
173 modelFile = optarg_;
174 break;
175 case 'n':
176 initFile = optarg_;
177 break;
178 case 't':
179 displayFeatures = false;
180 break;
181 case 'f':
182 cao3DModel = true;
183 break;
184 case 'c':
185 click_allowed = false;
186 break;
187 case 'd':
188 display = false;
189 break;
190 case 'C':
191 trackCylinder = false;
192 break;
193 case 'o':
194 useOgre = true;
195 break;
196 case 'l':
197 useScanline = true;
198 break;
199 case 'w':
200 showOgreConfigDialog = true;
201 break;
202 case 'v':
203 computeCovariance = true;
204 break;
205 case 'p':
206 projectionError = true;
207 break;
208 case 'h':
209 usage(argv[0], NULL);
210 return false;
211 break;
212
213 default:
214 usage(argv[0], optarg_);
215 return false;
216 break;
217 }
218 }
219
220 if ((c == 1) || (c == -1)) {
221 // standalone param or error
222 usage(argv[0], NULL);
223 std::cerr << "ERROR: " << std::endl;
224 std::cerr << " Bad argument " << optarg_ << std::endl << std::endl;
225 return false;
226 }
227
228 return true;
229}
230
231int main(int argc, const char **argv)
232{
233 try {
234 std::string env_ipath;
235 std::string opt_ipath;
236 std::string ipath;
237 std::string opt_configFile;
238 std::string configFile;
239 std::string opt_modelFile;
240 std::string modelFile;
241 std::string opt_initFile;
242 std::string initFile;
243 long opt_lastFrame = -1;
244 bool displayFeatures = true;
245 bool opt_click_allowed = true;
246 bool opt_display = true;
247 bool cao3DModel = false;
248 bool trackCylinder = true;
249 bool useOgre = false;
250 bool showOgreConfigDialog = false;
251 bool useScanline = false;
252 bool computeCovariance = false;
253 bool projectionError = false;
254 bool quit = false;
255
256#if VISP_HAVE_DATASET_VERSION >= 0x030600
257 std::string ext("png");
258#else
259 std::string ext("pgm");
260#endif
261
262 // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH
263 // environment variable value
265
266 // Set the default input path
267 if (!env_ipath.empty())
268 ipath = env_ipath;
269
270 // Read the command line options
271 if (!getOptions(argc, argv, opt_ipath, opt_configFile, opt_modelFile, opt_initFile, opt_lastFrame, displayFeatures,
272 opt_click_allowed, opt_display, cao3DModel, trackCylinder, useOgre, showOgreConfigDialog,
273 useScanline, computeCovariance, projectionError)) {
274 return EXIT_FAILURE;
275 }
276
277 // Test if an input path is set
278 if (opt_ipath.empty() && env_ipath.empty()) {
279 usage(argv[0], NULL);
280 std::cerr << std::endl << "ERROR:" << std::endl;
281 std::cerr << " Use -i <visp image path> option or set VISP_INPUT_IMAGE_PATH " << std::endl
282 << " environment variable to specify the location of the " << std::endl
283 << " image path where test images are located." << std::endl
284 << std::endl;
285
286 return EXIT_FAILURE;
287 }
288
289 // Get the option values
290 if (!opt_ipath.empty())
291 ipath = vpIoTools::createFilePath(opt_ipath, "mbt/cube/image%04d." + ext);
292 else
293 ipath = vpIoTools::createFilePath(env_ipath, "mbt/cube/image%04d." + ext);
294
295 if (!opt_configFile.empty())
296 configFile = opt_configFile;
297 else if (!opt_ipath.empty())
298 configFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube.xml");
299 else
300 configFile = vpIoTools::createFilePath(env_ipath, "mbt/cube.xml");
301
302 if (!opt_modelFile.empty()) {
303 modelFile = opt_modelFile;
304 }
305 else {
306 std::string modelFileCao;
307 std::string modelFileWrl;
308 if (trackCylinder) {
309 modelFileCao = "mbt/cube_and_cylinder.cao";
310 modelFileWrl = "mbt/cube_and_cylinder.wrl";
311 }
312 else {
313 modelFileCao = "mbt/cube.cao";
314 modelFileWrl = "mbt/cube.wrl";
315 }
316
317 if (!opt_ipath.empty()) {
318 if (cao3DModel) {
319 modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
320 }
321 else {
322#ifdef VISP_HAVE_COIN3D
323 modelFile = vpIoTools::createFilePath(opt_ipath, modelFileWrl);
324#else
325 std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
326 modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
327#endif
328 }
329 }
330 else {
331 if (cao3DModel) {
332 modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
333 }
334 else {
335#ifdef VISP_HAVE_COIN3D
336 modelFile = vpIoTools::createFilePath(env_ipath, modelFileWrl);
337#else
338 std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
339 modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
340#endif
341 }
342 }
343 }
344
345 if (!opt_initFile.empty())
346 initFile = opt_initFile;
347 else if (!opt_ipath.empty())
348 initFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube");
349 else
350 initFile = vpIoTools::createFilePath(env_ipath, "mbt/cube");
351
353 vpVideoReader reader;
354
355 reader.setFileName(ipath);
356 try {
357 reader.open(I);
358 }
359 catch (...) {
360 std::cout << "Cannot open sequence: " << ipath << std::endl;
361 return EXIT_FAILURE;
362 }
363
364 if (opt_lastFrame > 1 && opt_lastFrame < reader.getLastFrameIndex())
365 reader.setLastFrameIndex(opt_lastFrame);
366
367 reader.acquire(I);
368
369 // initialise a display
370#if defined(VISP_HAVE_X11)
371 vpDisplayX display;
372#elif defined(VISP_HAVE_GDI)
373 vpDisplayGDI display;
374#elif defined(HAVE_OPENCV_HIGHGUI)
375 vpDisplayOpenCV display;
376#elif defined(VISP_HAVE_D3D9)
377 vpDisplayD3D display;
378#elif defined(VISP_HAVE_GTK)
379 vpDisplayGTK display;
380#else
381 opt_display = false;
382#endif
383 if (opt_display) {
384#if defined(VISP_HAVE_DISPLAY)
385 display.init(I, 100, 100, "Test tracking");
386#endif
389 }
390
391 vpMbEdgeTracker tracker;
393
394 // Initialise the tracker: camera parameters, moving edge and KLT settings
396 // From the xml file
397 tracker.loadConfigFile(configFile);
398#if 0
399 // Corresponding parameters manually set to have an example code
400 // By setting the parameters:
401 cam.initPersProjWithoutDistortion(547, 542, 338, 234);
402
403 vpMe me;
404 me.setMaskSize(5);
405 me.setMaskNumber(180);
406 me.setRange(7);
408 me.setThreshold(10);
409 me.setMu1(0.5);
410 me.setMu2(0.5);
411 me.setSampleStep(4);
412
413 tracker.setCameraParameters(cam);
414 tracker.setMovingEdge(me);
415
416 // Specify the clipping to use
417 tracker.setNearClippingDistance(0.01);
418 tracker.setFarClippingDistance(0.90);
420 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
421 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
422 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
423#endif
424
425 // Display the moving edges, see documentation for the signification of
426 // the colours
427 tracker.setDisplayFeatures(displayFeatures);
428
429 // Tells if the tracker has to use Ogre3D for visibility tests
430 tracker.setOgreVisibilityTest(useOgre);
431 if (useOgre)
432 tracker.setOgreShowConfigDialog(showOgreConfigDialog);
433
434 // Tells if the tracker has to use the scanline visibility tests
435 tracker.setScanLineVisibilityTest(useScanline);
436
437 // Tells if the tracker has to compute the covariance matrix
438 tracker.setCovarianceComputation(computeCovariance);
439
440 // Tells if the tracker has to compute the projection error
441 tracker.setProjectionErrorComputation(projectionError);
442
443 // Retrieve the camera parameters from the tracker
444 tracker.getCameraParameters(cam);
445
446 // Loop to position the cube
447 if (opt_display && opt_click_allowed) {
448 while (!vpDisplay::getClick(I, false)) {
450 vpDisplay::displayText(I, 15, 10, "click after positioning the object", vpColor::red);
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 // (Optional, set by the third parameter)
464 if (opt_display && opt_click_allowed) {
465 tracker.initClick(I, initFile, true);
466 tracker.getPose(cMo);
467 // display the 3D model at the given pose
468 tracker.display(I, cMo, cam, vpColor::red);
469 }
470 else {
471 vpHomogeneousMatrix cMoi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
472 tracker.initFromPose(I, cMoi);
473 }
474
475 // track the model
476 tracker.track(I);
477 tracker.getPose(cMo);
478
479 if (opt_display)
481
482 while (!reader.end()) {
483 // acquire a new image
484 reader.acquire(I);
485 // display the image
486 if (opt_display)
488
489 // Test to reset the tracker
490 if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 10) {
491 vpTRACE("Test reset tracker");
492 if (opt_display)
494 tracker.resetTracker();
495 tracker.loadConfigFile(configFile);
496#if 0
497 // Corresponding parameters manually set to have an example code
498 // By setting the parameters:
499 cam.initPersProjWithoutDistortion(547, 542, 338, 234);
500
501 vpMe me;
502 me.setMaskSize(5);
503 me.setMaskNumber(180);
504 me.setRange(7);
506 me.setThreshold(10);
507 me.setMu1(0.5);
508 me.setMu2(0.5);
509 me.setSampleStep(4);
510
511 tracker.setCameraParameters(cam);
512 tracker.setMovingEdge(me);
513
514 // Specify the clipping to use
515 tracker.setNearClippingDistance(0.01);
516 tracker.setFarClippingDistance(0.90);
518 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
519 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
520 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
521#endif
522 tracker.loadModel(modelFile);
523 tracker.setCameraParameters(cam);
524 tracker.setOgreVisibilityTest(useOgre);
525 tracker.setScanLineVisibilityTest(useScanline);
526 tracker.setCovarianceComputation(computeCovariance);
527 tracker.setProjectionErrorComputation(projectionError);
528 tracker.initFromPose(I, cMo);
529 }
530
531 // Test to set an initial pose
532 if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 50) {
533 cMo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
534 vpTRACE("Test set pose");
535 tracker.setPose(I, cMo);
536 // if (opt_display) {
537 // // display the 3D model
538 // tracker.display(I, cMo, cam, vpColor::darkRed);
539 // // display the frame
540 // vpDisplay::displayFrame (I, cMo, cam, 0.05);
545 // }
546 }
547
548 // track the object: stop tracking from frame 40 to 50
549 if (reader.getFrameIndex() - reader.getFirstFrameIndex() < 40 ||
550 reader.getFrameIndex() - reader.getFirstFrameIndex() >= 50) {
551 tracker.track(I);
552 tracker.getPose(cMo);
553 if (opt_display) {
554 // display the 3D model
555 tracker.display(I, cMo, cam, vpColor::darkRed);
556 // display the frame
557 vpDisplay::displayFrame(I, cMo, cam, 0.05);
558 }
559 }
560
561 if (opt_click_allowed) {
562 vpDisplay::displayText(I, 10, 10, "Click to quit", vpColor::red);
563 if (vpDisplay::getClick(I, 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 if (opt_display)
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 return EXIT_SUCCESS;
589 }
590 catch (const vpException &e) {
591 std::cout << "Catch an exception: " << e << std::endl;
592 return EXIT_FAILURE;
593 }
594}
595
596#elif !(defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_DISPLAY))
597int main()
598{
599 std::cout << "Cannot run this example: visp_mbt, visp_gui modules are required." << std::endl;
600 return EXIT_SUCCESS;
601}
602#else
603int main()
604{
605 std::cout << "Cannot run this example: install Lapack, Eigen3 or OpenCV" << std::endl;
606 return EXIT_SUCCESS;
607}
608#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....
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
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:132
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)
Definition of the vpImage class member functions.
Definition vpImage.h:135
static std::string getViSPImagesDataPath()
static std::string createFilePath(const std::string &parent, const std::string &child)
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)
virtual void getCameraParameters(vpCameraParameters &cam) const
virtual void setDisplayFeatures(bool displayF)
virtual void getPose(vpHomogeneousMatrix &cMo) const
virtual void setCovarianceComputation(const bool &flag)
virtual void initClick(const vpImage< unsigned char > &I, const std::string &initFile, bool displayHelp=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual vpMatrix getCovarianceMatrix() const
virtual double getProjectionError() const
virtual void setProjectionErrorComputation(const bool &flag)
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 vpMe.h:122
void setMu1(const double &mu_1)
Definition vpMe.h:353
void setSampleStep(const double &s)
Definition vpMe.h:390
void setRange(const unsigned int &r)
Definition vpMe.h:383
void setLikelihoodThresholdType(const vpLikelihoodThresholdType likelihood_threshold_type)
Definition vpMe.h:445
void setMaskSize(const unsigned int &a)
Definition vpMe.cpp:452
void setMu2(const double &mu_2)
Definition vpMe.h:360
@ NORMALIZED_THRESHOLD
Easy-to-use normalized likelihood threshold corresponding to the minimal luminance contrast to consid...
Definition vpMe.h:132
void setMaskNumber(const unsigned int &a)
Definition vpMe.cpp:445
void setThreshold(const double &t)
Definition vpMe.h:435
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
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:411