|
libeblearntools
|
#include <camera_v4l2.h>
Public Member Functions | |
| camera_v4l2 (const char *device, int height=-1, int width=-1, bool grayscale=false, bool mode_rgb_=true) | |
| virtual | ~camera_v4l2 () |
| Destructor. | |
| virtual idx< Tdata > | grab () |
| Return a new frame. | |
Protected Attributes | |
| bool | started |
| < Output grayscale or not. | |
| int | nbuffers |
| void * | buffers |
| int * | sizes |
| int | fd |
| bool | mode_rgb |
The camera_v4l2 class interfaces with the v4l2 camera and images. It allows to grab images from v4l2 in the idx format, and also to save gui outputs into video files.
| ebl::camera_v4l2< Tdata >::camera_v4l2 | ( | const char * | device, |
| int | height = -1, |
||
| int | width = -1, |
||
| bool | grayscale = false, |
||
| bool | mode_rgb_ = true |
||
| ) |
Initialize v4l2 camera using device to choose which camera_v4l2 to use. height and width are optional parameters that resize the input image to those dimensions if given (different than -1). One may want to decrease the input resolution first to speed up operations, for example when computing multiple resolutions.
| device | The device string, e.g. "/dev/video". |
| height | Resize input frame to this height if different than -1. |
| width | Resize input frame to this width if different than -1. |
| grayscale | If true, output grayscale directly. |
| mode_rgb | sets the mode to RGB, if false, it sets YUV |