libeblearntools
ebl::camera_v4l2< Tdata > Class Template Reference

#include <camera_v4l2.h>

Inheritance diagram for ebl::camera_v4l2< Tdata >:
ebl::camera< Tdata >

List of all members.

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

Detailed Description

template<typename Tdata>
class ebl::camera_v4l2< Tdata >

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.


Constructor & Destructor Documentation

template<typename Tdata >
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.

Parameters:
deviceThe device string, e.g. "/dev/video".
heightResize input frame to this height if different than -1.
widthResize input frame to this width if different than -1.
grayscaleIf true, output grayscale directly.
mode_rgbsets the mode to RGB, if false, it sets YUV

The documentation for this class was generated from the following files: