Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
mbtEdgeKltTracking.cpp
1/*
2 * ViSP, open source Visual Servoing Platform software.
3 * Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4 *
5 * This software is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * See the file LICENSE.txt at the root directory of this source
10 * distribution for additional information about the GNU GPL.
11 *
12 * For using ViSP with software that can not be combined with the GNU
13 * GPL, please contact Inria about acquiring a ViSP Professional
14 * Edition License.
15 *
16 * See https://visp.inria.fr for more information.
17 *
18 * This software was developed at:
19 * Inria Rennes - Bretagne Atlantique
20 * Campus Universitaire de Beaulieu
21 * 35042 Rennes Cedex
22 * France
23 *
24 * If you have questions regarding the use of this file, please contact
25 * Inria at visp@inria.fr
26 *
27 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29 *
30 * Description:
31 * Example of Hybrid Tracking of MBT and MBT KTL.
32 */
33
40
41#include <iostream>
42#include <visp3/core/vpConfig.h>
43
44#if defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && \
45 defined(VISP_HAVE_DISPLAY) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO)
46
47#include <visp3/core/vpDebug.h>
48#include <visp3/core/vpHomogeneousMatrix.h>
49#include <visp3/core/vpIoTools.h>
50#include <visp3/core/vpMath.h>
51#include <visp3/gui/vpDisplayD3D.h>
52#include <visp3/gui/vpDisplayGDI.h>
53#include <visp3/gui/vpDisplayGTK.h>
54#include <visp3/gui/vpDisplayOpenCV.h>
55#include <visp3/gui/vpDisplayX.h>
56#include <visp3/io/vpImageIo.h>
57#include <visp3/io/vpParseArgv.h>
58#include <visp3/io/vpVideoReader.h>
59#include <visp3/mbt/vpMbEdgeKltTracker.h>
60
61#define GETOPTARGS "x:m:i:n:de:chtfColwvp"
62
63#ifdef ENABLE_VISP_NAMESPACE
64using namespace VISP_NAMESPACE_NAME;
65#endif
66
67void usage(const char *name, const char *badparam)
68{
69#if defined(VISP_HAVE_DATASET)
70#if VISP_HAVE_DATASET_VERSION >= 0x030600
71 std::string ext("png");
72#else
73 std::string ext("pgm");
74#endif
75#else
76 // We suppose that the user will download a recent dataset
77 std::string ext("png");
78#endif
79
80 fprintf(stdout, "\n\
81Example of tracking based on the 3D model.\n\
82\n\
83SYNOPSIS\n\
84 %s [-i <test image path>] [-x <config file>]\n\
85 [-m <model name>] [-n <initialisation file base name>] [-e <last frame index>]\n\
86 [-t] [-c] [-d] [-h] [-f] [-C] [-o] [-w] [-l] [-v] [-p]\n",
87 name);
88
89 fprintf(stdout, "\n\
90OPTIONS: \n\
91 -i <input image path> \n\
92 Set image input path.\n\
93 From this path read images \n\
94 \"mbt/cube/image%%04d.%s\". These \n\
95 images come from visp-images-x.y.z.tar.gz available \n\
96 on the ViSP website.\n\
97 Setting the VISP_INPUT_IMAGE_PATH environment\n\
98 variable produces the same behaviour than using\n\
99 this option.\n\
100\n\
101 -x <config file> \n\
102 Set the config file (the xml file) to use.\n\
103 The config file is used to specify the parameters of the tracker.\n\
104\n\
105 -m <model name> \n\
106 Specify the name of the file of the model\n\
107 The model can either be a vrml model (.wrl) or a .cao file.\n\
108\n\
109 -e <last frame index> \n\
110 Specify the index of the last frame. Once reached, the tracking is stopped\n\
111\n\
112 -f \n\
113 Do not use the vrml model, use the .cao one. These two models are \n\
114 equivalent and comes from ViSP-images-x.y.z.tar.gz available on the ViSP\n\
115 website. However, the .cao model allows to use the 3d model based tracker \n\
116 without Coin.\n\
117\n\
118 -C \n\
119 Track only the cube (not the cylinder). In this case the models files are\n\
120 cube.cao or cube.wrl instead of cube_and_cylinder.cao and \n\
121 cube_and_cylinder.wrl.\n\
122\n\
123 -n <initialisation file base name> \n\
124 Base name of the initialisation file. The file will be 'base_name'.init .\n\
125 This base name is also used for the Optional picture specifying where to \n\
126 click (a .ppm picture).\n\
127\n\
128 -t \n\
129 Turn off the display of the the moving edges and Klt points. \n\
130\n\
131 -d \n\
132 Turn off the display.\n\
133\n\
134 -c\n\
135 Disable the mouse click. Useful to automate the \n\
136 execution of this program without human intervention.\n\
137\n\
138 -o\n\
139 Use Ogre3D for visibility tests\n\
140\n\
141 -w\n\
142 When Ogre3D is enable [-o] show Ogre3D configuration dialog thatallows to set the renderer.\n\
143\n\
144 -l\n\
145 Use the scanline for visibility tests.\n\
146\n\
147 -v\n\
148 Compute covariance matrix.\n\
149\n\
150 -p\n\
151 Compute gradient projection error.\n\
152\n\
153 -h \n\
154 Print the help.\n\n",
155 ext.c_str());
156
157 if (badparam)
158 fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
159}
160
161bool getOptions(int argc, const char **argv, std::string &ipath, std::string &configFile, std::string &modelFile,
162 std::string &initFile, long &lastFrame, bool &displayFeatures, bool &click_allowed, bool &display,
163 bool &cao3DModel, bool &trackCylinder, bool &useOgre, bool &showOgreConfigDialog, bool &useScanline,
164 bool &computeCovariance, bool &projectionError)
165{
166 const char *optarg_;
167 int c;
168 while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg_)) > 1) {
169
170 switch (c) {
171 case 'e':
172 lastFrame = atol(optarg_);
173 break;
174 case 'i':
175 ipath = optarg_;
176 break;
177 case 'x':
178 configFile = optarg_;
179 break;
180 case 'm':
181 modelFile = optarg_;
182 break;
183 case 'n':
184 initFile = optarg_;
185 break;
186 case 't':
187 displayFeatures = false;
188 break;
189 case 'f':
190 cao3DModel = true;
191 break;
192 case 'c':
193 click_allowed = false;
194 break;
195 case 'd':
196 display = false;
197 break;
198 case 'C':
199 trackCylinder = false;
200 break;
201 case 'o':
202 useOgre = true;
203 break;
204 case 'l':
205 useScanline = true;
206 break;
207 case 'w':
208 showOgreConfigDialog = true;
209 break;
210 case 'v':
211 computeCovariance = true;
212 break;
213 case 'p':
214 projectionError = true;
215 break;
216 case 'h':
217 usage(argv[0], nullptr);
218 return false;
219
220 default:
221 usage(argv[0], optarg_);
222 return false;
223 }
224 }
225
226 if ((c == 1) || (c == -1)) {
227 // standalone param or error
228 usage(argv[0], nullptr);
229 std::cerr << "ERROR: " << std::endl;
230 std::cerr << " Bad argument " << optarg_ << std::endl << std::endl;
231 return false;
232 }
233
234 return true;
235}
236
237int main(int argc, const char **argv)
238{
239 try {
240 std::string env_ipath;
241 std::string opt_ipath;
242 std::string ipath;
243 std::string opt_configFile;
244 std::string configFile;
245 std::string opt_modelFile;
246 std::string modelFile;
247 std::string opt_initFile;
248 std::string initFile;
249 long opt_lastFrame = -1;
250 bool displayFeatures = true;
251 bool opt_click_allowed = true;
252 bool opt_display = true;
253 bool cao3DModel = false;
254 bool trackCylinder = true;
255 bool useOgre = false;
256 bool showOgreConfigDialog = false;
257 bool useScanline = false;
258 bool computeCovariance = false;
259 bool projectionError = false;
260 bool quit = false;
261
262#if defined(VISP_HAVE_DATASET)
263#if VISP_HAVE_DATASET_VERSION >= 0x030600
264 std::string ext("png");
265#else
266 std::string ext("pgm");
267#endif
268#else
269 // We suppose that the user will download a recent dataset
270 std::string ext("png");
271#endif
272
273 // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH
274 // environment variable value
276
277 // Set the default input path
278 if (!env_ipath.empty())
279 ipath = env_ipath;
280
281 // Read the command line options
282 if (!getOptions(argc, argv, opt_ipath, opt_configFile, opt_modelFile, opt_initFile, opt_lastFrame, displayFeatures,
283 opt_click_allowed, opt_display, cao3DModel, trackCylinder, useOgre, showOgreConfigDialog,
284 useScanline, computeCovariance, projectionError)) {
285 return EXIT_FAILURE;
286 }
287
288 // Test if an input path is set
289 if (opt_ipath.empty() && env_ipath.empty()) {
290 usage(argv[0], nullptr);
291 std::cerr << std::endl << "ERROR:" << std::endl;
292 std::cerr << " Use -i <visp image path> option or set VISP_INPUT_IMAGE_PATH " << std::endl
293 << " environment variable to specify the location of the " << std::endl
294 << " image path where test images are located." << std::endl
295 << std::endl;
296
297 return EXIT_FAILURE;
298 }
299
300 // Get the option values
301 if (!opt_ipath.empty())
302 ipath = vpIoTools::createFilePath(opt_ipath, "mbt/cube/image%04d." + ext);
303 else
304 ipath = vpIoTools::createFilePath(env_ipath, "mbt/cube/image%04d." + ext);
305
306 if (!opt_configFile.empty())
307 configFile = opt_configFile;
308 else if (!opt_ipath.empty())
309 configFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube.xml");
310 else
311 configFile = vpIoTools::createFilePath(env_ipath, "mbt/cube.xml");
312
313 if (!opt_modelFile.empty()) {
314 modelFile = opt_modelFile;
315 }
316 else {
317 std::string modelFileCao;
318 std::string modelFileWrl;
319 if (trackCylinder) {
320 modelFileCao = "mbt/cube_and_cylinder.cao";
321 modelFileWrl = "mbt/cube_and_cylinder.wrl";
322 }
323 else {
324 modelFileCao = "mbt/cube.cao";
325 modelFileWrl = "mbt/cube.wrl";
326 }
327
328 if (!opt_ipath.empty()) {
329 if (cao3DModel) {
330 modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
331 }
332 else {
333#ifdef VISP_HAVE_COIN3D
334 modelFile = vpIoTools::createFilePath(opt_ipath, modelFileWrl);
335#else
336 std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
337 modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
338#endif
339 }
340 }
341 else {
342 if (cao3DModel) {
343 modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
344 }
345 else {
346#ifdef VISP_HAVE_COIN3D
347 modelFile = vpIoTools::createFilePath(env_ipath, modelFileWrl);
348#else
349 std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
350 modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
351#endif
352 }
353 }
354 }
355
356 if (!opt_initFile.empty())
357 initFile = opt_initFile;
358 else if (!opt_ipath.empty())
359 initFile = vpIoTools::createFilePath(opt_ipath, "mbt/cube");
360 else
361 initFile = vpIoTools::createFilePath(env_ipath, "mbt/cube");
362
364 vpVideoReader reader;
365
366 reader.setFileName(ipath);
367 try {
368 reader.open(I);
369 }
370 catch (...) {
371 std::cout << "Cannot open sequence: " << ipath << std::endl;
372 return EXIT_FAILURE;
373 }
374
375 if (opt_lastFrame > 1 && opt_lastFrame < reader.getLastFrameIndex())
376 reader.setLastFrameIndex(opt_lastFrame);
377
378 reader.acquire(I);
379
380 // initialise a display
381#if defined(VISP_HAVE_X11)
382 vpDisplayX display;
383#elif defined(VISP_HAVE_GDI)
384 vpDisplayGDI display;
385#elif defined(HAVE_OPENCV_HIGHGUI)
386 vpDisplayOpenCV display;
387#elif defined(VISP_HAVE_D3D9)
388 vpDisplayD3D display;
389#elif defined(VISP_HAVE_GTK)
390 vpDisplayGTK display;
391#else
392 opt_display = false;
393#endif
394 if (opt_display) {
395#if defined(VISP_HAVE_DISPLAY)
396 display.init(I, 100, 100, "Test tracking");
397#endif
400 }
401
405
406 // Initialise the tracker: camera parameters, moving edge and KLT settings
407
408#if defined(VISP_HAVE_PUGIXML)
409 // From the xml file
410 tracker.loadConfigFile(configFile);
411#else
412 // Corresponding parameters manually set to have an example code
413 // By setting the parameters:
414 cam.initPersProjWithoutDistortion(547, 542, 338, 234);
415
416 vpMe me;
417 me.setMaskSize(5);
418 me.setMaskNumber(180);
419 me.setRange(7);
421 me.setThreshold(15);
422 me.setMu1(0.5);
423 me.setMu2(0.5);
424 me.setSampleStep(4);
425
426 vpKltOpencv klt;
427 klt.setMaxFeatures(10000);
428 klt.setWindowSize(5);
429 klt.setQuality(0.01);
430 klt.setMinDistance(5);
431 klt.setHarrisFreeParameter(0.01);
432 klt.setBlockSize(3);
433 klt.setPyramidLevels(3);
434
435 tracker.setCameraParameters(cam);
436 tracker.setMovingEdge(me);
437 tracker.setKltOpencv(klt);
438 tracker.setKltMaskBorder(5);
439 tracker.setAngleAppear(vpMath::rad(65));
440 tracker.setAngleDisappear(vpMath::rad(75));
441
442 // Specify the clipping to
443 tracker.setNearClippingDistance(0.01);
444 tracker.setFarClippingDistance(0.90);
445 tracker.setClipping(tracker.getClipping() | vpMbtPolygon::FOV_CLIPPING);
446 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
447 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
448 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
449#endif
450
451 // Display the moving edges, and the Klt points
452 tracker.setDisplayFeatures(displayFeatures);
453
454 // Tells if the tracker has to use Ogre3D for visibility tests
455 tracker.setOgreVisibilityTest(useOgre);
456 if (useOgre)
457 tracker.setOgreShowConfigDialog(showOgreConfigDialog);
458
459 // Tells if the tracker has to use the scanline visibility tests
460 tracker.setScanLineVisibilityTest(useScanline);
461
462 // Tells if the tracker has to compute the covariance matrix
463 tracker.setCovarianceComputation(computeCovariance);
464
465 // Tells if the tracker has to compute the projection error
466 tracker.setProjectionErrorComputation(projectionError);
467
468 // Retrieve the camera parameters from the tracker
469 tracker.getCameraParameters(cam);
470
471 // Loop to position the cube
472 if (opt_display && opt_click_allowed) {
473 while (!vpDisplay::getClick(I, false)) {
475 vpDisplay::displayText(I, 15, 10, "click after positioning the object", vpColor::red);
477 vpTime::wait(100);
478 }
479 }
480
481 // Load the 3D model (either a vrml file or a .cao file)
482 tracker.loadModel(modelFile);
483
484 // Initialise the tracker by clicking on the image
485 // This function looks for
486 // - a ./cube/cube.init file that defines the 3d coordinates (in meter,
487 // in the object basis) of the points used for the initialisation
488 // - a ./cube/cube.ppm file to display where the user have to click
489 // (Optional, set by the third parameter)
490 if (opt_display && opt_click_allowed) {
491 tracker.initClick(I, initFile, true);
492 tracker.getPose(cMo);
493 // display the 3D model at the given pose
494 tracker.display(I, cMo, cam, vpColor::red);
495 }
496 else {
497 vpHomogeneousMatrix cMoi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
498 tracker.initFromPose(I, cMoi);
499 }
500
501 // track the model
502 tracker.track(I);
503 tracker.getPose(cMo);
504
505 if (opt_display)
507
508 while (!reader.end()) {
509 // acquire a new image
510 reader.acquire(I);
511 // display the image
512 if (opt_display)
514
515 // Test to reset the tracker
516 if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 10) {
517 vpTRACE("Test reset tracker");
518 if (opt_display)
520 tracker.resetTracker();
521#if defined(VISP_HAVE_PUGIXML)
522 tracker.loadConfigFile(configFile);
523#else
524 // Corresponding parameters manually set to have an example code
525 // By setting the parameters:
526 cam.initPersProjWithoutDistortion(547, 542, 338, 234);
527
528 vpMe me;
529 me.setMaskSize(5);
530 me.setMaskNumber(180);
531 me.setRange(7);
533 me.setThreshold(15);
534 me.setMu1(0.5);
535 me.setMu2(0.5);
536 me.setSampleStep(4);
537
538 vpKltOpencv klt;
539 klt.setMaxFeatures(10000);
540 klt.setWindowSize(5);
541 klt.setQuality(0.01);
542 klt.setMinDistance(5);
543 klt.setHarrisFreeParameter(0.01);
544 klt.setBlockSize(3);
545 klt.setPyramidLevels(3);
546
547 tracker.setCameraParameters(cam);
548 tracker.setMovingEdge(me);
549 tracker.setKltOpencv(klt);
550 tracker.setKltMaskBorder(5);
551 tracker.setAngleAppear(vpMath::rad(65));
552 tracker.setAngleDisappear(vpMath::rad(75));
553
554 // Specify the clipping to
555 tracker.setNearClippingDistance(0.01);
556 tracker.setFarClippingDistance(0.90);
557 tracker.setClipping(tracker.getClipping() | vpMbtPolygon::FOV_CLIPPING);
558 // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING |
559 // vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING |
560 // vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
561#endif
562 tracker.loadModel(modelFile);
563 tracker.setCameraParameters(cam);
564 tracker.setOgreVisibilityTest(useOgre);
565 tracker.setScanLineVisibilityTest(useScanline);
566 tracker.setCovarianceComputation(computeCovariance);
567 tracker.setProjectionErrorComputation(projectionError);
568 tracker.initFromPose(I, cMo);
569 }
570
571 // Test to set an initial pose
572 if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 50) {
573 cMo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
574 vpTRACE("Test set pose");
575 tracker.setPose(I, cMo);
576 // if (opt_display) {
577 // // display the 3D model
578 // tracker.display(I, cMo, cam, vpColor::darkRed);
579 // // display the frame
580 // vpDisplay::displayFrame (I, cMo, cam, 0.05);
585 // }
586 }
587
588 // track the object: stop tracking from frame 40 to 50
589 if (reader.getFrameIndex() - reader.getFirstFrameIndex() < 40 ||
590 reader.getFrameIndex() - reader.getFirstFrameIndex() >= 50) {
591 tracker.track(I);
592 tracker.getPose(cMo);
593 if (opt_display) {
594 // display the 3D model
595 tracker.display(I, cMo, cam, vpColor::darkRed);
596 // display the frame
597 vpDisplay::displayFrame(I, cMo, cam, 0.05);
598 }
599 }
600
601 if (opt_click_allowed) {
602 vpDisplay::displayText(I, 10, 10, "Click to quit", vpColor::red);
603 if (vpDisplay::getClick(I, false)) {
604 quit = true;
605 break;
606 }
607 }
608
609 if (computeCovariance) {
610 std::cout << "Covariance matrix: \n" << tracker.getCovarianceMatrix() << std::endl << std::endl;
611 }
612
613 if (projectionError) {
614 std::cout << "Projection error: " << tracker.getProjectionError() << std::endl << std::endl;
615 }
616
617 if (opt_display)
619 }
620
621 std::cout << "Reached last frame: " << reader.getFrameIndex() << std::endl;
622
623 if (opt_click_allowed && !quit) {
625 }
626 reader.close();
627
628 return EXIT_SUCCESS;
629 }
630 catch (const vpException &e) {
631 std::cout << "Catch an exception: " << e << std::endl;
632 return EXIT_FAILURE;
633 }
634}
635
636#else
637
638int main()
639{
640 std::cout << "visp_mbt, visp_gui modules and OpenCV are required to run "
641 "this example."
642 << std::endl;
643 return EXIT_SUCCESS;
644}
645
646#endif
Generic class defining intrinsic camera parameters.
static const vpColor red
Definition vpColor.h:198
static const vpColor darkRed
Definition vpColor.h:199
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:135
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:60
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition of the vpImage class member functions.
Definition vpImage.h:131
static std::string getViSPImagesDataPath()
static std::string createFilePath(const std::string &parent, const std::string &child)
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Definition vpKltOpencv.h:83
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:129
Hybrid tracker based on moving-edges and keypoints tracked using KLT tracker.
Definition vpMe.h:143
void setMu1(const double &mu_1)
Definition vpMe.h:408
void setRange(const unsigned int &range)
Definition vpMe.h:438
void setLikelihoodThresholdType(const vpLikelihoodThresholdType likelihood_threshold_type)
Definition vpMe.h:531
void setMaskNumber(const unsigned int &mask_number)
Definition vpMe.cpp:555
void setThreshold(const double &threshold)
Definition vpMe.h:489
void setSampleStep(const double &sample_step)
Definition vpMe.h:445
void setMaskSize(const unsigned int &mask_size)
Definition vpMe.cpp:563
void setMu2(const double &mu_2)
Definition vpMe.h:415
@ NORMALIZED_THRESHOLD
Definition vpMe.h:154
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 setLastFrameIndex(const long last_frame)
long getLastFrameIndex()
void open(vpImage< vpRGBa > &I) VP_OVERRIDE
void setFileName(const std::string &filename)
long getFirstFrameIndex()
void close() VP_OVERRIDE
long getFrameIndex() const
void acquire(vpImage< vpRGBa > &I) VP_OVERRIDE
#define vpTRACE
Definition vpDebug.h:450
VISP_EXPORT int wait(double t0, double t)