47 #include <visp3/ar/vpAROgre.h> 48 #include <visp3/core/vpCameraParameters.h> 49 #include <visp3/core/vpHomogeneousMatrix.h> 50 #include <visp3/core/vpImage.h> 51 #include <visp3/sensor/vp1394TwoGrabber.h> 52 #include <visp3/sensor/vpOpenCVGrabber.h> 53 #include <visp3/sensor/vpV4l2Grabber.h> 58 #if defined(VISP_HAVE_OGRE) 59 #if defined(VISP_HAVE_V4L2) || defined(VISP_HAVE_DC1394) || (VISP_HAVE_OPENCV_VERSION >= 0x020100) 67 #if defined(VISP_HAVE_V4L2) 72 #elif defined(VISP_HAVE_DC1394) 77 #elif defined(VISP_HAVE_OPENCV) 79 cv::VideoCapture grabber(0);
80 if (!grabber.isOpened()) {
81 std::cout <<
"Failed to open the camera" << std::endl;
122 ogre.load(
"Robot",
"robot.mesh");
127 ogre.setScale(
"Robot", 0.001f, 0.001f, 0.001f);
133 std::cout <<
"cMo:\n" << cMo << std::endl;
136 while (ogre.continueRendering()) {
138 #if defined(VISP_HAVE_V4L2) || defined(VISP_HAVE_DC1394) 140 #elif defined(VISP_HAVE_OPENCV) 148 ogre.display(I, cMo);
151 std::cout <<
"You need an available framegrabber to run this example" << std::endl;
154 std::cout <<
"You need Ogre3D to run this example" << std::endl;
158 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)
Implementation of an homogeneous matrix and operations on such kind of matrices.
error that can be emited by ViSP classes.
Implementation of an augmented reality viewer using Ogre3D 3rd party.
void acquire(vpImage< unsigned char > &I)
Implementation of a rotation matrix and operations on such kind of matrices.
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 that is a wrapper over the Video4Linux2 (V4L2) driver.
unsigned int getHeight() const
Implementation of a rotation vector as Euler angle minimal representation.
Class for firewire ieee1394 video devices using libdc1394-2.x api.