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

Control interface for frame grabber devices. More...

#include <yarp/dev/IFrameGrabberControls.h>

+ Inheritance diagram for yarp::dev::IFrameGrabberControls:

Public Member Functions

virtual ~IFrameGrabberControls ()
 Destructor. More...
 
virtual bool setBrightness (double v)
 Set the brightness. More...
 
virtual bool setExposure (double v)
 Set the exposure. More...
 
virtual bool setSharpness (double v)
 Set the sharpness. More...
 
virtual bool setWhiteBalance (double blue, double red)
 Set the white balance for the frame grabber. More...
 
virtual bool setHue (double v)
 Set the hue. More...
 
virtual bool setSaturation (double v)
 Set the saturation. More...
 
virtual bool setGamma (double v)
 Set the gamma. More...
 
virtual bool setShutter (double v)
 Set the shutter parameter. More...
 
virtual bool setGain (double v)
 Set the gain. More...
 
virtual bool setIris (double v)
 Set the iris. More...
 
virtual double getBrightness ()
 Read the brightness parameter. More...
 
virtual double getExposure ()
 Read the exposure parameter. More...
 
virtual double getSharpness ()
 Read the sharpness parameter. More...
 
virtual bool getWhiteBalance (double &blue, double &red)
 Read the white balance parameters. More...
 
virtual double getHue ()
 Read the hue parameter. More...
 
virtual double getSaturation ()
 Read the saturation parameter. More...
 
virtual double getGamma ()
 Read the gamma parameter. More...
 
virtual double getShutter ()
 Read the shutter parameter. More...
 
virtual double getGain ()
 Read the gain parameter. More...
 
virtual double getIris ()
 Read the iris parameter. More...
 
std::string busType2String (BusType type)
 
FeatureMode toFeatureMode (bool _auto)
 
virtual bool getCameraDescription (CameraDescriptor *camera)=0
 Get a basic description of the camera hw. More...
 
