Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mbtEdgeKltMultiTracking.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
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
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 http://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  * Authors:
34  * Aurelien Yol
35  * Souriya Trinh
36  *
37  *****************************************************************************/
38 
45 #include <iostream>
46 #include <visp3/core/vpConfig.h>
47 
48 #if defined(VISP_HAVE_MODULE_MBT) && defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(VISP_HAVE_DISPLAY) && (VISP_HAVE_OPENCV_VERSION >= 0x020100)
49 
50 #include <visp3/core/vpDebug.h>
51 #include <visp3/gui/vpDisplayD3D.h>
52 #include <visp3/gui/vpDisplayGTK.h>
53 #include <visp3/gui/vpDisplayGDI.h>
54 #include <visp3/gui/vpDisplayOpenCV.h>
55 #include <visp3/gui/vpDisplayX.h>
56 #include <visp3/core/vpHomogeneousMatrix.h>
57 #include <visp3/io/vpImageIo.h>
58 #include <visp3/core/vpIoTools.h>
59 #include <visp3/core/vpMath.h>
60 #include <visp3/io/vpVideoReader.h>
61 #include <visp3/io/vpParseArgv.h>
62 #include <visp3/mbt/vpMbEdgeKltMultiTracker.h>
63 
64 #define GETOPTARGS "x:m:i:n:dchtfColwvp"
65 
66 
67 void usage(const char *name, const char *badparam)
68 {
69  fprintf(stdout, "\n\
70 Example of tracking based on the 3D model.\n\
71 \n\
72 SYNOPSIS\n\
73  %s [-i <test image path>] [-x <config file>]\n\
74  [-m <model name>] [-n <initialisation file base name>]\n\
75  [-t] [-c] [-d] [-h] [-f] [-C] [-o] [-w] [-l] [-v] [-p]",
76  name );
77 
78  fprintf(stdout, "\n\
79 OPTIONS: \n\
80  -i <input image path> \n\
81  Set image input path.\n\
82  From this path read images \n\
83  \"ViSP-images/mbt/cube/image%%04d.ppm\". These \n\
84  images come from ViSP-images-x.y.z.tar.gz available \n\
85  on the ViSP website.\n\
86  Setting the VISP_INPUT_IMAGE_PATH environment\n\
87  variable produces the same behavior than using\n\
88  this option.\n\
89 \n\
90  -x <config file> \n\
91  Set the config file (the xml file) to use.\n\
92  The config file is used to specify the parameters of the tracker.\n\
93 \n\
94  -m <model name> \n\
95  Specify the name of the file of the model\n\
96  The model can either be a vrml model (.wrl) or a .cao file.\n\
97 \n\
98  -f \n\
99  Do not use the vrml model, use the .cao one. These two models are \n\
100  equivalent and comes from ViSP-images-x.y.z.tar.gz available on the ViSP\n\
101  website. However, the .cao model allows to use the 3d model based tracker \n\
102  without Coin.\n\
103 \n\
104  -C \n\
105  Track only the cube (not the cylinder). In this case the models files are\n\
106  cube.cao or cube.wrl instead of cube_and_cylinder.cao and \n\
107  cube_and_cylinder.wrl.\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).\
113 \n\
114  -t \n\
115  Turn off the display of the the moving edges and 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 that allows 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  -v\n\
137  Compute gradient projection error.\n\
138 \n\
139  -h \n\
140  Print the help.\n\n");
141 
142  if (badparam)
143  fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
144 }
145 
146 
147 bool getOptions(int argc, const char **argv, std::string &ipath, std::string &configFile, std::string &modelFile,
148  std::string &initFile, bool &displayFeatures, bool &click_allowed, bool &display,
149  bool& cao3DModel, bool& trackCylinder, bool &useOgre, bool &showOgreConfigDialog,
150  bool &useScanline, bool &computeCovariance, bool &projectionError)
151 {
152  const char *optarg_;
153  int c;
154  while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg_)) > 1) {
155 
156  switch (c) {
157  case 'i': ipath = optarg_; break;
158  case 'x': configFile = optarg_; break;
159  case 'm': modelFile = optarg_; break;
160  case 'n': initFile = optarg_; break;
161  case 't': displayFeatures = false; break;
162  case 'f': cao3DModel = true; break;
163  case 'c': click_allowed = false; break;
164  case 'd': display = false; break;
165  case 'C': trackCylinder = false; break;
166  case 'o': useOgre = true; break;
167  case 'l': useScanline = true; break;
168  case 'w': showOgreConfigDialog = true; break;
169  case 'v': computeCovariance = true; break;
170  case 'p': projectionError = true; break;
171  case 'h': usage(argv[0], NULL); return false; break;
172 
173  default:
174  usage(argv[0], optarg_);
175  return false; break;
176  }
177  }
178 
179  if ((c == 1) || (c == -1)) {
180  // standalone param or error
181  usage(argv[0], NULL);
182  std::cerr << "ERROR: " << std::endl;
183  std::cerr << " Bad argument " << optarg_ << std::endl << std::endl;
184  return false;
185  }
186 
187  return true;
188 }
189 
190 int
191 main(int argc, const char ** argv)
192 {
193  try {
194  std::string env_ipath;
195  std::string opt_ipath;
196  std::string ipath;
197  std::string opt_configFile;
198  std::string configFile;
199  std::string opt_modelFile;
200  std::string modelFile;
201  std::string opt_initFile;
202  std::string initFile;
203  bool displayFeatures = true;
204  bool opt_click_allowed = true;
205  bool opt_display = true;
206  bool cao3DModel = false;
207  bool trackCylinder = true;
208  bool useOgre = false;
209  bool showOgreConfigDialog = false;
210  bool useScanline = false;
211  bool computeCovariance = false;
212  bool projectionError = false;
213  bool quit = false;
214 
215  // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH environment variable value
216  env_ipath = vpIoTools::getViSPImagesDataPath();
217 
218  // Set the default input path
219  if (! env_ipath.empty())
220  ipath = env_ipath;
221 
222  // Read the command line options
223  if (!getOptions(argc, argv, opt_ipath, opt_configFile, opt_modelFile, opt_initFile, displayFeatures,
224  opt_click_allowed, opt_display, cao3DModel, trackCylinder, useOgre, showOgreConfigDialog,
225  useScanline, computeCovariance, projectionError)) {
226  return (-1);
227  }
228 
229  // Test if an input path is set
230  if (opt_ipath.empty() && env_ipath.empty() ){
231  usage(argv[0], NULL);
232  std::cerr << std::endl
233  << "ERROR:" << std::endl;
234  std::cerr << " Use -i <visp image path> option or set VISP_INPUT_IMAGE_PATH "
235  << std::endl
236  << " environment variable to specify the location of the " << std::endl
237  << " image path where test images are located." << std::endl
238  << std::endl;
239 
240  return (-1);
241  }
242 
243  // Get the option values
244  if (!opt_ipath.empty())
245  ipath = vpIoTools::createFilePath(opt_ipath, "ViSP-images/mbt/cube/image%04d.pgm");
246  else
247  ipath = vpIoTools::createFilePath(env_ipath, "ViSP-images/mbt/cube/image%04d.pgm");
248 
249  if (!opt_configFile.empty())
250  configFile = opt_configFile;
251  else if (!opt_ipath.empty())
252  configFile = vpIoTools::createFilePath(opt_ipath, "ViSP-images/mbt/cube.xml");
253  else
254  configFile = vpIoTools::createFilePath(env_ipath, "ViSP-images/mbt/cube.xml");
255 
256  if (!opt_modelFile.empty()){
257  modelFile = opt_modelFile;
258  }else{
259  std::string modelFileCao;
260  std::string modelFileWrl;
261  if(trackCylinder){
262  modelFileCao = "ViSP-images/mbt/cube_and_cylinder.cao";
263  modelFileWrl = "ViSP-images/mbt/cube_and_cylinder.wrl";
264  }else{
265  modelFileCao = "ViSP-images/mbt/cube.cao";
266  modelFileWrl = "ViSP-images/mbt/cube.wrl";
267  }
268 
269  if(!opt_ipath.empty()){
270  if(cao3DModel){
271  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
272  }
273  else{
274 #ifdef VISP_HAVE_COIN3D
275  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileWrl);
276 #else
277  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
278  modelFile = vpIoTools::createFilePath(opt_ipath, modelFileCao);
279 #endif
280  }
281  }
282  else{
283  if(cao3DModel){
284  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
285  }
286  else{
287 #ifdef VISP_HAVE_COIN3D
288  modelFile = vpIoTools::createFilePath(env_ipath, modelFileWrl);
289 #else
290  std::cerr << "Coin is not detected in ViSP. Use the .cao model instead." << std::endl;
291  modelFile = vpIoTools::createFilePath(env_ipath, modelFileCao);
292 #endif
293  }
294  }
295  }
296 
297  if (!opt_initFile.empty())
298  initFile = opt_initFile;
299  else if (!opt_ipath.empty())
300  initFile = vpIoTools::createFilePath(opt_ipath, "ViSP-images/mbt/cube");
301  else
302  initFile = vpIoTools::createFilePath(env_ipath, "ViSP-images/mbt/cube");
303 
304  vpImage<unsigned char> I1, I2;
305  vpVideoReader reader;
306 
307  reader.setFileName(ipath);
308  try{
309  reader.open(I1);
310  I2 = I1;
311  }catch(...){
312  std::cout << "Cannot open sequence: " << ipath << std::endl;
313  return -1;
314  }
315 
316  reader.acquire(I1);
317  I2 = I1;
318 
319  // initialise a display
320 #if defined VISP_HAVE_X11
321  vpDisplayX display1, display2;
322 #elif defined VISP_HAVE_GDI
323  vpDisplayGDI display1, display2;
324 #elif defined VISP_HAVE_OPENCV
325  vpDisplayOpenCV display1, display2;
326 #elif defined VISP_HAVE_D3D9
327  vpDisplayD3D display1, display2;
328 #elif defined VISP_HAVE_GTK
329  vpDisplayGTK display1, display2;
330 #else
331  opt_display = false;
332 #endif
333  if (opt_display)
334  {
335 #if (defined VISP_HAVE_DISPLAY)
338  display1.init(I1, 100, 100, "Test tracking (Left)");
339  display2.init(I2, (int) I1.getWidth()/vpDisplay::getDownScalingFactor(I1)+110, 100, "Test tracking (Right)");
340 #endif
341  vpDisplay::display(I1);
342  vpDisplay::display(I2);
343  vpDisplay::flush(I1);
344  vpDisplay::flush(I2);
345  }
346 
347  vpMbEdgeKltMultiTracker tracker(2);
348  vpHomogeneousMatrix c1Mo, c2Mo;
349  vpCameraParameters cam1, cam2;
350 
351  // Initialise the tracker: camera parameters, moving edge and KLT settings
352 #if defined (VISP_HAVE_XML2)
353  // From the xml file
354  tracker.loadConfigFile(configFile, configFile);
355 #else
356  // By setting the parameters:
357  cam1.initPersProjWithoutDistortion(547, 542, 338, 234);
358  cam2.initPersProjWithoutDistortion(547, 542, 338, 234);
359 
360  vpMe me;
361  me.setMaskSize(5);
362  me.setMaskNumber(180);
363  me.setRange(7);
364  me.setThreshold(5000);
365  me.setMu1(0.5);
366  me.setMu2(0.5);
367  me.setSampleStep(4);
368 
369  vpKltOpencv klt;
370  klt.setMaxFeatures(10000);
371  klt.setWindowSize(5);
372  klt.setQuality(0.01);
373  klt.setMinDistance(5);
374  klt.setHarrisFreeParameter(0.01);
375  klt.setBlockSize(3);
376  klt.setPyramidLevels(3);
377 
378  tracker.setCameraParameters(cam1, cam2);
379  tracker.setMovingEdge(me);
380  tracker.setKltOpencv(klt);
381  tracker.setAngleAppear( vpMath::rad(65) );
382  tracker.setAngleDisappear( vpMath::rad(75) );
383  tracker.setMaskBorder(5);
384 
385  // Specify the clipping to
386  tracker.setNearClippingDistance(0.01);
387  tracker.setFarClippingDistance(0.90);
388  tracker.setClipping(tracker.getClipping() | vpMbtPolygon::FOV_CLIPPING);
389  // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING | vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING | vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
390 #endif
391 
392  // Display the moving edges, and the Klt points
393  tracker.setDisplayFeatures(displayFeatures);
394 
395  // Tells if the tracker has to use Ogre3D for visibility tests
396  tracker.setOgreVisibilityTest(useOgre);
397  if (useOgre)
398  tracker.setOgreShowConfigDialog(showOgreConfigDialog);
399 
400  // Tells if the tracker has to use the scanline visibility tests
401  tracker.setScanLineVisibilityTest(useScanline);
402 
403  // Tells if the tracker has to compute the covariance matrix
404  tracker.setCovarianceComputation(computeCovariance);
405 
406  // Tells if the tracker has to compute the projection error
407  tracker.setProjectionErrorComputation(projectionError);
408 
409  // Retrieve the camera parameters from the tracker
410  tracker.getCameraParameters(cam1, cam2);
411 
412  // Loop to position the cube
413  if (opt_display && opt_click_allowed)
414  {
415  while(!vpDisplay::getClick(I1,false)){
416  vpDisplay::display(I1);
417  vpDisplay::displayText(I1, 15, 10, "click after positioning the object", vpColor::red);
418  vpDisplay::flush(I1) ;
419  }
420  }
421 
422  // Load the 3D model (either a vrml file or a .cao file)
423  tracker.loadModel(modelFile);
424 
425  // Initialise the tracker by clicking on the image
426  // This function looks for
427  // - a ./cube/cube.init file that defines the 3d coordinates (in meter, in the object basis) of the points used for the initialisation
428  // - a ./cube/cube.ppm file to display where the user have to click (optionnal, set by the third parameter)
429  if (opt_display && opt_click_allowed)
430  {
431  tracker.initClick(I1, I2, initFile, initFile, true);
432  tracker.getPose(c1Mo, c2Mo);
433  // display the 3D model at the given pose
434  tracker.display(I1, I2, c1Mo, c2Mo, cam1, cam2, vpColor::red);
435  }
436  else
437  {
438  vpHomogeneousMatrix c1Moi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
439  vpHomogeneousMatrix c2Moi(0.02044769891, 0.1101505452, 0.5078963719, 2.063603907, 1.110231561, -0.4392789872);
440  tracker.initFromPose(I1, I2, c1Moi, c2Moi);
441  }
442 
443  //track the model
444  tracker.track(I1, I2);
445  tracker.getPose(c1Mo, c2Mo);
446 
447  if (opt_display) {
448  vpDisplay::flush(I1);
449  vpDisplay::flush(I2);
450  }
451 
452  while (!reader.end())
453  {
454  // acquire a new image
455  reader.acquire(I1);
456  I2 = I1;
457  // display the image
458  if (opt_display) {
459  vpDisplay::display(I1);
460  vpDisplay::display(I2);
461  }
462 
463  // Test to reset the tracker
464  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 10) {
465  std::cout << "----------Test reset tracker----------" << std::endl;
466  if (opt_display) {
467  vpDisplay::display(I1);
468  vpDisplay::display(I2);
469  }
470  tracker.resetTracker();
471 #if defined (VISP_HAVE_XML2)
472  tracker.loadConfigFile(configFile, configFile);
473 #else
474  // By setting the parameters:
475  cam1.initPersProjWithoutDistortion(547, 542, 338, 234);
476  cam2.initPersProjWithoutDistortion(547, 542, 338, 234);
477 
478  vpMe me;
479  me.setMaskSize(5);
480  me.setMaskNumber(180);
481  me.setRange(7);
482  me.setThreshold(5000);
483  me.setMu1(0.5);
484  me.setMu2(0.5);
485  me.setSampleStep(4);
486 
487  vpKltOpencv klt;
488  klt.setMaxFeatures(10000);
489  klt.setWindowSize(5);
490  klt.setQuality(0.01);
491  klt.setMinDistance(5);
492  klt.setHarrisFreeParameter(0.01);
493  klt.setBlockSize(3);
494  klt.setPyramidLevels(3);
495 
496  tracker.setCameraParameters(cam1, cam2);
497  tracker.setMovingEdge(me);
498  tracker.setKltOpencv(klt);
499  tracker.setAngleAppear( vpMath::rad(65) );
500  tracker.setAngleDisappear( vpMath::rad(75) );
501  tracker.setMaskBorder(5);
502 
503  // Specify the clipping to
504  tracker.setNearClippingDistance(0.01);
505  tracker.setFarClippingDistance(0.90);
506  tracker.setClipping(tracker.getClipping() | vpMbtPolygon::FOV_CLIPPING);
507  // tracker.setClipping(tracker.getClipping() | vpMbtPolygon::LEFT_CLIPPING | vpMbtPolygon::RIGHT_CLIPPING | vpMbtPolygon::UP_CLIPPING | vpMbtPolygon::DOWN_CLIPPING); // Equivalent to FOV_CLIPPING
508 #endif
509  tracker.loadModel(modelFile);
510  tracker.setCameraParameters(cam1, cam2);
511  tracker.setOgreVisibilityTest(useOgre);
512  tracker.setScanLineVisibilityTest(useScanline);
513  tracker.setCovarianceComputation(computeCovariance);
514  tracker.setProjectionErrorComputation(projectionError);
515  tracker.initFromPose(I1, I2, c1Mo, c2Mo);
516  }
517 
518  // Test to set an initial pose
519  if (reader.getFrameIndex() == reader.getFirstFrameIndex() + 50) {
520  c1Mo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
521  c2Mo.buildFrom(0.0439540832, 0.0845870108, 0.5477322481, 2.179498458, 0.8611798108, -0.3491961946);
522  std::cout << "Test set pose" << std::endl;
523  tracker.setPose(I1, I2, c1Mo, c2Mo);
524  }
525 
526  // track the object: stop tracking from frame 40 to 50
527  if (reader.getFrameIndex() - reader.getFirstFrameIndex() < 40 || reader.getFrameIndex() - reader.getFirstFrameIndex() >= 50) {
528  tracker.track(I1, I2);
529  tracker.getPose(c1Mo, c2Mo);
530  if (opt_display) {
531  // display the 3D model
532  tracker.display(I1, I2, c1Mo, c2Mo, cam1, cam2, vpColor::darkRed);
533  // display the frame
534  vpDisplay::displayFrame (I1, c1Mo, cam1, 0.05);
535  vpDisplay::displayFrame (I2, c2Mo, cam2, 0.05);
536  }
537  }
538 
539  if (opt_click_allowed) {
540  vpDisplay::displayText(I1, 10, 10, "Click to quit", vpColor::red);
541  if (vpDisplay::getClick(I1, false)) {
542  quit = true;
543  break;
544  }
545  }
546 
547  if(computeCovariance) {
548  std::cout << "Covariance matrix: \n" << tracker.getCovarianceMatrix() << std::endl << std::endl;
549  }
550 
551  if(projectionError) {
552  std::cout << "Projection error: " << tracker.getProjectionError() << std::endl << std::endl;
553  }
554 
555  vpDisplay::flush(I1);
556  vpDisplay::flush(I2);
557  }
558  if (opt_click_allowed && !quit) {
560  }
561  reader.close();
562 
563 #if defined (VISP_HAVE_XML2)
564  // Cleanup memory allocated by xml library used to parse the xml config file in vpMbEdgeKltTracker::loadConfigFile()
566 #endif
567 
568 #if defined(VISP_HAVE_COIN3D) && (COIN_MAJOR_VERSION == 2 || COIN_MAJOR_VERSION == 3)
569  // Cleanup memory allocated by Coin library used to load a vrml model in vpMbEdgeKltTracker::loadModel()
570  // We clean only if Coin was used.
571  if(! cao3DModel)
572  SoDB::finish();
573 #endif
574 
575  return 0;
576  }
577  catch(vpException &e) {
578  std::cout << "Catch an exception: " << e << std::endl;
579  return 1;
580  }
581 }
582 
583 #else
584 
585 int main()
586 {
587  std::cout << "visp_mbt, visp_gui modules and OpenCV are required to run this example." << std::endl;
588  return 0;
589 }
590 
591 #endif
long getFrameIndex() const
long getFirstFrameIndex() const
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static std::string getViSPImagesDataPath()
Definition: vpIoTools.cpp:1157
void setHarrisFreeParameter(double harris_k)
unsigned int getWidth() const
Definition: vpImage.h:226
Implementation of an homogeneous matrix and operations on such kind of matrices.
void setMaskNumber(const unsigned int &a)
Definition: vpMe.cpp:488
virtual void setDownScalingFactor(unsigned int scale)
Definition: vpDisplay.cpp:248
static const vpColor darkRed
Definition: vpColor.h:164
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:128
void setMaxFeatures(const int maxCount)
void setSampleStep(const double &s)
Definition: vpMe.h:263
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:153
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
void setMinDistance(double minDistance)
error that can be emited by ViSP classes.
Definition: vpException.h:73
Hybrid stereo (or more) tracker based on moving-edges and keypoints tracked using KLT tracker...
Definition: vpMe.h:59
static void flush(const vpImage< unsigned char > &I)
void setMu1(const double &mu_1)
Definition: vpMe.h:226
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
Definition: vpParseArgv.cpp:76
static const vpColor red
Definition: vpColor.h:163
void setQuality(double qualityLevel)
void initPersProjWithoutDistortion(const double px, const double py, const double u0, const double v0)
void open(vpImage< vpRGBa > &I)
Display for windows using Direct3D 3rd party. Thus to enable this class Direct3D should be installed...
Definition: vpDisplayD3D.h:107
void setMaskSize(const unsigned int &a)
Definition: vpMe.cpp:496
static std::string createFilePath(const std::string &parent, const std::string child)
Definition: vpIoTools.cpp:1366
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 setPyramidLevels(const int pyrMaxLevel)
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
static double rad(double deg)
Definition: vpMath.h:104
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
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, vpImagePoint offset=vpImagePoint(0, 0))
static void cleanup()
Definition: vpXmlParser.h:308
void setMu2(const double &mu_2)
Definition: vpMe.h:233
void setWindowSize(const int winSize)
unsigned int getDownScalingFactor()
Definition: vpDisplay.h:214
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Definition: vpKltOpencv.h:76
void setBlockSize(const int blockSize)
void setThreshold(const double &t)
Definition: vpMe.h:284
void setRange(const unsigned int &r)
Definition: vpMe.h:256