1 #include <visp3/core/vpConfig.h>
3 #ifdef VISP_HAVE_MODULE_SENSOR
4 #include <visp3/sensor/vp1394CMUGrabber.h>
5 #include <visp3/sensor/vp1394TwoGrabber.h>
6 #include <visp3/sensor/vpV4l2Grabber.h>
8 #include <visp3/gui/vpDisplayGDI.h>
9 #include <visp3/gui/vpDisplayOpenCV.h>
10 #include <visp3/gui/vpDisplayX.h>
11 #include <visp3/me/vpMeEllipse.h>
13 #if defined(HAVE_OPENCV_VIDEOIO)
14 #include <opencv2/videoio.hpp>
19 #if (defined(VISP_HAVE_DC1394) || defined(VISP_HAVE_CMU1394) || defined(VISP_HAVE_V4L2) || defined(HAVE_OPENCV_VIDEOIO))
20 #ifdef ENABLE_VISP_NAMESPACE
26 #if defined(VISP_HAVE_DC1394)
28 #elif defined(VISP_HAVE_CMU1394)
30 #elif defined(VISP_HAVE_V4L2)
32 #elif defined(HAVE_OPENCV_VIDEOIO)
33 cv::VideoCapture g(0);
35 std::cout <<
"Failed to open the camera" << std::endl;
41 #if defined(VISP_HAVE_DC1394) || defined(VISP_HAVE_V4L2) || defined(VISP_HAVE_CMU1394)
43 #elif defined(HAVE_OPENCV_VIDEOIO)
48 #if defined(VISP_HAVE_X11)
49 vpDisplayX d(I, 0, 0,
"Camera view");
50 #elif defined(VISP_HAVE_GDI)
52 #elif defined(HAVE_OPENCV_HIGHGUI)
55 std::cout <<
"No image viewer is available..." << std::endl;
75 #if defined(VISP_HAVE_DC1394) || defined(VISP_HAVE_V4L2) || defined(VISP_HAVE_CMU1394)
77 #elif defined(HAVE_OPENCV_VIDEOIO)
88 std::cout <<
"Catch an exception: " << e << std::endl;
Firewire cameras video capture based on CMU 1394 Digital Camera SDK.
void acquire(vpImage< unsigned char > &I)
Class for firewire ieee1394 video devices using libdc1394-2.x api.
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
static void display(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
Class that tracks an ellipse using moving edges.
void display(const vpImage< unsigned char > &I, const vpColor &col, unsigned int thickness=1)
void initTracking(const vpImage< unsigned char > &I, bool trackCircle=false, bool trackArc=false)
void track(const vpImage< unsigned char > &I)
void setDisplay(vpMeSite::vpMeSiteDisplayType select)
void setRange(const unsigned int &range)
void setLikelihoodThresholdType(const vpLikelihoodThresholdType likelihood_threshold_type)
void setThreshold(const double &threshold)
void setSampleStep(const double &sample_step)
Class that is a wrapper over the Video4Linux2 (V4L2) driver.