26,20 → 26,21 |
|
- BTTV linux-like driver interface (bttv_open, bttv_ioctl, ecc) |
|
For a fast use of this driver (GRAY8 mode): |
For a fast use of this driver: |
|
makefile symbol: __BTTV__ |
|
#include <drivers/fg.h> |
|
FG_init(<grabbing period>,<grabbing wcet>,<grabbing width>,<grabbing height>); //Initialize FG |
FG_init(<grabbing period>,<grabbing wcet>,<grabbing width>,<grabbing height>,<color mode>); //Initialize FG |
|
<color mode> could be FG_MONO or FG_RGB24 |
|
fgptr = FG_getbuffer(); //Get the image pointer |
|
Now fgptr is a pointer to the grabbed image (GRAY8 type); |
Now fgptr is a pointer to the grabbed image, but to elaborate an |
image is better to define a function like |
|
But to elaborate an image is better to define a function like |
|
elaborate_image(void *imageptr); |
|
and with |
50,5 → 51,9 |
image is ready. A Double Buffer is implemented so the elaborated |
image is always complete and consistent. See fg.c for the code details. |
|
FG_close(); //Close the FG |
FG_start_grabbing(); to start the frame grabber |
|
FG_close(); To close the FG |
|
For an example see BTTVDEMO |
|