XCgrabber Class Reference

Inheritance diagram for XCgrabber:
Inheritance graph
[legend]
Collaboration diagram for XCgrabber:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XCgrabber (OptionManager &mgr, const std::string &descrName="XC Frame Grabber Driver", const std::string &tagName="XCFrameGrabber", const ParamFlag flags=USE_MY_VAL)
 Constructor.
virtual ~XCgrabber ()
 Destructor.
virtual GenericFrameSpec peekFrameSpec ()
 Return the specifications of the next frame to be returned.
virtual SimTime getNaturalFrameTime () const
 Get the inter-frame time that matches our video mode.
void WhiteBalance ()
 White balance.
virtual GenericFrame readFrame ()
 Get the next frame from the frame-grabber.
xclib::pxbuffer_t getCurrBufID ()

Protected Member Functions

VideoFrame grabRaw ()
 Grab raw data (the raw bayer format data).
virtual void start1 ()
 get started
virtual void stop2 ()
 get stopped

Protected Attributes

OModelParam< int > itsChannel
 framegrabber channel
OModelParam< DimsitsDims
 captured image dims, may be smaller than native
OModelParam< DimsitsOffset
 captured image offset if dims smaller than native
OModelParam< int > itsNbuf
 Number of grab buffers to use.
OModelParam< VideoFormatitsGrabMode
 grab mode that the hardware should use
OModelParam< bool > itsByteSwap
 determines whether byte swapping is done during conversion to RGB
OModelParam< int > itsWhiteBalTarR
 for white balance
OModelParam< int > itsWhiteBalTarG
 for white balance
OModelParam< int > itsWhiteBalTarB
 for white balance
OModelParam< int > itsWhiteBalRefR
 for white balance
OModelParam< int > itsWhiteBalRefG
 for white balance
OModelParam< int > itsWhiteBalRefB
 for white balance
OModelParam< float > itsGamma
 gamma correction, dependent on your driver
OModelParam< float > itsFPS
 frames per second
int itsBitDepth
 Bit depth (per component).
int itsNumComp
 Number of components.
pthread_mutex_t qmutex_buf
OModelParam< std::stringitsFormatFile
bool itsCameraOk
xclib::pxbuffer_t itsLastBuf
byteitsImgBuf
struct xclib::xclibs itsXclib
int itsStateid
int itsUnitMap
struct xclib::pximage ** itsPximg

Detailed Description

Definition at line 67 of file XCgrabber.H.


Constructor & Destructor Documentation

XCgrabber::XCgrabber ( OptionManager mgr,
const std::string descrName = "XC Frame Grabber Driver",
const std::string tagName = "XCFrameGrabber",
const ParamFlag  flags = USE_MY_VAL 
)

Constructor.

Definition at line 59 of file XCgrabber.C.

XCgrabber::~XCgrabber (  )  [virtual]

Destructor.

Definition at line 319 of file XCgrabber.C.


Member Function Documentation

SimTime XCgrabber::getNaturalFrameTime (  )  const [virtual]

Get the inter-frame time that matches our video mode.

Reimplemented from FrameIstream.

Definition at line 335 of file XCgrabber.C.

References OModelParam< T >::getVal(), SimTime::HERTZ(), and itsFPS.

VideoFrame XCgrabber::grabRaw (  )  [protected]

Grab raw data (the raw bayer format data).

Don't call this directly; use readFrame() instead.

Definition at line 347 of file XCgrabber.C.

References ASSERT, OModelParam< T >::getVal(), itsBitDepth, itsByteSwap, itsDims, itsGrabMode, itsNbuf, itsNumComp, and Dims::sz().

Referenced by readFrame().

GenericFrameSpec XCgrabber::peekFrameSpec (  )  [virtual]

Return the specifications of the next frame to be returned.

Implements FrameIstream.

Definition at line 323 of file XCgrabber.C.

References OModelParam< T >::getVal(), itsByteSwap, itsDims, and itsGrabMode.

GenericFrame XCgrabber::readFrame (  )  [virtual]

Get the next frame from the frame-grabber.

Returns grabbed frame. This call will block until a frame is ready and has been grabbed.

Beware that the integrity of the GenericFrame object may not last "very long"; basically, try to be finished using the GenericFrame object before you attempt to grab the next frame in the stream. If you need it for longer than that, then you should use GenericFrame::deepCopyOf() to make a copy of the frame that can be safely held indefinitely.

Implements FrameIstream.

Definition at line 341 of file XCgrabber.C.

References grabRaw().

void XCgrabber::start1 (  )  [protected, virtual]

get started

show some info of pxvidstate structure

Reimplemented from ModelComponent.

Definition at line 90 of file XCgrabber.C.

References rutz::format(), OModelParam< T >::getVal(), Dims::h(), itsBitDepth, itsChannel, itsDims, itsGrabMode, itsNbuf, itsNumComp, itsOffset, Dims::sz(), and Dims::w().

void XCgrabber::stop2 (  )  [protected, virtual]

get stopped

Reimplemented from ModelComponent.

Definition at line 300 of file XCgrabber.C.

References OModelParam< T >::getVal(), and itsNbuf.

void XCgrabber::WhiteBalance (  ) 

White balance.


Member Data Documentation

int XCgrabber::itsBitDepth [protected]

Bit depth (per component).

Definition at line 139 of file XCgrabber.H.

Referenced by grabRaw(), and start1().

determines whether byte swapping is done during conversion to RGB

Definition at line 128 of file XCgrabber.H.

Referenced by grabRaw(), and peekFrameSpec().

framegrabber channel

Definition at line 115 of file XCgrabber.H.

Referenced by start1().

captured image dims, may be smaller than native

Definition at line 116 of file XCgrabber.H.

Referenced by grabRaw(), peekFrameSpec(), and start1().

OModelParam<float> XCgrabber::itsFPS [protected]

frames per second

Definition at line 137 of file XCgrabber.H.

Referenced by getNaturalFrameTime().

OModelParam<float> XCgrabber::itsGamma [protected]

gamma correction, dependent on your driver

Definition at line 136 of file XCgrabber.H.

grab mode that the hardware should use

Grabbed frames will internally be converted to Image< PixRGB<byte> > whatever that mode is, but playing with it may influence image quality, maximum achievable framerate, and amounts of CPU doing those conversions to RGB.

Definition at line 125 of file XCgrabber.H.

Referenced by grabRaw(), peekFrameSpec(), and start1().

OModelParam<int> XCgrabber::itsNbuf [protected]

Number of grab buffers to use.

Definition at line 118 of file XCgrabber.H.

Referenced by grabRaw(), start1(), and stop2().

int XCgrabber::itsNumComp [protected]

Number of components.

Definition at line 140 of file XCgrabber.H.

Referenced by grabRaw(), and start1().

captured image offset if dims smaller than native

Definition at line 117 of file XCgrabber.H.

Referenced by start1().

for white balance

Definition at line 135 of file XCgrabber.H.

for white balance

Definition at line 134 of file XCgrabber.H.

for white balance

Definition at line 133 of file XCgrabber.H.

for white balance

Definition at line 132 of file XCgrabber.H.

for white balance

Definition at line 131 of file XCgrabber.H.

for white balance

Definition at line 130 of file XCgrabber.H.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:44:03 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3