3 #include <visp3/core/vpImageConvert.h> 4 #include <visp3/gui/vpDisplayOpenCV.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);
19 if (!cap.isOpened()) {
20 std::cout <<
"Failed to open the camera" << std::endl;
25 while ((i++ < 100) && !cap.read(frame)) {
28 std::cout <<
"Image size: " << frame.rows <<
" " << frame.cols << std::endl;
46 std::cout <<
"Catch an exception: " << e << std::endl;
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
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. Thus to enable this class OpenC...