6#ifndef YARP_FRAMEGRABBERCROPPER_FRAMEGRABBERCROPPER_H
7#define YARP_FRAMEGRABBERCROPPER_FRAMEGRABBERCROPPER_H
20template <
typename ImageType>
70 bool subdeviceOwned{
false};
77 bool forwardRgbVisualParams{
false};
88 bool close()
override;
103 if (!iFrameGrabberControls) {
111 if (!iFrameGrabberControls) {
118 {
if (!iFrameGrabberControls) {
121 return iFrameGrabberControls->
setFeature(feature, value);
126 if (!iFrameGrabberControls) {
129 return iFrameGrabberControls->
getFeature(feature, value);
132 bool setFeature(
int feature,
double value1,
double value2)
override
134 if (!iFrameGrabberControls) {
137 return iFrameGrabberControls->
setFeature(feature, value1, value2);
140 bool getFeature(
int feature,
double* value1,
double* value2)
override
142 if (!iFrameGrabberControls) {
145 return iFrameGrabberControls->
getFeature(feature, value1, value2);
148 bool hasOnOff(
int feature,
bool* HasOnOff)
override
150 if (!iFrameGrabberControls) {
153 return iFrameGrabberControls->
hasOnOff(feature, HasOnOff);
158 if (!iFrameGrabberControls) {
161 return iFrameGrabberControls->
setActive(feature, onoff);
166 if (!iFrameGrabberControls) {
169 return iFrameGrabberControls->
getActive(feature, isActive);
174 if (!iFrameGrabberControls) {
182 if (!iFrameGrabberControls) {
190 if (!iFrameGrabberControls) {
198 if (!iFrameGrabberControls) {
201 return iFrameGrabberControls->
setMode(feature, mode);
206 if (!iFrameGrabberControls) {
209 return iFrameGrabberControls->
getMode(feature, mode);
214 if (!iFrameGrabberControls) {
217 return iFrameGrabberControls->
setOnePush(feature);
224 if (!iFrameGrabberControlsDC1394) {
232 if (!iFrameGrabberControlsDC1394) {
240 if (!iFrameGrabberControlsDC1394) {
248 if (!iFrameGrabberControlsDC1394) {
257 if (!iFrameGrabberControlsDC1394) {
266 if (!iFrameGrabberControlsDC1394) {
274 if (!iFrameGrabberControlsDC1394) {
283 if (!iFrameGrabberControlsDC1394) {
291 if (!iFrameGrabberControlsDC1394) {
299 if (!iFrameGrabberControlsDC1394) {
307 if (!iFrameGrabberControlsDC1394) {
317 unsigned int& xoffstep,
318 unsigned int& yoffstep)
override
320 if (!iFrameGrabberControlsDC1394) {
328 if (!iFrameGrabberControlsDC1394) {
336 if (!iFrameGrabberControlsDC1394) {
344 if (!iFrameGrabberControlsDC1394) {
352 if (!iFrameGrabberControlsDC1394) {
360 if (!iFrameGrabberControlsDC1394) {
368 if (!iFrameGrabberControlsDC1394) {
376 if (!iFrameGrabberControlsDC1394) {
384 if (!iFrameGrabberControlsDC1394) {
392 if (!iFrameGrabberControlsDC1394) {
400 if (!iFrameGrabberControlsDC1394) {
408 if (!iFrameGrabberControlsDC1394) {
416 if (!iFrameGrabberControlsDC1394) {
424 if (!iFrameGrabberControlsDC1394) {
444 if (!iRgbVisualParams || !forwardRgbVisualParams) {
450 bool getRgbFOV(
double& horizontalFov,
double& verticalFov)
override
452 if (!iRgbVisualParams || !forwardRgbVisualParams) {
453 horizontalFov = std::numeric_limits<double>::quiet_NaN();
454 verticalFov = std::numeric_limits<double>::quiet_NaN();
457 return iRgbVisualParams->
getRgbFOV(horizontalFov, verticalFov);
460 bool setRgbFOV(
double horizontalFov,
double verticalFov)
override
462 if (!iRgbVisualParams || !forwardRgbVisualParams) {
465 return iRgbVisualParams->
setRgbFOV(horizontalFov, verticalFov);
470 if (!iRgbVisualParams || !forwardRgbVisualParams) {
479 if (!iRgbVisualParams || !forwardRgbVisualParams) {
489 if (!iRgbVisualParams || !forwardRgbVisualParams) {
499 if (!iPreciselyTimed) {
~FrameGrabberCropperOf() override=default
yarp::sig::VectorOf< std::pair< int, int > > vertices
static constexpr cropType_id_t cropType
yarp::dev::IFrameGrabberOf< ImageType > * iFrameGrabberOf
int width() const override
Return the width of each frame.
int height() const override
Return the height of each frame.
bool getImage(ImageType &image) override
Get an image from the frame grabber.
unsigned int getColorCodingMaskDC1394(unsigned int video_mode) override
bool close() override
Close the DeviceDriver.
bool hasManual(int feature, bool *hasManual) override
Check if the requested feature has the 'manual' mode.
bool setBroadcastDC1394(bool onoff) override
bool setTransmissionDC1394(bool bTxON) override
FrameGrabberCropper(const FrameGrabberCropper &)=delete
bool setDefaultsDC1394() override
bool getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
bool hasFeature(int feature, bool *hasFeature) override
Check if camera has the requested feature (saturation, brightness ... )
bool setCaptureDC1394(bool bON) override
unsigned int getVideoModeDC1394() override
unsigned int getFPSMaskDC1394() override
bool setColorCodingDC1394(int coding) override
bool setActive(int feature, bool onoff) override
Set the requested feature on or off.
bool hasOnOff(int feature, bool *HasOnOff) override
Check if the camera has the ability to turn on/off the requested feature.
unsigned int getFPSDC1394() override
bool attachAll(const yarp::dev::PolyDriverList &device2attach) override
Attach to a list of objects.
bool getCameraDescription(CameraDescriptor *camera) override
Get a basic description of the camera hw.
bool setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
bool setBytesPerPacketDC1394(unsigned int bpp) override
bool getRgbIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
int getRgbWidth() override
Return the width of each frame.
bool getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0) override
bool detach() override
Detach the object (you must have first called attach).
bool setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
bool setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
bool setFPSDC1394(int fps) override
bool getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep) override
unsigned int getBytesPerPacketDC1394() override
FrameGrabberCropper(FrameGrabberCropper &&)=delete
bool getTransmissionDC1394() override
FrameGrabberCropper & operator=(FrameGrabberCropper &&)=delete
bool setVideoModeDC1394(int video_mode) override
bool getFeature(int feature, double *value) override
Get the current value for the requested feature.
yarp::os::Stamp getLastInputStamp() override
Return the time stamp relative to the last acquisition.
unsigned int getColorCodingDC1394() override
bool setOperationModeDC1394(bool b1394b) override
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getFeature(int feature, double *value1, double *value2) override
Get the current value for the requested feature.
unsigned int getISOSpeedDC1394() override
bool setResetDC1394() override
bool hasOnePush(int feature, bool *hasOnePush) override
Check if the requested feature has the 'onePush' mode.
bool detachAll() override
Detach the object (you must have first called attach).
FrameGrabberCropper & operator=(const FrameGrabberCropper &)=delete
bool hasAuto(int feature, bool *hasAuto) override
Check if the requested feature has the 'auto' mode.
bool getActive(int feature, bool *isActive) override
Get the current status of the feature, on or off.
bool setFeature(int feature, double value1, double value2) override
Set the requested feature to a value using 2 params (like white balance)
bool getOperationModeDC1394() override
bool setFeature(int feature, double value) override
Set the requested feature to a value (saturation, brightness ... )
unsigned int getVideoModeMaskDC1394() override
~FrameGrabberCropper() override
bool getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
bool setISOSpeedDC1394(int speed) override
bool setMode(int feature, FeatureMode mode) override
Set the requested mode for the feature.
int getRgbHeight() override
Return the height of each frame.
bool setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0) override
bool setPowerDC1394(bool onoff) override
FrameGrabberCropper()=default
bool getMode(int feature, FeatureMode *mode) override
Get the current mode for the feature.
bool attach(yarp::dev::PolyDriver *poly) override
Attach to another object.
bool setOnePush(int feature) override
Set the requested feature to a value (saturation, brightness ... )
Interface implemented by all device drivers.
virtual unsigned int getISOSpeedDC1394()=0
virtual bool setISOSpeedDC1394(int speed)=0
virtual unsigned int getBytesPerPacketDC1394()=0
virtual bool setPowerDC1394(bool onoff)=0
virtual unsigned int getFPSMaskDC1394()=0
virtual bool getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0)=0
virtual unsigned int getFPSDC1394()=0
virtual bool setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0)=0
virtual bool setBroadcastDC1394(bool onoff)=0
virtual bool setBytesPerPacketDC1394(unsigned int bpp)=0
virtual bool setDefaultsDC1394()=0
virtual bool setColorCodingDC1394(int coding)=0
virtual bool getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep)=0
virtual bool setFPSDC1394(int fps)=0
virtual bool setResetDC1394()=0
virtual bool getTransmissionDC1394()=0
virtual bool setVideoModeDC1394(int video_mode)=0
virtual unsigned int getColorCodingMaskDC1394(unsigned int video_mode)=0
virtual unsigned int getVideoModeMaskDC1394()=0
virtual unsigned int getColorCodingDC1394()=0
virtual bool setCaptureDC1394(bool bON)=0
virtual bool setOperationModeDC1394(bool b1394b)=0
virtual bool getOperationModeDC1394()=0
virtual bool setTransmissionDC1394(bool bTxON)=0
Control interface for frame grabber devices.
virtual bool setFeature(int feature, double value)=0
Set the requested feature to a value (saturation, brightness ... )
virtual bool setOnePush(int feature)=0
Set the requested feature to a value (saturation, brightness ... )
virtual bool getFeature(int feature, double *value)=0
Get the current value for the requested feature.
virtual bool hasManual(int feature, bool *hasManual)=0
Check if the requested feature has the 'manual' mode.
virtual bool setMode(int feature, FeatureMode mode)=0
Set the requested mode for the feature.
virtual bool hasOnOff(int feature, bool *HasOnOff)=0
Check if the camera has the ability to turn on/off the requested feature.
virtual bool hasAuto(int feature, bool *hasAuto)=0
Check if the requested feature has the 'auto' mode.
virtual bool getMode(int feature, FeatureMode *mode)=0
Get the current mode for the feature.
virtual bool getCameraDescription(CameraDescriptor *camera)=0
Get a basic description of the camera hw.
virtual bool getActive(int feature, bool *isActive)=0
Get the current status of the feature, on or off.
virtual bool setActive(int feature, bool onoff)=0
Set the requested feature on or off.
virtual bool hasFeature(int feature, bool *hasFeature)=0
Check if camera has the requested feature (saturation, brightness ... )
virtual bool hasOnePush(int feature, bool *hasOnePush)=0
Check if the requested feature has the 'onePush' mode.
Interface for an object that can wrap/attach to to another.
virtual yarp::os::Stamp getLastInputStamp()=0
Return the time stamp relative to the last acquisition.
An interface for retrieving intrinsic parameter from a rgb camera.
virtual bool setRgbMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
virtual bool getRgbIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the rgb camera.
virtual bool setRgbResolution(int width, int height)=0
Set the resolution of the rgb image from the camera.
virtual bool getRgbMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
virtual bool getRgbFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the rgb camera.
virtual bool setRgbFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the rgb camera.
Interface for an object that can wrap/or "attach" to another.
A container for a device driver.
A class for storing options and configuration information.
void clear()
Remove all associations.
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.