49 #include <visp/vpOpenCVGrabber.h>
50 #include <visp/vpV4l2Grabber.h>
51 #include <visp/vp1394TwoGrabber.h>
52 #include <visp/vpHomogeneousMatrix.h>
53 #include <visp/vpImage.h>
54 #include <visp/vpCameraParameters.h>
55 #include <visp/vpAROgre.h>
60 #if defined(VISP_HAVE_OGRE)
61 #if defined(VISP_HAVE_V4L2) || defined(VISP_HAVE_DC1394_2) || (VISP_HAVE_OPENCV_VERSION >= 0x020100)
69 #if defined(VISP_HAVE_V4L2)
74 #elif defined(VISP_HAVE_DC1394_2)
79 #elif defined(VISP_HAVE_OPENCV)
81 cv::VideoCapture grabber(0);
82 if(!grabber.isOpened()) {
83 std::cout <<
"Failed to open the camera" << std::endl;
124 ogre.load(
"Robot",
"robot.mesh");
126 ogre.setScale(
"Robot", 0.001f,0.001f,0.001f);
131 std::cout <<
"cMo:\n" << cMo << std::endl;
134 while(ogre.continueRendering()){
136 #if defined(VISP_HAVE_V4L2) || defined(VISP_HAVE_DC1394_2)
138 #elif defined(VISP_HAVE_OPENCV)
149 std::cout <<
"You need an available framegrabber to run this example" << std::endl;
152 std::cout <<
"You need Ogre3D to run this example" << std::endl;
157 std::cout <<
"Catch an exception: " << e << std::endl;
161 std::cout <<
"Catch an exception " << std::endl;
void acquire(vpImage< unsigned char > &I)
void open(vpImage< unsigned char > &I)
unsigned int getWidth() const
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...
error that can be emited by ViSP classes.
Implementation of an augmented reality viewer.
void acquire(vpImage< unsigned char > &I)
The vpRotationMatrix considers the particular case of a rotation matrix.
void open(vpImage< unsigned char > &I)
virtual void init(vpImage< unsigned char > &I, bool bufferedKeys=false, bool hidden=false)
Generic class defining intrinsic camera parameters.
Class for the Video4Linux2 video device.
unsigned int getHeight() const
Class that consider the case of the Euler angle using the x-y-z convention, where are respectively ...
Class for firewire ieee1394 video devices using libdc1394-2.x api.
Class that consider the case of a translation vector.