FrameGrabberV4lGrey Class Reference

#include <frame_grabber_v4l.h>

Inheritance diagram for FrameGrabberV4lGrey:

FrameGrabber List of all members.

Detailed Description

The FrameGrabberV4lGrey class.

This class provides an interface with a v4l camera on a linux system. I have not attempted at all to provide cross-compatibility with linux and windows and indeed some difficult questions are raised when hardware issues become involved.

under development

Author:
Brendan McCane

Definition at line 38 of file frame_grabber_v4l.h.


Public Types

typedef vxl_byte ImageContents
typedef vil1_memory_image_of<
ImageContents
ImageGrey

Public Member Functions

 FrameGrabberV4lGrey (int width_=384, int height_=288, bool debug=false, char *devname="/dev/video0")
 constructor.
virtual ~FrameGrabberV4lGrey ()
 destructor.
vil1_memory_imageget_current_frame ()
void acquire_frame_synch ()
 acquire_frame_synch.
void acquire_frame_asynch ()
 acquire_frame_asynch.
vil1_memory_imageget_current_and_acquire ()
 get_current_and_acquire.

Private Member Functions

void flip_current ()
 flip the current frame around a horizontal axis.

Private Attributes

ImageContentscontents [2]
ImageGreyim [2]
int current
AsyncIOaio
int width
int height
int fd
bool debug

Member Typedef Documentation

typedef vxl_byte FrameGrabberV4lGrey::ImageContents

Definition at line 41 of file frame_grabber_v4l.h.

typedef vil1_memory_image_of< ImageContents > FrameGrabberV4lGrey::ImageGrey

Definition at line 42 of file frame_grabber_v4l.h.


Constructor & Destructor Documentation

FrameGrabberV4lGrey::FrameGrabberV4lGrey ( int  width_ = 384,
int  height_ = 288,
bool  debug_ = false,
char *  devname = "/dev/video0" 
)

constructor.

Parameters:
int width: the width of the image (default 384)
int height: the height of the image (default 288)
char *devname: the name of the device (default /dev/video0
Under Development
Author:
Brendan McCane oul/oufgl

Definition at line 24 of file frame_grabber_v4l.cxx.

FrameGrabberV4lGrey::~FrameGrabberV4lGrey (  )  [virtual]

destructor.

.status Under Development .author Brendan McCane .library oul/oufgl

Definition at line 110 of file frame_grabber_v4l.cxx.


Member Function Documentation

vil1_memory_image* FrameGrabberV4lGrey::get_current_frame (  )  [inline, virtual]

Implements FrameGrabber.

Definition at line 48 of file frame_grabber_v4l.h.

void FrameGrabberV4lGrey::acquire_frame_synch (  )  [virtual]

acquire_frame_synch.

acquire a new frame synchronously (ie don't return until completed) You probably shouldn't mix asynch and synchronous calls as this tends to screw up the notion of the current frame.

.status Under Development .author Brendan McCane .library oul/oufgl

Implements FrameGrabber.

Definition at line 130 of file frame_grabber_v4l.cxx.

void FrameGrabberV4lGrey::acquire_frame_asynch (  )  [virtual]

acquire_frame_asynch.

acquire a new frame asynchronously (ie start acquiring and return immediately )

actually the asynch bit is currently not working. So at the moment it is actually acquiring synchronously.

.status Under Development .author Brendan McCane .library oul/oufgl

Implements FrameGrabber.

Definition at line 166 of file frame_grabber_v4l.cxx.

vil1_memory_image * FrameGrabberV4lGrey::get_current_and_acquire (  )  [virtual]

get_current_and_acquire.

start acquiring the next frame asynchronously and return the current frame

.status Under Development .author Brendan McCane .library oul/oufgl

Implements FrameGrabber.

Definition at line 201 of file frame_grabber_v4l.cxx.

void FrameGrabberV4lGrey::flip_current (  )  [private]

flip the current frame around a horizontal axis.

.status Under Development .author Brendan McCane .library oul/oufgl

Definition at line 218 of file frame_grabber_v4l.cxx.


Member Data Documentation

ImageContents* FrameGrabberV4lGrey::contents[2] [private]

Definition at line 68 of file frame_grabber_v4l.h.

ImageGrey* FrameGrabberV4lGrey::im[2] [private]

Definition at line 69 of file frame_grabber_v4l.h.

int FrameGrabberV4lGrey::current [private]

Definition at line 70 of file frame_grabber_v4l.h.

AsyncIO* FrameGrabberV4lGrey::aio [private]

Definition at line 71 of file frame_grabber_v4l.h.

int FrameGrabberV4lGrey::width [private]

Definition at line 72 of file frame_grabber_v4l.h.

int FrameGrabberV4lGrey::height [private]

Definition at line 72 of file frame_grabber_v4l.h.

int FrameGrabberV4lGrey::fd [private]

Definition at line 73 of file frame_grabber_v4l.h.

bool FrameGrabberV4lGrey::debug [private]

Definition at line 75 of file frame_grabber_v4l.h.


The documentation for this class was generated from the following files:
Generated on Tue Dec 2 05:25:27 2008 for contrib/oul/oufgl by  doxygen 1.5.1