YARP
Yet Another Robot Platform
RemoteFrameGrabber Class Reference

remote_grabber: Connect to a ServerFrameGrabber. See ServerFrameGrabber for the network protocol used. More...

#include <RemoteFrameGrabber/RemoteFrameGrabber.h>

+ Inheritance diagram for RemoteFrameGrabber:

Public Member Functions

 RemoteFrameGrabber ()
 
 RemoteFrameGrabber (const RemoteFrameGrabber &)=delete
 
 RemoteFrameGrabber (RemoteFrameGrabber &&)=delete
 
RemoteFrameGrabberoperator= (const RemoteFrameGrabber &)=delete
 
RemoteFrameGrabberoperator= (RemoteFrameGrabber &&)=delete
 
 ~RemoteFrameGrabber () override=default
 
bool getImage (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
 Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied. More...
 
bool getImageCrop (cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
 Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is applied. More...
 
int height () const override
 Return the height of each frame. More...
 
int width () const override
 Return the width of each frame. More...
 
bool open (yarp::os::Searchable &config) override
 Configure with a set of options. More...
 
bool close () override
 Close the DeviceDriver. More...
 
bool setBrightness (double v) override
 Set the brightness. More...
 
double getBrightness () override
 Read the brightness parameter. More...
 
bool setExposure (double v) override
 Set the exposure. More...
 
double getExposure () override
 Read the exposure parameter. More...
 
bool setSharpness (double v) override
 Set the sharpness. More...
 
double getSharpness () override
 Read the sharpness parameter. More...
 
bool setWhiteBalance (double blue, double red) override
 Set the white balance for the frame grabber. More...
 
bool getWhiteBalance (double &blue, double &red) override
 Read the white balance parameters. More...
 
bool setHue (double v) override
 Set the hue. More...
 
double getHue () override
 Read the hue parameter. More...
 
bool setSaturation (double v) override
 Set the saturation. More...
 
double getSaturation () override
 Read the saturation parameter. More...
 
bool setGamma (double v) override
 Set the gamma. More...
 
double getGamma () override
 Read the gamma parameter. More...
 
bool setShutter (double v) override
 Set the shutter parameter. More...
 
double getShutter () override
 Read the shutter parameter. More...
 
bool setGain (double v) override
 Set the gain. More...
 
double getGain () override
 Read the gain parameter. More...
 
bool setIris (double v) override
 Set the iris. More...
 
double getIris () override
 Read the iris parameter. More...
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberImage
virtual ~IFrameGrabberImage ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::FrameGrabberControls_Sender
 FrameGrabberControls_Sender (yarp::os::Port &port)
 
virtual ~FrameGrabberControls_Sender ()
 
bool getCameraDescription (CameraDescriptor *camera) override
 Get a basic description of the camera hw. More...
 
bool hasFeature (int feature, bool *hasFeature) override
 Check if camera has the requested feature (saturation, brightness ... More...
 
bool setFeature (int feature, double value) override
 Set the requested feature to a value (saturation, brightness ... More...
 
bool getFeature (int feature, double *value) override
 Get the current value for the requested feature. More...
 
bool setFeature (int feature, double value1, double value2) override
 Set the requested feature to a value using 2 params (like white balance) More...
 
bool getFeature (int feature, double *value1, double *value2) override
 Get the current value for the requested feature. More...
 
bool hasOnOff (int feature, bool *HasOnOff) override
 Check if the camera has the ability to turn on/off the requested feature. More...
 
bool setActive (int feature, bool onoff) override
 Set the requested feature on or off. More...
 
bool getActive (int feature, bool *isActive) override
 Get the current status of the feature, on or off. More...
 
bool hasAuto (int feature, bool *hasAuto) override
 Check if the requested feature has the 'auto' mode. More...
 
bool hasManual (int feature, bool *hasManual) override
 Check if the requested feature has the 'manual' mode. More...
 
bool hasOnePush (int feature, bool *hasOnePush) override
 Check if the requested feature has the 'onePush' mode. More...
 
bool setMode (int feature, FeatureMode mode) override
 Set the requested mode for the feature. More...
 
bool getMode (int feature, FeatureMode *mode) override
 Get the current mode for the feature. More...
 
bool setOnePush (int feature) override
 Set the requested feature to a value (saturation, brightness ... More...
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberControls
virtual ~IFrameGrabberControls ()
 Destructor. More...
 
cameraFeature_id_t featureVOCABEnum (int vocab)
 
int featureEnum2Vocab (cameraFeature_id_t _enum)
 
std::string busType2String (BusType type)
 
FeatureMode toFeatureMode (bool _auto)
 
- Public Member Functions inherited from ImplementDC1394
void init (yarp::os::Port *__port)
 
unsigned int getVideoModeMaskDC1394 () override
 
unsigned int getVideoModeDC1394 () override
 
bool setVideoModeDC1394 (int video_mode) override
 
unsigned int getFPSMaskDC1394 () override
 
unsigned int getFPSDC1394 () override
 
bool setFPSDC1394 (int fps) override
 
unsigned int getISOSpeedDC1394 () override
 
bool setISOSpeedDC1394 (int speed) override
 
unsigned int getColorCodingMaskDC1394 (unsigned int video_mode) override
 
unsigned int getColorCodingDC1394 () override
 
bool setColorCodingDC1394 (int coding) override
 
bool getFormat7MaxWindowDC1394 (unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep) override
 
bool getFormat7WindowDC1394 (unsigned int &xdim, unsigned int &ydim, int &x0, int &y0) override
 
bool setFormat7WindowDC1394 (unsigned int xdim, unsigned int ydim, int x0, int y0) override
 
bool setOperationModeDC1394 (bool b1394b) override
 
bool getOperationModeDC1394 () override
 
bool setTransmissionDC1394 (bool bTxON) override
 
bool getTransmissionDC1394 () override
 
bool setBroadcastDC1394 (bool onoff) override
 
bool setDefaultsDC1394 () override
 
bool setResetDC1394 () override
 
bool setPowerDC1394 (bool onoff) override
 
bool setCaptureDC1394 (bool bON) override
 
bool setBytesPerPacketDC1394 (unsigned int bpp) override
 
unsigned int getBytesPerPacketDC1394 () override
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberControlsDC1394
virtual ~IFrameGrabberControlsDC1394 ()
 
- Public Member Functions inherited from yarp::dev::Implement_RgbVisualParams_Sender
 Implement_RgbVisualParams_Sender (yarp::os::Port &port)
 
virtual ~Implement_RgbVisualParams_Sender ()
 
int getRgbHeight () override
 Return the height of each frame. More...
 
int getRgbWidth () override
 Return the width of each frame. More...
 
bool getRgbSupportedConfigurations (yarp::sig::VectorOf< CameraConfig > &configurations) override
 Get the possible configurations of the camera. More...
 
bool getRgbResolution (int &width, int &height) override
 Get the resolution of the rgb image from the camera. More...
 
bool setRgbResolution (int width, int height) override
 Set the resolution of the rgb image from the camera. More...
 
bool getRgbFOV (double &horizontalFov, double &verticalFov) override
 Get the field of view (FOV) of the rgb camera. More...
 
bool setRgbFOV (double horizontalFov, double verticalFov) override
 Set the field of view (FOV) of the rgb camera. More...
 
bool getRgbIntrinsicParam (yarp::os::Property &intrinsic) override
 Get the intrinsic parameters of the rgb camera. More...
 
bool getRgbMirroring (bool &mirror) override
 Get the mirroring setting of the sensor. More...
 
bool setRgbMirroring (bool mirror) override
 Set the mirroring setting of the sensor. More...
 
- Public Member Functions inherited from yarp::dev::IRgbVisualParams
virtual ~IRgbVisualParams ()
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 ~DeviceDriver () override=default
 Destructor. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 

Protected Member Functions

bool setCommand (int code, double v)
 
bool setCommand (int code, double b, double r)
 
double getCommand (int code) const
 
bool getCommand (int code, double &b, double &r) const
 

Protected Attributes

IFrameGrabberControlsDC1394 * Ifirewire {nullptr}
 
- Protected Attributes inherited from yarp::dev::Implement_RgbVisualParams_Sender
yarp::os::Port_port
 

Detailed Description

remote_grabber: Connect to a ServerFrameGrabber. See ServerFrameGrabber for the network protocol used.

remoteFrameGrabber

Definition at line 379 of file RemoteFrameGrabber.h.

Constructor & Destructor Documentation

◆ RemoteFrameGrabber() [1/3]

RemoteFrameGrabber::RemoteFrameGrabber ( )

Definition at line 18 of file RemoteFrameGrabber.cpp.

◆ RemoteFrameGrabber() [2/3]

RemoteFrameGrabber::RemoteFrameGrabber ( const RemoteFrameGrabber )
delete

◆ RemoteFrameGrabber() [3/3]

RemoteFrameGrabber::RemoteFrameGrabber ( RemoteFrameGrabber &&  )
delete

◆ ~RemoteFrameGrabber()

RemoteFrameGrabber::~RemoteFrameGrabber ( )
overridedefault

Member Function Documentation

◆ close()

bool RemoteFrameGrabber::close ( )
inlineoverridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 504 of file RemoteFrameGrabber.h.

◆ getBrightness()

double RemoteFrameGrabber::getBrightness ( )
inlineoverridevirtual

Read the brightness parameter.

Returns
the current brightness value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 516 of file RemoteFrameGrabber.h.

◆ getCommand() [1/2]

double RemoteFrameGrabber::getCommand ( int  code) const
inlineprotected

Definition at line 639 of file RemoteFrameGrabber.h.

◆ getCommand() [2/2]

bool RemoteFrameGrabber::getCommand ( int  code,
double &  b,
double &  r 
) const
inlineprotected

Definition at line 649 of file RemoteFrameGrabber.h.

◆ getExposure()

double RemoteFrameGrabber::getExposure ( )
inlineoverridevirtual

Read the exposure parameter.

Returns
the current exposure value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 524 of file RemoteFrameGrabber.h.

◆ getGain()

double RemoteFrameGrabber::getGain ( )
inlineoverridevirtual

Read the gain parameter.

Returns
the current gain value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 587 of file RemoteFrameGrabber.h.

◆ getGamma()

double RemoteFrameGrabber::getGamma ( )
inlineoverridevirtual

Read the gamma parameter.

Returns
the current gamma value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 569 of file RemoteFrameGrabber.h.

◆ getHue()

double RemoteFrameGrabber::getHue ( )
inlineoverridevirtual

Read the hue parameter.

Returns
the current hue value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 551 of file RemoteFrameGrabber.h.

◆ getImage()

bool RemoteFrameGrabber::getImage ( yarp::sig::ImageOf< yarp::sig::PixelRgb > &  image)
inlineoverridevirtual

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

Implements yarp::dev::IFrameGrabberImage.

Definition at line 395 of file RemoteFrameGrabber.h.

◆ getImageCrop()

bool RemoteFrameGrabber::getImageCrop ( cropType_id_t  cropType,
yarp::sig::VectorOf< std::pair< int, int > >  vertices,
yarp::sig::ImageOf< yarp::sig::PixelRgb > &  image 
)
inlineoverridevirtual

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 from yarp::dev::IFrameGrabberImage.

Definition at line 416 of file RemoteFrameGrabber.h.

◆ getIris()

double RemoteFrameGrabber::getIris ( )
inlineoverridevirtual

Read the iris parameter.

Returns
the current iris value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 596 of file RemoteFrameGrabber.h.

◆ getSaturation()

double RemoteFrameGrabber::getSaturation ( )
inlineoverridevirtual

Read the saturation parameter.

Returns
the current saturation value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 560 of file RemoteFrameGrabber.h.

◆ getSharpness()

double RemoteFrameGrabber::getSharpness ( )
inlineoverridevirtual

Read the sharpness parameter.

Returns
the current sharpness value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 533 of file RemoteFrameGrabber.h.

◆ getShutter()

double RemoteFrameGrabber::getShutter ( )
inlineoverridevirtual

Read the shutter parameter.

Returns
the current shutter value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 578 of file RemoteFrameGrabber.h.

◆ getWhiteBalance()

bool RemoteFrameGrabber::getWhiteBalance ( double &  blue,
double &  red 
)
inlineoverridevirtual

Read the white balance parameters.

Parameters
bluereference to return value for the red parameter.
redreference to return value for the green parameter.
Returns
true/false.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 542 of file RemoteFrameGrabber.h.

◆ height()

int RemoteFrameGrabber::height ( ) const
inlineoverridevirtual

Return the height of each frame.

Returns
image height

Implements yarp::dev::IFrameGrabberImage.

Definition at line 449 of file RemoteFrameGrabber.h.

◆ open()

bool RemoteFrameGrabber::open ( yarp::os::Searchable config)
inlineoverridevirtual

Configure with a set of options.

These are:

local Port name of this client.
remote Port name of server to connect to.
Parameters
configThe options to use
Returns
true iff the object could be configured.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 469 of file RemoteFrameGrabber.h.

◆ operator=() [1/2]

RemoteFrameGrabber& RemoteFrameGrabber::operator= ( const RemoteFrameGrabber )
delete

◆ operator=() [2/2]

RemoteFrameGrabber& RemoteFrameGrabber::operator= ( RemoteFrameGrabber &&  )
delete

◆ setBrightness()

bool RemoteFrameGrabber::setBrightness ( double  v)
inlineoverridevirtual

Set the brightness.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 512 of file RemoteFrameGrabber.h.

◆ setCommand() [1/2]

bool RemoteFrameGrabber::setCommand ( int  code,
double  b,
double  r 
)
inlineprotected

Definition at line 627 of file RemoteFrameGrabber.h.

◆ setCommand() [2/2]

bool RemoteFrameGrabber::setCommand ( int  code,
double  v 
)
inlineprotected

Definition at line 616 of file RemoteFrameGrabber.h.

◆ setExposure()

bool RemoteFrameGrabber::setExposure ( double  v)
inlineoverridevirtual

Set the exposure.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 520 of file RemoteFrameGrabber.h.

◆ setGain()

bool RemoteFrameGrabber::setGain ( double  v)
inlineoverridevirtual

Set the gain.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 583 of file RemoteFrameGrabber.h.

◆ setGamma()

bool RemoteFrameGrabber::setGamma ( double  v)
inlineoverridevirtual

Set the gamma.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 565 of file RemoteFrameGrabber.h.

◆ setHue()

bool RemoteFrameGrabber::setHue ( double  v)
inlineoverridevirtual

Set the hue.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 547 of file RemoteFrameGrabber.h.

◆ setIris()

bool RemoteFrameGrabber::setIris ( double  v)
inlineoverridevirtual

Set the iris.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 592 of file RemoteFrameGrabber.h.

◆ setSaturation()

bool RemoteFrameGrabber::setSaturation ( double  v)
inlineoverridevirtual

Set the saturation.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 556 of file RemoteFrameGrabber.h.

◆ setSharpness()

bool RemoteFrameGrabber::setSharpness ( double  v)
inlineoverridevirtual

Set the sharpness.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 529 of file RemoteFrameGrabber.h.

◆ setShutter()

bool RemoteFrameGrabber::setShutter ( double  v)
inlineoverridevirtual

Set the shutter parameter.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 574 of file RemoteFrameGrabber.h.

◆ setWhiteBalance()

bool RemoteFrameGrabber::setWhiteBalance ( double  blue,
double  red 
)
inlineoverridevirtual

Set the white balance for the frame grabber.

Parameters
bluecomponent gain.
redcomponent gain.
Returns
true/false if successful or not.

Reimplemented from yarp::dev::IFrameGrabberControls.

Definition at line 538 of file RemoteFrameGrabber.h.

◆ width()

int RemoteFrameGrabber::width ( ) const
inlineoverridevirtual

Return the width of each frame.

Returns
image width

Implements yarp::dev::IFrameGrabberImage.

Definition at line 454 of file RemoteFrameGrabber.h.

Member Data Documentation

◆ Ifirewire

IFrameGrabberControlsDC1394* RemoteFrameGrabber::Ifirewire {nullptr}
protected

Definition at line 614 of file RemoteFrameGrabber.h.


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