6#ifndef YARP_FRAMEGRABBERCROPPER_FRAMEGRABBERCROPPER_H
7#define YARP_FRAMEGRABBERCROPPER_FRAMEGRABBERCROPPER_H
21template <
typename ImageType>
92 bool close()
override;
107 if (!iFrameGrabberControls) {
115 if (!iFrameGrabberControls) {
122 {
if (!iFrameGrabberControls) {
125 return iFrameGrabberControls->
setFeature(feature, value);
130 if (!iFrameGrabberControls) {
133 return iFrameGrabberControls->
getFeature(feature, value);
136 bool setFeature(
int feature,
double value1,
double value2)
override
138 if (!iFrameGrabberControls) {
141 return iFrameGrabberControls->
setFeature(feature, value1, value2);
144 bool getFeature(
int feature,
double* value1,
double* value2)
override
146 if (!iFrameGrabberControls) {
149 return iFrameGrabberControls->
getFeature(feature, value1, value2);
152 bool hasOnOff(
int feature,
bool* HasOnOff)
override
154 if (!iFrameGrabberControls) {
157 return iFrameGrabberControls->
hasOnOff(feature, HasOnOff);
162 if (!iFrameGrabberControls) {
165 return iFrameGrabberControls->
setActive(feature, onoff);
170 if (!iFrameGrabberControls) {
173 return iFrameGrabberControls->
getActive(feature, isActive);
178 if (!iFrameGrabberControls) {
186 if (!iFrameGrabberControls) {
194 if (!iFrameGrabberControls) {
202 if (!iFrameGrabberControls) {
205 return iFrameGrabberControls->
setMode(feature, mode);
210 if (!iFrameGrabberControls) {
213 return iFrameGrabberControls->
getMode(feature, mode);
218 if (!iFrameGrabberControls) {
221 return iFrameGrabberControls->
setOnePush(feature);
228 if (!iFrameGrabberControlsDC1394) {
236 if (!iFrameGrabberControlsDC1394) {
244 if (!iFrameGrabberControlsDC1394) {
252 if (!iFrameGrabberControlsDC1394) {
261 if (!iFrameGrabberControlsDC1394) {
270 if (!iFrameGrabberControlsDC1394) {
278 if (!iFrameGrabberControlsDC1394) {
287 if (!iFrameGrabberControlsDC1394) {
295 if (!iFrameGrabberControlsDC1394) {
303 if (!iFrameGrabberControlsDC1394) {
311 if (!iFrameGrabberControlsDC1394) {
321 unsigned int& xoffstep,
322 unsigned int& yoffstep)
override
324 if (!iFrameGrabberControlsDC1394) {
332 if (!iFrameGrabberControlsDC1394) {
340 if (!iFrameGrabberControlsDC1394) {
348 if (!iFrameGrabberControlsDC1394) {
356 if (!iFrameGrabberControlsDC1394) {
364 if (!iFrameGrabberControlsDC1394) {
372 if (!iFrameGrabberControlsDC1394) {
380 if (!iFrameGrabberControlsDC1394) {
388 if (!iFrameGrabberControlsDC1394) {
396 if (!iFrameGrabberControlsDC1394) {
404 if (!iFrameGrabberControlsDC1394) {
412 if (!iFrameGrabberControlsDC1394) {
420 if (!iFrameGrabberControlsDC1394) {
428 if (!iFrameGrabberControlsDC1394) {
454 bool getRgbFOV(
double& horizontalFov,
double& verticalFov)
override
457 horizontalFov = std::numeric_limits<double>::quiet_NaN();
458 verticalFov = std::numeric_limits<double>::quiet_NaN();
461 return iRgbVisualParams->
getRgbFOV(horizontalFov, verticalFov);
464 bool setRgbFOV(
double horizontalFov,
double verticalFov)
override
469 return iRgbVisualParams->
setRgbFOV(horizontalFov, verticalFov);
503 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.
This class is the parameters parser for class FrameGrabberCropper.
bool m_forwardRgbVisualParams
FrameGrabberCropper: An image frame grabber device which can also crop the frame.
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.
Control interface for frame grabber devices that conform to the 1394-based Digital Camera Specificati...
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.
Read a YARP-format image (of a specific type) from a device.
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.