42 yCError(FRAMEGRABBERCROPPER) <<
"The device is not valid";
48 poly->
view(iFrameGrabberControls);
49 poly->
view(iFrameGrabberControlsDC1394);
50 poly->
view(iRgbVisualParams);
51 poly->
view(iPreciselyTimed);
54 yCError(FRAMEGRABBERCROPPER) <<
"The device does not implement the required interfaces";
65 iFrameGrabberControls =
nullptr;
66 iFrameGrabberControlsDC1394 =
nullptr;
67 iRgbVisualParams =
nullptr;
68 iPreciselyTimed =
nullptr;
74 if (device2attach.
size() != 1) {
75 yCError(FRAMEGRABBERCROPPER,
"Expected only one device to be attached");
79 return attach(device2attach[0]->poly);
100 return ReturnValue::return_code::return_value_error_not_ready;
108 return ReturnValue::return_code::return_value_error_not_ready;
116 horizontalFov = std::numeric_limits<double>::quiet_NaN();
117 verticalFov = std::numeric_limits<double>::quiet_NaN();
118 return ReturnValue::return_code::return_value_error_not_ready;
120 return iRgbVisualParams->
getRgbFOV(horizontalFov, verticalFov);
126 return ReturnValue::return_code::return_value_error_not_ready;
128 return iRgbVisualParams->
setRgbFOV(horizontalFov, verticalFov);
135 return ReturnValue::return_code::return_value_error_not_ready;
144 return ReturnValue::return_code::return_value_error_not_ready;
153 return ReturnValue::return_code::return_value_error_not_ready;
160 if (!iFrameGrabberControls) {
161 return ReturnValue::return_code::return_value_error_not_ready;
168 if (!iFrameGrabberControls) {
169 return ReturnValue::return_code::return_value_error_not_ready;
175{
if (!iFrameGrabberControls) {
176 return ReturnValue::return_code::return_value_error_not_ready;
183 if (!iFrameGrabberControls) {
184 return ReturnValue::return_code::return_value_error_not_ready;
191 if (!iFrameGrabberControls) {
192 return ReturnValue::return_code::return_value_error_not_ready;
199 if (!iFrameGrabberControls) {
200 return ReturnValue::return_code::return_value_error_not_ready;
207 if (!iFrameGrabberControls) {
208 return ReturnValue::return_code::return_value_error_not_ready;
215 if (!iFrameGrabberControls) {
216 return ReturnValue::return_code::return_value_error_not_ready;
223 if (!iFrameGrabberControls) {
224 return ReturnValue::return_code::return_value_error_not_ready;
231 if (!iFrameGrabberControls) {
232 return ReturnValue::return_code::return_value_error_not_ready;
239 if (!iFrameGrabberControls) {
240 return ReturnValue::return_code::return_value_error_not_ready;
247 if (!iFrameGrabberControls) {
248 return ReturnValue::return_code::return_value_error_not_ready;
255 if (!iFrameGrabberControls) {
256 return ReturnValue::return_code::return_value_error_not_ready;
263 if (!iFrameGrabberControls) {
264 return ReturnValue::return_code::return_value_error_not_ready;
271 if (!iFrameGrabberControls) {
272 return ReturnValue::return_code::return_value_error_not_ready;
279 if (!iFrameGrabberControlsDC1394) {
281 return ReturnValue::return_code::return_value_error_not_ready;
288 if (!iFrameGrabberControlsDC1394) {
290 return ReturnValue::return_code::return_value_error_not_ready;
297 if (!iFrameGrabberControlsDC1394) {
298 return ReturnValue::return_code::return_value_error_not_ready;
305 if (!iFrameGrabberControlsDC1394) {
307 return ReturnValue::return_code::return_value_error_not_ready;
314 if (!iFrameGrabberControlsDC1394) {
316 return ReturnValue::return_code::return_value_error_not_ready;
324 if (!iFrameGrabberControlsDC1394) {
325 return ReturnValue::return_code::return_value_error_not_ready;
332 if (!iFrameGrabberControlsDC1394) {
334 return ReturnValue::return_code::return_value_error_not_ready;
341 if (!iFrameGrabberControlsDC1394) {
342 return ReturnValue::return_code::return_value_error_not_ready;
349 if (!iFrameGrabberControlsDC1394) {
351 return ReturnValue::return_code::return_value_error_not_ready;
358 if (!iFrameGrabberControlsDC1394) {
360 return ReturnValue::return_code::return_value_error_not_ready;
367 if (!iFrameGrabberControlsDC1394) {
368 return ReturnValue::return_code::return_value_error_not_ready;
377 unsigned int& xoffstep,
378 unsigned int& yoffstep)
380 if (!iFrameGrabberControlsDC1394) {
381 return ReturnValue::return_code::return_value_error_not_ready;
388 if (!iFrameGrabberControlsDC1394) {
389 return ReturnValue::return_code::return_value_error_not_ready;
396 if (!iFrameGrabberControlsDC1394) {
397 return ReturnValue::return_code::return_value_error_not_ready;
404 if (!iFrameGrabberControlsDC1394) {
405 return ReturnValue::return_code::return_value_error_not_ready;
412 if (!iFrameGrabberControlsDC1394) {
413 return ReturnValue::return_code::return_value_error_not_ready;
420 if (!iFrameGrabberControlsDC1394) {
421 return ReturnValue::return_code::return_value_error_not_ready;
428 if (!iFrameGrabberControlsDC1394) {
429 return ReturnValue::return_code::return_value_error_not_ready;
436 if (!iFrameGrabberControlsDC1394) {
437 return ReturnValue::return_code::return_value_error_not_ready;
444 if (!iFrameGrabberControlsDC1394) {
445 return ReturnValue::return_code::return_value_error_not_ready;
452 if (!iFrameGrabberControlsDC1394) {
453 return ReturnValue::return_code::return_value_error_not_ready;
460 if (!iFrameGrabberControlsDC1394) {
461 return ReturnValue::return_code::return_value_error_not_ready;
468 if (!iFrameGrabberControlsDC1394) {
469 return ReturnValue::return_code::return_value_error_not_ready;
476 if (!iFrameGrabberControlsDC1394) {
477 return ReturnValue::return_code::return_value_error_not_ready;
484 if (!iFrameGrabberControlsDC1394) {
485 return ReturnValue::return_code::return_value_error_not_ready;
492 if (!iFrameGrabberControls) {
493 return ReturnValue::return_code::return_value_error_not_ready;
std::vector< yarp::dev::vertex_t > vertices
yarp::dev::IFrameGrabberOf< yarp::sig::ImageOf< yarp::sig::PixelRgb > > * iFrameGrabberOf
int width() const override
int height() const override
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
bool m_forwardRgbVisualParams
yarp::dev::ReturnValue setActive(yarp::dev::cameraFeature_id_t feature, bool onoff) override
Set the requested feature on or off.
yarp::dev::ReturnValue setColorCodingDC1394(int coding) override
yarp::dev::ReturnValue hasOnOff(yarp::dev::cameraFeature_id_t feature, bool &HasOnOff) override
Check if the camera has the ability to turn on/off the requested feature.
yarp::dev::ReturnValue getBytesPerPacketDC1394(unsigned int &bpp) override
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue setFeature(yarp::dev::cameraFeature_id_t feature, double value) override
Set the requested feature to a value (saturation, brightness ... )
yarp::dev::ReturnValue hasOnePush(yarp::dev::cameraFeature_id_t feature, bool &hasOnePush) override
Check if the requested feature has the 'onePush' mode.
yarp::dev::ReturnValue getTransmissionDC1394(bool &bTxON) override
yarp::dev::ReturnValue setPowerDC1394(bool onoff) override
yarp::dev::ReturnValue getCameraDescription(yarp::dev::CameraDescriptor &camera) override
Get a basic description of the camera hw.
yarp::dev::ReturnValue getColorCodingDC1394(unsigned int &val) override
yarp::dev::ReturnValue setISOSpeedDC1394(int speed) override
yarp::dev::ReturnValue getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0) override
yarp::dev::ReturnValue setDefaultsDC1394() override
yarp::dev::ReturnValue setFPSDC1394(int fps) override
yarp::dev::ReturnValue getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
yarp::dev::ReturnValue setMode(yarp::dev::cameraFeature_id_t feature, yarp::dev::FeatureMode mode) override
Set the requested mode for the feature.
yarp::dev::ReturnValue setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0) override
yarp::dev::ReturnValue setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
yarp::dev::ReturnValue setBytesPerPacketDC1394(unsigned int bpp) override
yarp::dev::ReturnValue getOperationModeDC1394(bool &b1394b) override
yarp::dev::ReturnValue setBroadcastDC1394(bool onoff) override
yarp::dev::ReturnValue getISOSpeedDC1394(unsigned int &val) override
yarp::dev::ReturnValue getVideoModeDC1394(unsigned int &val) override
yarp::dev::ReturnValue hasFeature(yarp::dev::cameraFeature_id_t feature, bool &hasFeature) override
Check if camera has the requested feature (saturation, brightness ... )
bool attachAll(const yarp::dev::PolyDriverList &device2attach) override
Attach to a list of objects.
yarp::dev::ReturnValue getVideoModeMaskDC1394(unsigned int &val) override
int getRgbWidth() override
Return the width of each frame.
bool detach() override
Detach the object (you must have first called attach).
yarp::dev::ReturnValue getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep) override
yarp::dev::ReturnValue getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
yarp::dev::ReturnValue setOnePush(yarp::dev::cameraFeature_id_t feature) override
Set the requested feature to a value (saturation, brightness ... )
yarp::dev::ReturnValue getMode(yarp::dev::cameraFeature_id_t feature, yarp::dev::FeatureMode &mode) override
Get the current mode for the feature.
yarp::dev::ReturnValue getRgbSupportedConfigurations(std::vector< yarp::dev::CameraConfig > &cfgs) override
Get the possible configurations of the camera.
yarp::dev::ReturnValue getFPSDC1394(unsigned int &val) override
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool detachAll() override
Detach the object (you must have first called attach).
yarp::dev::ReturnValue setCaptureDC1394(bool bON) override
yarp::dev::ReturnValue getColorCodingMaskDC1394(unsigned int video_mode, unsigned int &val) override
yarp::dev::ReturnValue getFPSMaskDC1394(unsigned int &val) override
yarp::dev::ReturnValue setVideoModeDC1394(int video_mode) override
yarp::dev::ReturnValue setOperationModeDC1394(bool b1394b) override
~FrameGrabberCropper() override
yarp::dev::ReturnValue getRgbIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
yarp::dev::ReturnValue getActive(yarp::dev::cameraFeature_id_t feature, bool &isActive) override
Get the current status of the feature, on or off.
yarp::dev::ReturnValue setResetDC1394() override
yarp::dev::ReturnValue getFeature(yarp::dev::cameraFeature_id_t feature, double &value) override
Get the current value for the requested feature.
int getRgbHeight() override
Return the height of each frame.
yarp::dev::ReturnValue hasManual(yarp::dev::cameraFeature_id_t feature, bool &hasManual) override
Check if the requested feature has the 'manual' mode.
yarp::dev::ReturnValue setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
yarp::dev::ReturnValue getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
yarp::dev::ReturnValue hasAuto(yarp::dev::cameraFeature_id_t feature, bool &hasAuto) override
Check if the requested feature has the 'auto' mode.
yarp::dev::ReturnValue setTransmissionDC1394(bool bTxON) override
bool attach(yarp::dev::PolyDriver *poly) override
Attach to another object.
yarp::dev::ReturnValue setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
bool view(T *&x)
Get an interface to the device driver.
virtual yarp::dev::ReturnValue getFPSMaskDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setBytesPerPacketDC1394(unsigned int bpp)=0
virtual yarp::dev::ReturnValue setColorCodingDC1394(int coding)=0
virtual yarp::dev::ReturnValue getBytesPerPacketDC1394(unsigned int &bpp)=0
virtual yarp::dev::ReturnValue setOperationModeDC1394(bool b1394b)=0
virtual yarp::dev::ReturnValue getFPSDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setTransmissionDC1394(bool bTxON)=0
virtual yarp::dev::ReturnValue setBroadcastDC1394(bool onoff)=0
virtual yarp::dev::ReturnValue getColorCodingDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setISOSpeedDC1394(int speed)=0
virtual yarp::dev::ReturnValue getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep)=0
virtual yarp::dev::ReturnValue getOperationModeDC1394(bool &b1394)=0
virtual yarp::dev::ReturnValue getISOSpeedDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setFPSDC1394(int fps)=0
virtual yarp::dev::ReturnValue setResetDC1394()=0
virtual yarp::dev::ReturnValue getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0)=0
virtual yarp::dev::ReturnValue setVideoModeDC1394(int video_mode)=0
virtual yarp::dev::ReturnValue setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0)=0
virtual yarp::dev::ReturnValue getColorCodingMaskDC1394(unsigned int video_mode, unsigned int &val)=0
virtual yarp::dev::ReturnValue setCaptureDC1394(bool bON)=0
virtual yarp::dev::ReturnValue setPowerDC1394(bool onoff)=0
virtual yarp::dev::ReturnValue getTransmissionDC1394(bool &bTxON)=0
virtual yarp::dev::ReturnValue getVideoModeMaskDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setDefaultsDC1394()=0
virtual yarp::dev::ReturnValue setFeature(cameraFeature_id_t feature, double value)=0
Set the requested feature to a value (saturation, brightness ... )
virtual yarp::dev::ReturnValue hasOnOff(cameraFeature_id_t feature, bool &HasOnOff)=0
Check if the camera has the ability to turn on/off the requested feature.
virtual yarp::dev::ReturnValue getMode(cameraFeature_id_t feature, FeatureMode &mode)=0
Get the current mode for the feature.
virtual yarp::dev::ReturnValue hasManual(cameraFeature_id_t feature, bool &hasManual)=0
Check if the requested feature has the 'manual' mode.
virtual yarp::dev::ReturnValue setOnePush(cameraFeature_id_t feature)=0
Set the requested feature to a value (saturation, brightness ... )
virtual yarp::dev::ReturnValue getCameraDescription(CameraDescriptor &camera)=0
Get a basic description of the camera hw.
virtual yarp::dev::ReturnValue hasOnePush(cameraFeature_id_t feature, bool &hasOnePush)=0
Check if the requested feature has the 'onePush' mode.
virtual yarp::dev::ReturnValue getActive(cameraFeature_id_t feature, bool &isActive)=0
Get the current status of the feature, on or off.
virtual yarp::dev::ReturnValue hasAuto(cameraFeature_id_t feature, bool &hasAuto)=0
Check if the requested feature has the 'auto' mode.
virtual yarp::dev::ReturnValue setActive(cameraFeature_id_t feature, bool onoff)=0
Set the requested feature on or off.
virtual yarp::dev::ReturnValue setMode(cameraFeature_id_t feature, FeatureMode mode)=0
Set the requested mode for the feature.
virtual yarp::dev::ReturnValue hasFeature(cameraFeature_id_t, bool &hasFeature)=0
Check if camera has the requested feature (saturation, brightness ... )
virtual yarp::dev::ReturnValue getFeature(cameraFeature_id_t feature, double &value)=0
Get the current value for the requested feature.
virtual yarp::dev::ReturnValue setRgbFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the rgb camera.
virtual yarp::dev::ReturnValue setRgbMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
virtual yarp::dev::ReturnValue getRgbIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the rgb camera.
virtual yarp::dev::ReturnValue getRgbFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the rgb camera.
virtual yarp::dev::ReturnValue getRgbSupportedConfigurations(std::vector< yarp::dev::CameraConfig > &configurations)=0
Get the possible configurations of the camera.
virtual yarp::dev::ReturnValue getRgbMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
virtual yarp::dev::ReturnValue setRgbResolution(int width, int height)=0
Set the resolution of the rgb image from the camera.
virtual yarp::dev::ReturnValue getRgbResolution(int &width, int &height)=0
Get the resolution of the rgb image from the camera.
A container for a device driver.
bool isValid() const
Check if device is valid.
A class for storing options and configuration information.
void clear()
Remove all associations.
A base class for nested structures that can be searched.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.