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);
134 return ReturnValue::return_code::return_value_error_not_ready;
143 return ReturnValue::return_code::return_value_error_not_ready;
152 return ReturnValue::return_code::return_value_error_not_ready;
159 if (!iFrameGrabberControls) {
160 return ReturnValue::return_code::return_value_error_not_ready;
167 if (!iFrameGrabberControls) {
168 return ReturnValue::return_code::return_value_error_not_ready;
174{
if (!iFrameGrabberControls) {
175 return ReturnValue::return_code::return_value_error_not_ready;
182 if (!iFrameGrabberControls) {
183 return ReturnValue::return_code::return_value_error_not_ready;
190 if (!iFrameGrabberControls) {
191 return ReturnValue::return_code::return_value_error_not_ready;
198 if (!iFrameGrabberControls) {
199 return ReturnValue::return_code::return_value_error_not_ready;
206 if (!iFrameGrabberControls) {
207 return ReturnValue::return_code::return_value_error_not_ready;
214 if (!iFrameGrabberControls) {
215 return ReturnValue::return_code::return_value_error_not_ready;
222 if (!iFrameGrabberControls) {
223 return ReturnValue::return_code::return_value_error_not_ready;
230 if (!iFrameGrabberControls) {
231 return ReturnValue::return_code::return_value_error_not_ready;
238 if (!iFrameGrabberControls) {
239 return ReturnValue::return_code::return_value_error_not_ready;
246 if (!iFrameGrabberControls) {
247 return ReturnValue::return_code::return_value_error_not_ready;
254 if (!iFrameGrabberControls) {
255 return ReturnValue::return_code::return_value_error_not_ready;
262 if (!iFrameGrabberControls) {
263 return ReturnValue::return_code::return_value_error_not_ready;
270 if (!iFrameGrabberControls) {
271 return ReturnValue::return_code::return_value_error_not_ready;
278 if (!iFrameGrabberControlsDC1394) {
280 return ReturnValue::return_code::return_value_error_not_ready;
287 if (!iFrameGrabberControlsDC1394) {
289 return ReturnValue::return_code::return_value_error_not_ready;
296 if (!iFrameGrabberControlsDC1394) {
297 return ReturnValue::return_code::return_value_error_not_ready;
304 if (!iFrameGrabberControlsDC1394) {
306 return ReturnValue::return_code::return_value_error_not_ready;
313 if (!iFrameGrabberControlsDC1394) {
315 return ReturnValue::return_code::return_value_error_not_ready;
323 if (!iFrameGrabberControlsDC1394) {
324 return ReturnValue::return_code::return_value_error_not_ready;
331 if (!iFrameGrabberControlsDC1394) {
333 return ReturnValue::return_code::return_value_error_not_ready;
340 if (!iFrameGrabberControlsDC1394) {
341 return ReturnValue::return_code::return_value_error_not_ready;
348 if (!iFrameGrabberControlsDC1394) {
350 return ReturnValue::return_code::return_value_error_not_ready;
357 if (!iFrameGrabberControlsDC1394) {
359 return ReturnValue::return_code::return_value_error_not_ready;
366 if (!iFrameGrabberControlsDC1394) {
367 return ReturnValue::return_code::return_value_error_not_ready;
376 unsigned int& xoffstep,
377 unsigned int& yoffstep)
379 if (!iFrameGrabberControlsDC1394) {
380 return ReturnValue::return_code::return_value_error_not_ready;
387 if (!iFrameGrabberControlsDC1394) {
388 return ReturnValue::return_code::return_value_error_not_ready;
395 if (!iFrameGrabberControlsDC1394) {
396 return ReturnValue::return_code::return_value_error_not_ready;
403 if (!iFrameGrabberControlsDC1394) {
404 return ReturnValue::return_code::return_value_error_not_ready;
411 if (!iFrameGrabberControlsDC1394) {
412 return ReturnValue::return_code::return_value_error_not_ready;
419 if (!iFrameGrabberControlsDC1394) {
420 return ReturnValue::return_code::return_value_error_not_ready;
427 if (!iFrameGrabberControlsDC1394) {
428 return ReturnValue::return_code::return_value_error_not_ready;
435 if (!iFrameGrabberControlsDC1394) {
436 return ReturnValue::return_code::return_value_error_not_ready;
443 if (!iFrameGrabberControlsDC1394) {
444 return ReturnValue::return_code::return_value_error_not_ready;
451 if (!iFrameGrabberControlsDC1394) {
452 return ReturnValue::return_code::return_value_error_not_ready;
459 if (!iFrameGrabberControlsDC1394) {
460 return ReturnValue::return_code::return_value_error_not_ready;
467 if (!iFrameGrabberControlsDC1394) {
468 return ReturnValue::return_code::return_value_error_not_ready;
475 if (!iFrameGrabberControlsDC1394) {
476 return ReturnValue::return_code::return_value_error_not_ready;
483 if (!iFrameGrabberControlsDC1394) {
484 return ReturnValue::return_code::return_value_error_not_ready;
491 if (!iFrameGrabberControls) {
492 return ReturnValue::return_code::return_value_error_not_ready;
yarp::dev::IFrameGrabberOf< yarp::sig::ImageOf< yarp::sig::PixelRgb > > * iFrameGrabberOf
int width() const override
int height() const override
std::vector< yarp::dev::VertexData > vertices
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 getRgbIntrinsicParam(yarp::sig::IntrinsicParams &intrinsic) override
Get the intrinsic parameters of the rgb camera.
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 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 getRgbFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the rgb camera.
virtual yarp::dev::ReturnValue getRgbIntrinsicParam(yarp::sig::IntrinsicParams &intrinsic)=0
Get the intrinsic parameters of the rgb camera.
virtual yarp::dev::ReturnValue getRgbMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
virtual yarp::dev::ReturnValue getRgbSupportedConfigurations(std::vector< yarp::dev::CameraConfigData > &configurations)=0
Get the possible configurations of the camera.
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 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.
The IntrinsicParams struct to handle the intrinsic parameter of cameras(RGB and RGBD either).