YARP
Yet Another Robot Platform
yarp::dev::IFrameGrabber Class Referenceabstract

Common interface to a FrameGrabber. More...

#include <yarp/dev/FrameGrabberInterfaces.h>

+ Inheritance diagram for yarp::dev::IFrameGrabber:

Public Member Functions

virtual ~IFrameGrabber ()
 
virtual bool getRawBuffer (unsigned char *buffer)=0
 Get the raw buffer from the frame grabber. More...
 
virtual int getRawBufferSize ()=0
 Get the size of the card's internal buffer, the user should use this method to allocate the storage to contain a raw frame (getRawBuffer). More...
 
virtual int height () const =0
 Return the height of each frame. More...
 
virtual int width () const =0
 Return the width of each frame. More...
 

Detailed Description

Common interface to a FrameGrabber.

Definition at line 168 of file FrameGrabberInterfaces.h.

Constructor & Destructor Documentation

◆ ~IFrameGrabber()

virtual yarp::dev::IFrameGrabber::~IFrameGrabber ( )
inlinevirtual

Definition at line 171 of file FrameGrabberInterfaces.h.

Member Function Documentation

◆ getRawBuffer()

virtual bool yarp::dev::IFrameGrabber::getRawBuffer ( unsigned char *  buffer)
pure virtual

Get the raw buffer from the frame grabber.

The driver returns a copy of the internal memory buffer acquired by the frame grabber, no post processing is applied (e.g. no color reconstruction/demosaicking). The user must allocate the buffer; the size of the buffer, in bytes, is determined by calling getRawBufferSize().

Parameters
bufferpointer to the buffer to be filled (must be previously allocated)
Returns
true/false upon success/failure

Implemented in V4L_camera, and USBCameraDriver.

◆ getRawBufferSize()

virtual int yarp::dev::IFrameGrabber::getRawBufferSize ( )
pure virtual

Get the size of the card's internal buffer, the user should use this method to allocate the storage to contain a raw frame (getRawBuffer).

Returns
the size of the internal buffer, in bytes.

Implemented in V4L_camera, and USBCameraDriver.

◆ height()

virtual int yarp::dev::IFrameGrabber::height ( ) const
pure virtual

Return the height of each frame.

Returns
image height

Implemented in V4L_camera, USBCameraDriverRaw, USBCameraDriverRgb, and USBCameraDriver.

◆ width()

virtual int yarp::dev::IFrameGrabber::width ( ) const
pure virtual

Return the width of each frame.

Returns
image width

Implemented in V4L_camera, USBCameraDriverRaw, USBCameraDriverRgb, and USBCameraDriver.


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