virtual bool hasFeature (int feature, bool *hasFeature)=0
 Check if camera has the requested feature (saturation, brightness ... More...
 
virtual bool setFeature (int feature, double value)=0
 Set the requested feature to a value (saturation, brightness ... More...
 
virtual bool getFeature (int feature, double *value)=0
 Get the current value for the requested feature. More...
 
virtual bool setFeature (int feature, double value1, double value2)=0
 Set the requested feature to a value using 2 params (like white balance) More...
 
virtual bool getFeature (int feature, double *value1, double *value2)=0
 Get the current value for the requested feature. More...
 
virtual bool hasOnOff (int feature, bool *HasOnOff)=0
 Check if the camera has the ability to turn on/off the requested feature. More...
 
virtual bool setActive (int feature, bool onoff)=0
 Set the requested feature on or off. More...
 
virtual bool getActive (int feature, bool *isActive)=0
 Get the current status of the feature, on or off. More...
 
virtual bool hasAuto (int feature, bool *hasAuto)=0
 Check if the requested feature has the 'auto' mode. More...
 
virtual bool hasManual (int feature, bool *hasManual)=0
 Check if the requested feature has the 'manual' mode. More...
 
virtual bool hasOnePush (int feature, bool *hasOnePush)=0
 Check if the requested feature has the 'onePush' mode. More...
 
virtual bool setMode (int feature, FeatureMode mode)=0
 Set the requested mode for the feature. More...
 
virtual bool getMode (int feature, FeatureMode *mode)=0
 Get the current mode for the feature. More...
 
virtual bool setOnePush (int feature)=0
 Set the requested feature to a value (saturation, brightness ... More...
 

Detailed Description

Control interface for frame grabber devices.

Definition at line 68 of file IFrameGrabberControls.h.

Constructor & Destructor Documentation

◆ ~IFrameGrabberControls()

yarp::dev::IFrameGrabberControls::~IFrameGrabberControls ( )
virtualdefault

Destructor.

Member Function Documentation

◆ busType2String()

std::string yarp::dev::IFrameGrabberControls::busType2String ( BusType  type)
inline

Definition at line 215 of file IFrameGrabberControls.h.

◆ getActive()

virtual bool yarp::dev::IFrameGrabberControls::getActive ( int  feature,
bool *  isActive 
)
pure virtual

Get the current status of the feature, on or off.

Parameters
featurethe identifier of the feature to check
isActiveflag true if the feature is active, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, depthCameraDriver, and V4L_camera.

◆ getBrightness()

virtual double yarp::dev::IFrameGrabberControls::getBrightness ( )
inlinevirtual

Read the brightness parameter.

Returns
the current brightness value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 156 of file IFrameGrabberControls.h.

◆ getCameraDescription()

virtual bool yarp::dev::IFrameGrabberControls::getCameraDescription ( CameraDescriptor camera)
pure virtual

Get a basic description of the camera hw.

This is mainly used to determine the HW bus type in order to choose the corresponding interface for advanced controls.

Parameters
devicereturns an identifier for the bus
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ getExposure()

virtual double yarp::dev::IFrameGrabberControls::getExposure ( )
inlinevirtual

Read the exposure parameter.

Returns
the current exposure value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 162 of file IFrameGrabberControls.h.

◆ getFeature() [1/2]

virtual bool yarp::dev::IFrameGrabberControls::getFeature ( int  feature,
double *  value 
)
pure virtual

Get the current value for the requested feature.

Parameters
featurethe identifier of the feature to read
valuepointer to current value of the feature, from 0 to 1 expressed as a percentage
Returns
returns true on success, false on failure.

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ getFeature() [2/2]

virtual bool yarp::dev::IFrameGrabberControls::getFeature ( int  feature,
double *  value1,
double *  value2 
)
pure virtual

Get the current value for the requested feature.

Parameters
featurethe identifier of the feaature to read
value1returns the current value of the feature, from 0 to 1 expressed as a percentage
value2returns the current value of the feature, from 0 to 1 expressed as a percentage
Returns
returns true on success, false on failure.

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ getGain()

virtual double yarp::dev::IFrameGrabberControls::getGain ( )
inlinevirtual

Read the gain parameter.

Returns
the current gain value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 206 of file IFrameGrabberControls.h.

◆ getGamma()

virtual double yarp::dev::IFrameGrabberControls::getGamma ( )
inlinevirtual

Read the gamma parameter.

Returns
the current gamma value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 194 of file IFrameGrabberControls.h.

◆ getHue()

virtual double yarp::dev::IFrameGrabberControls::getHue ( )
inlinevirtual

Read the hue parameter.

Returns
the current hue value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 182 of file IFrameGrabberControls.h.

◆ getIris()

virtual double yarp::dev::IFrameGrabberControls::getIris ( )
inlinevirtual

Read the iris parameter.

Returns
the current iris value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 212 of file IFrameGrabberControls.h.

◆ getMode()

virtual bool yarp::dev::IFrameGrabberControls::getMode ( int  feature,
FeatureMode mode 
)
pure virtual

Get the current mode for the feature.

Parameters
featurethe identifier of the feature to change
hasAutoflag true if the feature is has 'auto' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ getSaturation()

virtual double yarp::dev::IFrameGrabberControls::getSaturation ( )
inlinevirtual

Read the saturation parameter.

Returns
the current saturation value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 188 of file IFrameGrabberControls.h.

◆ getSharpness()

virtual double yarp::dev::IFrameGrabberControls::getSharpness ( )
inlinevirtual

Read the sharpness parameter.

Returns
the current sharpness value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 168 of file IFrameGrabberControls.h.

◆ getShutter()

virtual double yarp::dev::IFrameGrabberControls::getShutter ( )
inlinevirtual

Read the shutter parameter.

Returns
the current shutter value.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 200 of file IFrameGrabberControls.h.

◆ getWhiteBalance()

virtual bool yarp::dev::IFrameGrabberControls::getWhiteBalance ( double &  blue,
double &  red 
)
inlinevirtual

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 in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 176 of file IFrameGrabberControls.h.

◆ hasAuto()

virtual bool yarp::dev::IFrameGrabberControls::hasAuto ( int  feature,
bool *  hasAuto 
)
pure virtual

Check if the requested feature has the 'auto' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'auto' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, depthCameraDriver, and V4L_camera.

◆ hasFeature()

virtual bool yarp::dev::IFrameGrabberControls::hasFeature ( int  feature,
bool *  hasFeature 
)
pure virtual

Check if camera has the requested feature (saturation, brightness ...

)

Parameters
featurethe identifier of the feature to check
hasFeatureflag value: true if the feature is present, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ hasManual()

virtual bool yarp::dev::IFrameGrabberControls::hasManual ( int  feature,
bool *  hasManual 
)
pure virtual

Check if the requested feature has the 'manual' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'manual' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, depthCameraDriver, and V4L_camera.

◆ hasOnePush()

virtual bool yarp::dev::IFrameGrabberControls::hasOnePush ( int  feature,
bool *  hasOnePush 
)
pure virtual

Check if the requested feature has the 'onePush' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'onePush' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, depthCameraDriver, and V4L_camera.

◆ hasOnOff()

virtual bool yarp::dev::IFrameGrabberControls::hasOnOff ( int  feature,
bool *  HasOnOff 
)
pure virtual

Check if the camera has the ability to turn on/off the requested feature.

Parameters
featurethe identifier of the feature to change
hasOnOffflag true if this feature can be turned on/off, false otherwise.
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, depthCameraDriver, and V4L_camera.

◆ setActive()

virtual bool yarp::dev::IFrameGrabberControls::setActive ( int  feature,
bool  onoff 
)
pure virtual

Set the requested feature on or off.

Parameters
featurethe identifier of the feature to change
onofftrue to activate, off to deactivate the feature
Returns
returns true on success, false on failure.

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ setBrightness()

virtual bool yarp::dev::IFrameGrabberControls::setBrightness ( double  v)
inlinevirtual

Set the brightness.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 84 of file IFrameGrabberControls.h.

◆ setExposure()

virtual bool yarp::dev::IFrameGrabberControls::setExposure ( double  v)
inlinevirtual

Set the exposure.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 91 of file IFrameGrabberControls.h.

◆ setFeature() [1/2]

virtual bool yarp::dev::IFrameGrabberControls::setFeature ( int  feature,
double  value 
)
pure virtual

Set the requested feature to a value (saturation, brightness ...

)

Parameters
featurethe identifier of the feature to change
valuenew value of the feature, range from 0 to 1 expressed as a percentage
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ setFeature() [2/2]

virtual bool yarp::dev::IFrameGrabberControls::setFeature ( int  feature,
double  value1,
double  value2 
)
pure virtual

Set the requested feature to a value using 2 params (like white balance)

Parameters
featurethe identifier of the feature to change
value1first param, from 0 to 1 expressed as a percentage
value2second param, from 0 to 1 expressed as a percentage
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ setGain()

virtual bool yarp::dev::IFrameGrabberControls::setGain ( double  v)
inlinevirtual

Set the gain.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 141 of file IFrameGrabberControls.h.

◆ setGamma()

virtual bool yarp::dev::IFrameGrabberControls::setGamma ( double  v)
inlinevirtual

Set the gamma.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 127 of file IFrameGrabberControls.h.

◆ setHue()

virtual bool yarp::dev::IFrameGrabberControls::setHue ( double  v)
inlinevirtual

Set the hue.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 113 of file IFrameGrabberControls.h.

◆ setIris()

virtual bool yarp::dev::IFrameGrabberControls::setIris ( double  v)
inlinevirtual

Set the iris.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 148 of file IFrameGrabberControls.h.

◆ setMode()

virtual bool yarp::dev::IFrameGrabberControls::setMode ( int  feature,
FeatureMode  mode 
)
pure virtual

Set the requested mode for the feature.

Parameters
featurethe identifier of the feature to change
auto_onofftrue to activate 'auto' mode, false to activate 'manual' mode
Returns
returns true on success, false on failure.

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ setOnePush()

virtual bool yarp::dev::IFrameGrabberControls::setOnePush ( int  feature)
pure virtual

Set the requested feature to a value (saturation, brightness ...

)

Parameters
featurethe identifier of the feature to change
valuenew value of the feature, from 0 to 1 as a percentage of param range
Returns
returns true on success, false on failure.

Implemented in V4L_camera, USBCameraDriver, FrameGrabberCropper, yarp::proto::framegrabber::FrameGrabberControls_Forwarder, FakeFrameGrabber, and depthCameraDriver.

◆ setSaturation()

virtual bool yarp::dev::IFrameGrabberControls::setSaturation ( double  v)
inlinevirtual

Set the saturation.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 120 of file IFrameGrabberControls.h.

◆ setSharpness()

virtual bool yarp::dev::IFrameGrabberControls::setSharpness ( double  v)
inlinevirtual

Set the sharpness.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 98 of file IFrameGrabberControls.h.

◆ setShutter()

virtual bool yarp::dev::IFrameGrabberControls::setShutter ( double  v)
inlinevirtual

Set the shutter parameter.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 134 of file IFrameGrabberControls.h.

◆ setWhiteBalance()

virtual bool yarp::dev::IFrameGrabberControls::setWhiteBalance ( double  blue,
double  red 
)
inlinevirtual

Set the white balance for the frame grabber.

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

Reimplemented in RemoteFrameGrabber, and yarp::proto::framegrabber::FrameGrabberControls_Forwarder.

Definition at line 106 of file IFrameGrabberControls.h.

◆ toFeatureMode()

FeatureMode yarp::dev::IFrameGrabberControls::toFeatureMode ( bool  _auto)
inline

Definition at line 232 of file IFrameGrabberControls.h.


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