Visual Servoing Platform  version 3.0.0
AROgreBasic.cpp
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2015 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  * Implementation of a simple augmented reality application using the vpAROgre
32  * class.
33  *
34  * Authors:
35  * Bertrand Delabarre
36  *
37  *****************************************************************************/
38 
46 #include <visp3/core/vpConfig.h>
47 #include <iostream>
48 
49 //#if defined(VISP_HAVE_OGRE) && (defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK) || (defined(VISP_HAVE_X11) && ! defined(APPLE)))
50 #if defined(VISP_HAVE_OGRE) && (defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK) || (defined(VISP_HAVE_X11) && ! (defined(__APPLE__) && defined(__MACH__))))
51 
52 //#if defined(VISP_HAVE_X11) && ! defined(APPLE)
53 #if defined(VISP_HAVE_X11) && ! (defined(__APPLE__) && defined(__MACH__))
54 // produce an error on OSX: ‘typedef int Cursor’
55 // /usr/X11R6/include/X11/X.h:108: error: ‘Cursor’ has a previous
56 // declaration as ‘typedef XID Cursor’. That's why it should not be
57 // used on APPLE platforms
58 # include <visp3/gui/vpDisplayX.h>
59 #endif
60 #include <visp3/gui/vpDisplayGTK.h>
61 #include <visp3/gui/vpDisplayGDI.h>
62 #include <visp3/gui/vpDisplayOpenCV.h>
63 #include <visp3/gui/vpDisplayD3D.h>
64 #include <visp3/vision/vpPose.h>
65 #include <visp3/core/vpPoint.h>
66 #include <visp3/core/vpImagePoint.h>
67 #include <visp3/blob/vpDot2.h>
68 #include <visp3/core/vpPixelMeterConversion.h>
69 #include <visp3/io/vpVideoReader.h>
70 #include <visp3/io/vpParseArgv.h>
71 #include <visp3/core/vpIoTools.h>
72 #include <visp3/core/vpDebug.h>
73 #include <visp3/ar/vpAROgre.h>
74 
75 // List of allowed command line options
76 #define GETOPTARGS "ci:p:h"
77 
88 void usage(const char *name, const char *badparam, std::string ipath, std::string ppath)
89 {
90  fprintf(stdout, "\n\
91 Test augmented reality using the vpAROgre class.\n\
92 \n\
93 SYNOPSIS\n\
94  %s [-i <test image path>] [-p <personal image path>]\n\
95  [-c] [-h]\n", name);
96 
97  fprintf(stdout, "\n\
98 OPTIONS: Default\n\
99  -i <input image path> %s\n\
100  Set image input path.\n\
101  From this path read images \n\
102  \"ViSP-images/mire-2/image.%%04d.pgm\". These \n\
103  images come from ViSP-images-x.y.z.tar.gz available \n\
104  on the ViSP website.\n\
105  Setting the VISP_INPUT_IMAGE_PATH environment\n\
106  variable produces the same behaviour than using\n\
107  this option.\n\
108  \n\
109  -p <personal image path> %s\n\
110  Specify a personal sequence containing images \n\
111  to process.\n\
112  By image sequence, we mean one file per image.\n\
113  The following image file formats PNM (PGM P5, PPM P6)\n\
114  are supported. The format is selected by analysing \n\
115  the filename extension.\n\
116  Example : \"/Temp/ViSP-images/cube/image.%%04d.pgm\"\n\
117  %%04d is for the image numbering.\n\
118 \n\
119  -c\n\
120  Disable the mouse click. Useful to automaze the \n\
121  execution of this program without humain intervention.\n\
122 \n\
123  -h\n\
124  Print the help.\n",
125  ipath.c_str(), ppath.c_str());
126 
127  if (badparam)
128  fprintf(stdout, "\nERROR: Bad parameter [%s]\n", badparam);
129 }
143 bool getOptions(int argc, const char **argv, std::string &ipath,
144  std::string &ppath, bool &click_allowed)
145 {
146  const char *optarg;
147  int c;
148  while ((c = vpParseArgv::parse(argc, argv, GETOPTARGS, &optarg)) > 1) {
149 
150  switch (c) {
151  case 'c': click_allowed = false; break;
152  case 'i': ipath = optarg; break;
153  case 'p': ppath = optarg; break;
154  case 'h': usage(argv[0], NULL, ipath, ppath);
155  return false; break;
156 
157  default:
158  usage(argv[0], optarg, ipath, ppath);
159  return false; break;
160  }
161  }
162 
163  if ((c == 1) || (c == -1)) {
164  // standalone param or error
165  usage(argv[0], NULL, ipath, ppath);
166  std::cerr << "ERROR: " << std::endl;
167  std::cerr << " Bad argument " << optarg << std::endl << std::endl;
168  return false;
169  }
170 
171  return true;
172 }
173 
178 void computeInitialPose(vpCameraParameters *mcam, vpImage<unsigned char> &I,
179  vpPose * mPose, vpDot2 *md, vpImagePoint *mcog,
180  vpHomogeneousMatrix *cMo, vpPoint *mP,
181  const bool &opt_click_allowed)
182 {
183  // ---------------------------------------------------
184  // Code inspired from ViSP example of camera pose
185  // ----------------------------------------------------
186  bool opt_display = true;
187 
188 //#if defined(VISP_HAVE_X11) && ! defined(APPLE)
189 #if defined(VISP_HAVE_X11) && ! (defined(__APPLE__) && defined(__MACH__))
190  // produce an error on OSX: ‘typedef int Cursor’
191  // /usr/X11R6/include/X11/X.h:108: error: ‘Cursor’ has a previous
192  // declaration as ‘typedef XID Cursor’. That's why it should not be
193  // used on APPLE platforms
194  vpDisplayX display;
195 #elif defined VISP_HAVE_GTK
196  vpDisplayGTK display;
197 #elif defined VISP_HAVE_GDI
198  vpDisplayGDI display;
199 #elif defined VISP_HAVE_OPENCV
200  vpDisplayOpenCV display;
201 #elif defined VISP_HAVE_D3D9
202  vpDisplayD3D display;
203 #endif
204 
205  for (unsigned int i=0 ; i < 4 ; i++)
206  {
207  if (opt_display) {
208  md[i].setGraphics(true) ;
209  }
210  else {
211  md[i].setGraphics(false) ;
212  }
213  }
214 
215  if (opt_display) {
216  try{
217  // Display size is automatically defined by the image (I) size
218  display.init(I,100,100,"Preliminary Pose Calculation");
219  // display the image
220  // The image class has a member that specify a pointer toward
221  // the display that has been initialized in the display declaration
222  // therefore is is no longuer necessary to make a reference to the
223  // display variable.
224  vpDisplay::display(I) ;
225  //Flush the display
226  vpDisplay::flush(I) ;
227 
228  }
229  catch(...)
230  {
231  vpERROR_TRACE("Error while displaying the image") ;
232  return ;
233  }
234  }
235 
236  std::cout<<"************************************************************************************"<<std::endl;
237  std::cout<<"*************************** Preliminary Pose Calculation ***************************"<<std::endl;
238  std::cout<<"****************************** Click on the 4 dots *******************************"<<std::endl;
239  std::cout<<"********Dot1 : (-x,-y,0), Dot2 : (x,-y,0), Dot3 : (x,y,0), Dot4 : (-x,y,0)**********"<<std::endl;
240  std::cout<<"************************************************************************************"<<std::endl;
241 
242  try{
243  vpImagePoint ip[4];
244  if (! opt_click_allowed) {
245  ip[0].set_i( 265 );
246  ip[0].set_j( 93 );
247  ip[1].set_i( 248 );
248  ip[1].set_j( 242 );
249  ip[2].set_i( 166 );
250  ip[2].set_j( 215 );
251  ip[3].set_i( 178 );
252  ip[3].set_j( 85 );
253  }
254 
255  for(unsigned int i=0;i<4;i++) {
256  // by using setGraphics, we request to see the edges of the dot
257  // in red on the screen.
258  // It uses the overlay image plane.
259  // The default of this setting is that it is time consumming
260 
261  md[i].setGraphics(true) ;
262  md[i].setGrayLevelPrecision(0.7);
263  md[i].setSizePrecision(0.5);
264 
265  for(unsigned int j = 0;j<i;j++)
266  md[j].display(I) ;
267 
268  // flush the display buffer
269  vpDisplay::flush(I);
270  try{
271  if (opt_click_allowed) {
272  md[i].initTracking(I);
273  //std::cout << "click " << i << " " << md[i] << std::endl;
274  }
275  else {
276  md[i].initTracking(I, ip[i]);
277  }
278  }
279  catch(...){
280  }
281 
282  mcog[i] = md[i].getCog();
283  // an expcetion is thrown by the track method if
284  // - dot is lost
285  // - the number of pixel is too small
286  // - too many pixels are detected (this is usual when a "big" specularity
287  // occurs. The threshold can be modified using the
288  // setNbMaxPoint(int) method
289  if (opt_display) {
290  md[i].display(I) ;
291  // flush the display buffer
292  vpDisplay::flush(I) ;
293  }
294  }
295  }
296  catch(vpException e){
297  vpERROR_TRACE("Error while tracking dots") ;
298  vpCTRACE << e;
299  return;
300  }
301 
302  if (opt_display)
303  {
304  // display a red cross (size 10) in the image at the dot center
305  // of gravity location
306  //
307  // WARNING
308  // in the vpDisplay class member's when pixel coordinates
309  // are considered the first element is the row index and the second
310  // is the column index:
311  // vpDisplay::displayCross(Image, row index, column index, size, color)
312  // therefore u and v are inverted wrt to the vpDot specification
313  // Alternatively, to avoid this problem another set of member have
314  // been defined in the vpDisplay class.
315  // If the method name is postfixe with _uv the specification is :
316  // vpDisplay::displayCross_uv(Image, column index, row index, size, color)
317 
318  for (unsigned int i=0 ; i < 4 ; i++)
319  vpDisplay::displayCross(I, mcog[i], 10, vpColor::red) ;
320 
321  // flush the X11 buffer
322  vpDisplay::flush(I) ;
323  }
324 
325  // --------------------------------------------------------
326  // Now we will compute the pose
327  // --------------------------------------------------------
328 
329  // the list of point is cleared (if that's not done before)
330  mPose->clearPoint() ;
331 
332  // we set the 3D points coordinates (in meter !) in the object/world frame
333  double l=0.06 ;
334  double L=0.07 ;
335  mP[0].setWorldCoordinates(-L,-l, 0 ) ; // (X,Y,Z)
336  mP[1].setWorldCoordinates(L,-l, 0 ) ;
337  mP[2].setWorldCoordinates(L,l, 0 ) ;
338  mP[3].setWorldCoordinates(-L,l, 0 ) ;
339 
340  // pixel-> meter conversion
341  for (unsigned int i=0 ; i < 4 ; i++)
342  {
343  // u[i]. v[i] are expressed in pixel
344  // conversion in meter is achieved using
345  // x = (u-u0)/px
346  // y = (v-v0)/py
347  // where px, py, u0, v0 are the intrinsic camera parameters
348  double x=0, y=0;
349  vpPixelMeterConversion::convertPoint(*mcam, mcog[i], x,y) ;
350  mP[i].set_x(x) ;
351  mP[i].set_y(y) ;
352  }
353 
354 
355  // The pose structure is build, we put in the point list the set of point
356  // here both 2D and 3D world coordinates are known
357  for (unsigned int i=0 ; i < 4 ; i++)
358  {
359  mPose->addPoint(mP[i]) ; // and added to the pose computation point list
360  }
361 
362  // compute the initial pose using Dementhon method followed by a non linear
363  // minimisation method
364 
365  // Pose by Lagrange it provides an initialization of the pose
366  mPose->computePose(vpPose::LAGRANGE, *cMo) ;
367  // the pose is now refined using the virtual visual servoing approach
368  // Warning: cMo needs to be initialized otherwise it may diverge
369  mPose->computePose(vpPose::VIRTUAL_VS, *cMo) ;
370 
371  // Display breifly just to have a glimpse a the ViSP pose
372  // while(cpt<500){
373  if( opt_display ){
374  // Display the computed pose
375  mPose->display(I,*cMo,*mcam, 0.05, vpColor::red) ;
376  vpDisplay::flush(I) ;
377  vpTime::wait(1000);
378  }
379 }
380 
381 
382 int main(int argc, const char **argv)
383 {
384  try {
385  std::string env_ipath;
386  std::string opt_ipath;
387  std::string ipath;
388  std::string opt_ppath;
389  std::string dirname;
390  std::string filename;
391  bool opt_click_allowed = true;
392 
393  // Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH environment variable value
394  env_ipath = vpIoTools::getViSPImagesDataPath();
395 
396  // Set the default input path
397  if (! env_ipath.empty())
398  ipath = env_ipath;
399 
400 
401  // Read the command line options
402  if (getOptions(argc, argv, opt_ipath, opt_ppath, opt_click_allowed) == false) {
403  exit (-1);
404  }
405 
406  // Get the option values
407  if (!opt_ipath.empty())
408  ipath = opt_ipath;
409 
410  // Compare ipath and env_ipath. If they differ, we take into account
411  // the input path comming from the command line option
412  if (!opt_ipath.empty() && !env_ipath.empty() && opt_ppath.empty()) {
413  if (ipath != env_ipath) {
414  std::cout << std::endl
415  << "WARNING: " << std::endl;
416  std::cout << " Since -i <visp image path=" << ipath << "> "
417  << " is different from VISP_IMAGE_PATH=" << env_ipath << std::endl
418  << " we skip the environment variable." << std::endl;
419  }
420  }
421 
422  // Test if an input path is set
423  if (opt_ipath.empty() && env_ipath.empty() && opt_ppath.empty() ){
424  usage(argv[0], NULL, ipath, opt_ppath);
425  std::cerr << std::endl
426  << "ERROR:" << std::endl;
427  std::cerr << " Use -i <visp image path> option or set VISP_INPUT_IMAGE_PATH "
428  << std::endl
429  << " environment variable to specify the location of the " << std::endl
430  << " image path where test images are located." << std::endl
431  << " Use -p <personal image path> option if you want to "<<std::endl
432  << " use personal images." << std::endl
433  << std::endl;
434 
435  exit(-1);
436  }
437 
438  // Declare an image, this is a gray level image (unsigned char)
439  // it size is not defined yet, it will be defined when the image will
440  // read on the disk
441  // vpImage<unsigned char> I ;
442 
443  // unsigned iter = 0;
444  std::ostringstream s;
445  // char cfilename[FILENAME_MAX];
446 
447  if (opt_ppath.empty()){
448  // Set the path location of the image sequence
449  dirname = vpIoTools::createFilePath(ipath, "ViSP-images/mire-2");
450 
451  // Build the name of the image file
452 
453  s.setf(std::ios::right, std::ios::adjustfield);
454  s << "image.%04d.pgm";
455  filename = vpIoTools::createFilePath(dirname, s.str());
456  }
457  else {
458  filename = opt_ppath;
459  }
460 
461  //We will read a sequence of images
462  vpVideoReader grabber;
463  grabber.setFirstFrameIndex(1);
464  grabber.setFileName(filename.c_str());
465  // Grey level image associated to a display in the initial pose computation
466  vpImage<unsigned char> Idisplay;
467  // Grey level image to track points
469  // RGBa image to get background
470  vpImage<vpRGBa> IC;
471  // Matrix representing camera parameters
473 
474  // Variables used for pose computation purposes
475  vpPose mPose;
476  vpDot2 md[4];
477  vpImagePoint mcog[4];
478  vpPoint mP[4];
479 
480  // CameraParameters we got from calibration
481  // Keep u0 and v0 as center of the screen
482  vpCameraParameters mcam;
483 
484  // Read the PGM image named "filename" on the disk, and put the
485  // bitmap into the image structure I. I is initialized to the
486  // correct size
487  //
488  // exception readPGM may throw various exception if, for example,
489  // the file does not exist, or if the memory cannot be allocated
490  try{
491  vpCTRACE << "Load: " << filename << std::endl;
492  grabber.open(Idisplay);
493  grabber.acquire(Idisplay);
494  vpCameraParameters mcamTmp(592,570,grabber.getWidth()/2,grabber.getHeight()/2);
495  // Compute the initial pose of the camera
496  computeInitialPose(&mcamTmp, Idisplay, &mPose, md, mcog, &cMo, mP,
497  opt_click_allowed);
498  // Close the framegrabber
499  grabber.close();
500 
501  // Associate the grabber to the RGBa image
502  grabber.open(IC);
503  mcam.init(mcamTmp);
504  }
505  catch(...)
506  {
507  // an exception is thrown if an exception from readPGM has been caught
508  // here this will result in the end of the program
509  // Note that another error message has been printed from readPGM
510  // to give more information about the error
511  std::cerr << std::endl
512  << "ERROR:" << std::endl;
513  std::cerr << " Cannot read " << filename << std::endl;
514  std::cerr << " Check your -i " << ipath << " option " << std::endl
515  << " or VISP_INPUT_IMAGE_PATH environment variable."
516  << std::endl;
517  exit(-1);
518  }
519 
520  // Create a vpRAOgre object with color background
521  vpAROgre ogre(mcam, grabber.getWidth(), grabber.getHeight());
522  // Initialize it
523  ogre.init(IC);
524  ogre.load("Robot", "robot.mesh");
525  ogre.setScale("Robot", 0.001f,0.001f,0.001f);
526  ogre.setRotation("Robot", vpRotationMatrix(vpRxyzVector(M_PI/2, -M_PI/2, 0)));
527 
528  // Add an optional point light source
529  Ogre::Light * light = ogre.getSceneManager()->createLight();
530  light->setDiffuseColour(1, 1, 1); // scaled RGB values
531  light->setSpecularColour(1, 1, 1); // scaled RGB values
532  light->setPosition(-5, -5, 10);
533  light->setType(Ogre::Light::LT_POINT);
534 
535  // Rendering loop
536  while(ogre.continueRendering() && !grabber.end()) {
537  // Acquire a frame
538  grabber.acquire(IC);
539 
540  // Convert it to a grey level image for tracking purpose
542 
543  // kill the point list
544  mPose.clearPoint() ;
545 
546  // track the dot
547  for (int i=0 ; i < 4 ; i++) {
548  // track the point
549  md[i].track(I, mcog[i]) ;
550  md[i].setGrayLevelPrecision(0.90);
551  // pixel->meter conversion
552  {
553  double x=0, y=0;
554  vpPixelMeterConversion::convertPoint(mcam, mcog[i], x, y) ;
555  mP[i].set_x(x) ;
556  mP[i].set_y(y) ;
557  }
558 
559  // and added to the pose computation point list
560  mPose.addPoint(mP[i]) ;
561  }
562  // the pose structure has been updated
563 
564  // the pose is now updated using the virtual visual servoing approach
565  // Dementhon or lagrange is no longuer necessary, pose at the
566  // previous iteration is sufficient
567  mPose.computePose(vpPose::VIRTUAL_VS, cMo);
568 
569  // Display with ogre
570  ogre.display(IC,cMo);
571 
572  // Wait so that the video does not go too fast
573  vpTime::wait(15);
574  }
575  // Close the grabber
576  grabber.close();
577  return 0;
578  }
579  catch(vpException e) {
580  std::cout << "Catch a ViSP exception: " << e << std::endl;
581  return 1;
582  }
583  catch(Ogre::Exception e) {
584  std::cout << "Catch an Ogre exception: " << e.getDescription() << std::endl;
585  return 1;
586  }
587  catch(...) {
588  std::cout << "Catch an exception " << std::endl;
589  return 1;
590  }
591 }
592 #else // VISP_HAVE_OGRE && VISP_HAVE_DISPLAY
593 int
594 main()
595 {
596  std::cout << "You should install Ogre3D or a display (GTK or OpenCV...) to run this example..." << std::endl;
597 }
598 #endif
VISP_EXPORT int wait(double t0, double t)
Definition: vpTime.cpp:150
void init()
basic initialization with the default parameters
static std::string getViSPImagesDataPath()
Definition: vpIoTools.cpp:1091
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
Implementation of an homogeneous matrix and operations on such kind of matrices.
#define vpERROR_TRACE
Definition: vpDebug.h:391
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:128
Define the X11 console to display images.
Definition: vpDisplayX.h:148
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
error that can be emited by ViSP classes.
Definition: vpException.h:73
void set_x(const double x)
Set the point x coordinate in the image plane.
Definition: vpPoint.cpp:496
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Point coordinates conversion from pixel coordinates to normalized coordinates in meter...
Implementation of an augmented reality viewer.
Definition: vpAROgre.h:86
This tracker is meant to track a blob (connex pixels with same gray level) on a vpImage.
Definition: vpDot2.h:124
void track(const vpImage< unsigned char > &I)
Definition: vpDot2.cpp:461
static void flush(const vpImage< unsigned char > &I)
Definition: vpDisplay.cpp:2233
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
Definition: vpParseArgv.cpp:76
static const vpColor red
Definition: vpColor.h:163
Class that defines what is a point.
Definition: vpPoint.h:59
Implementation of a rotation matrix and operations on such kind of matrices.
vpImagePoint getCog() const
Definition: vpDot2.h:160
void open(vpImage< vpRGBa > &I)
Display for windows using Direct3D.
Definition: vpDisplayD3D.h:105
void setGrayLevelPrecision(const double &grayLevelPrecision)
Definition: vpDot2.cpp:784
void set_i(const double ii)
Definition: vpImagePoint.h:154
static void display(vpImage< unsigned char > &I, vpHomogeneousMatrix &cMo, vpCameraParameters &cam, double size, vpColor col=vpColor::none)
Definition: vpPose.cpp:585
virtual void init(vpImage< unsigned char > &I, bool bufferedKeys=false, bool hidden=false)
Definition: vpAROgre.cpp:115
unsigned int getWidth() const
Return the number of columns in the image.
static std::string createFilePath(const std::string &parent, const std::string child)
Definition: vpIoTools.cpp:1265
bool computePose(vpPoseMethodType methode, vpHomogeneousMatrix &cMo, bool(*func)(vpHomogeneousMatrix *)=NULL)
compute the pose for a given method
Definition: vpPose.cpp:382
static void display(const vpImage< unsigned char > &I)
Definition: vpDisplay.cpp:206
The vpDisplayOpenCV allows to display image using the opencv library.
virtual void displayCross(const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)=0
void display(const vpImage< unsigned char > &I, vpColor color=vpColor::red, unsigned int thickness=1) const
Definition: vpDot2.cpp:219
Class used for pose computation from N points (pose from point only).
Definition: vpPose.h:74
Generic class defining intrinsic camera parameters.
void set_y(const double y)
Set the point y coordinate in the image plane.
Definition: vpPoint.cpp:498
The vpDisplayGTK allows to display image using the GTK+ library version 1.2.
Definition: vpDisplayGTK.h:141
void acquire(vpImage< vpRGBa > &I)
void setFileName(const char *filename)
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const char *title=NULL)
void set_j(const double jj)
Definition: vpImagePoint.h:165
void setSizePrecision(const double &sizePrecision)
Definition: vpDot2.cpp:814
void setWorldCoordinates(const double oX, const double oY, const double oZ)
Definition: vpPoint.cpp:111
#define vpCTRACE
Definition: vpDebug.h:337
void initTracking(const vpImage< unsigned char > &I, unsigned int size=0)
Definition: vpDot2.cpp:262
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRxyzVector.h:154
void setFirstFrameIndex(const long first_frame)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition: vpImagePoint.h:88
void addPoint(const vpPoint &P)
Add a new point in this array.
Definition: vpPose.cpp:151
unsigned int getHeight() const
Return the number of rows in the image.
void setGraphics(const bool activate)
Definition: vpDot2.h:309
void clearPoint()
suppress all the point in the array of point
Definition: vpPose.cpp:129