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