44 #include <visp3/ar/vpAROgre.h>
45 #include <visp3/core/vpCameraParameters.h>
46 #include <visp3/core/vpHomogeneousMatrix.h>
47 #include <visp3/core/vpImage.h>
48 #include <visp3/sensor/vp1394TwoGrabber.h>
49 #include <visp3/sensor/vpV4l2Grabber.h>
51 #if defined(HAVE_OPENCV_VIDEOIO)
52 #include <opencv2/videoio.hpp>
58 #if defined(VISP_HAVE_OGRE)
59 #if defined(VISP_HAVE_V4L2) || defined(VISP_HAVE_DC1394) || defined(HAVE_OPENCV_VIDEOIO)
67 #if defined(VISP_HAVE_V4L2)
72 #elif defined(VISP_HAVE_DC1394)
77 #elif defined(HAVE_OPENCV_VIDEOIO)
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(HAVE_OPENCV_VIDEOIO)
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;
159 std::cout <<
"Catch an exception: " << e << std::endl;
163 std::cout <<
"Catch an exception " << std::endl;
Class for firewire ieee1394 video devices using libdc1394-2.x api.
void acquire(vpImage< unsigned char > &I)
void open(vpImage< unsigned char > &I)
Implementation of an augmented reality viewer using Ogre3D 3rd party.
Generic class defining intrinsic camera parameters.
error that can be emitted by ViSP classes.
Implementation of an homogeneous matrix and operations on such kind of matrices.
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
unsigned int getWidth() const
unsigned int getHeight() const
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a rotation vector as Euler angle minimal representation.
Class that is a wrapper over the Video4Linux2 (V4L2) driver.
void open(vpImage< unsigned char > &I)
void acquire(vpImage< unsigned char > &I)