ViSP
 All Classes Functions Variables Enumerations Enumerator Friends Groups Pages
tutorial-grabber-CMU1394.cpp
1 
2 #include <visp/vp1394CMUGrabber.h>
3 #include <visp/vpDisplayGDI.h>
4 #include <visp/vpImage.h>
5 
6 int main()
7 {
8 #ifdef VISP_HAVE_CMU1394
10 
12  g.setVideoMode(0, 1); // 640x480 MONO8
13  g.setAutoShutter();
14  g.setAutoGain();
15  g.setFramerate(4); // 30 fps
16  g.open(I);
17 
18  std::cout << "Image size: " << I.getWidth() << " " << I.getHeight() << std::endl;
19 
20 #ifdef VISP_HAVE_GDI
21  vpDisplayGDI d(I);
22 #else
23  std::cout << "No image viewer is available..." << std::endl;
24 #endif
25 
26  while(1) {
27  g.acquire(I);
30  if (vpDisplay::getClick(I, false)) // A click to exit
31  break;
32  }
33 #endif
34 }