3 #include <visp3/gui/vpDisplayOpenCV.h>
4 #include <visp3/core/vpImageConvert.h>
9 int main(
int argc,
char** argv)
13 device = atoi(argv[1]);
14 std::cout <<
"Use device: " << device << std::endl;
16 #if (VISP_HAVE_OPENCV_VERSION >= 0x020100)
18 cv::VideoCapture cap(device);
20 std::cout <<
"Failed to open the camera" << std::endl;
25 std::cout <<
"Image size: " << frame.rows <<
" " << frame.cols << std::endl;
44 std::cout <<
"Catch an exception: " << e << std::endl;
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
error that can be emited by ViSP classes.
static void flush(const vpImage< unsigned char > &I)
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the opencv library.
virtual bool getClick(bool blocking=true)=0