ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
tutorial-grabber-v4l2.cpp
1
2
#include <visp/vpV4l2Grabber.h>
3
#include <visp/vpDisplayX.h>
4
#include <visp/vpImage.h>
5
6
int
main()
7
{
8
#ifdef VISP_HAVE_V4L2
9
vpImage<unsigned char>
I;
10
11
vpV4l2Grabber
g;
12
g.
open
(I);
13
14
std::cout <<
"Image size: "
<< I.
getWidth
() <<
" "
<< I.
getHeight
() << std::endl;
15
16
#ifdef VISP_HAVE_X11
17
vpDisplayX
d(I);
18
#else
19
std::cout <<
"No image viewer is available..."
<< std::endl;
20
#endif
21
22
while
(1) {
23
g.
acquire
(I);
24
vpDisplay::display
(I);
25
vpDisplay::flush
(I);
26
if
(
vpDisplay::getClick
(I,
false
))
break
;
27
}
28
#endif
29
}
tutorial
grabber
tutorial-grabber-v4l2.cpp
Generated on Tue Sep 17 2013 00:21:43 for ViSP by
1.8.4