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