1 #include <visp3/core/vpConfig.h> 3 #ifdef VISP_HAVE_MODULE_SENSOR 4 #include <visp3/sensor/vpV4l2Grabber.h> 6 #include <visp3/blob/vpDot2.h> 7 #include <visp3/gui/vpDisplayGDI.h> 8 #include <visp3/gui/vpDisplayGTK.h> 9 #include <visp3/gui/vpDisplayOpenCV.h> 10 #include <visp3/gui/vpDisplayX.h> 14 #if ((defined(VISP_HAVE_V4L2) || (VISP_HAVE_OPENCV_VERSION >= 0x020100)) && \ 15 (defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_GTK))) 18 #if defined(VISP_HAVE_V4L2) 21 #elif defined(VISP_HAVE_OPENCV) 22 cv::VideoCapture g(0);
24 std::cout <<
"Failed to open the camera" << std::endl;
32 #if defined(VISP_HAVE_X11) 34 #elif defined(VISP_HAVE_GDI) 36 #elif defined(VISP_HAVE_OPENCV) 38 #elif defined(VISP_HAVE_GTK) 47 bool init_done =
false;
48 std::cout <<
"Click!!!" << std::endl;
51 #if defined(VISP_HAVE_V4L2) 53 #elif defined(VISP_HAVE_OPENCV) void acquire(vpImage< unsigned char > &I)
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
void open(vpImage< unsigned char > &I)
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
Display for windows using GDI (available on any windows 32 platform).
void setGraphics(bool activate)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
This tracker is meant to track a blob (connex pixels with same gray level) on a vpImage.
static void flush(const vpImage< unsigned char > &I)
void setGraphicsThickness(unsigned int t)
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
void track(const vpImage< unsigned char > &I, bool canMakeTheWindowGrow=true)
Class that is a wrapper over the Video4Linux2 (V4L2) driver.
void initTracking(const vpImage< unsigned char > &I, unsigned int size=0)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...