ViSP
 All Classes Functions Variables Enumerations Enumerator Friends Groups Pages
tutorial-grabber-opencv.cpp
1 
2 #include <visp/vpDisplayOpenCV.h>
3 #include <visp/vpOpenCVGrabber.h>
4 
5 int main()
6 {
7 #ifdef VISP_HAVE_OPENCV
9 
11  g.open(I);
12 
13  std::cout << "Image size: " << I.getWidth() << " " << I.getHeight() << std::endl;
14  vpDisplayOpenCV d(I);
15 
16  while(1) {
17  g.acquire(I);
20  if (vpDisplay::getClick(I, false))
21  break;
22  }
23 #endif
24 }