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

Read a YARP-format image from a device. More...

#include <yarp/dev/FrameGrabberInterfaces.h>

+ Inheritance diagram for yarp::dev::IFrameGrabberImage:

Public Member Functions

virtual ~IFrameGrabberImage ()
 Destructor. More...
 
virtual bool getImage (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)=0
 Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied. More...
 
virtual bool getImageCrop (cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)
 Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is applied. 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

Read a YARP-format image from a device.

Examples
dev/file_grabber/file_grabber.cpp, and dev/grabber_client/grabber_client.cpp.

Definition at line 240 of file FrameGrabberInterfaces.h.

Constructor & Destructor Documentation

◆ ~IFrameGrabberImage()

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

Destructor.

Definition at line 246 of file FrameGrabberInterfaces.h.

Member Function Documentation

◆ getImage()

virtual bool yarp::dev::IFrameGrabberImage::getImage ( yarp::sig::ImageOf< yarp::sig::PixelRgb > &  image)
pure virtual

Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied.

Parameters
imagethe image to be filled
Returns
true/false upon success/failure

Implemented in USBCameraDriverRgb, ServerFrameGrabber, RemoteFrameGrabber, OpenCVGrabber, FfmpegGrabber, FakeFrameGrabber, and FakeBot.

◆ getImageCrop()

virtual bool yarp::dev::IFrameGrabberImage::getImageCrop ( cropType_id_t  cropType,
yarp::sig::VectorOf< std::pair< int, int > >  vertices,
yarp::sig::ImageOf< yarp::sig::PixelRgb > &  image 
)
inlinevirtual

Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is applied.

Note: this is not configuring the camera sensor to acquire a crop of the image, nor to generate a cropped version of the streaming. Instead, the full image is acquired and then a crop is created from it. The crop is meant to be created by the image producer upon user request via RPC call.

Parameters
cropTypeenum specifying how the crop shall be generated, defined at FrameGrabberInterfaces.h
verticesthe input coordinate (u,v) required by the cropType
imagethe image to be filled
Returns
true/false upon success/failure

Reimplemented in RemoteFrameGrabber.

Definition at line 272 of file FrameGrabberInterfaces.h.

◆ height()

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

Return the height of each frame.

Returns
image height

Implemented in USBCameraDriverRgb, ServerFrameGrabber, RemoteFrameGrabber, OpenCVGrabber, FfmpegGrabber, FakeFrameGrabber, and FakeBot.

◆ width()

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

Return the width of each frame.

Returns
image width

Implemented in USBCameraDriverRgb, ServerFrameGrabber, RemoteFrameGrabber, OpenCVGrabber, FfmpegGrabber, FakeFrameGrabber, and FakeBot.


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