YARP
Yet Another Robot Platform
IVisualParams.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_IVISUALPARAMS_H
10 #define YARP_DEV_IVISUALPARAMS_H
11 
12 #include <yarp/dev/api.h>
13 #include <yarp/os/Vocab.h>
14 #include <yarp/os/Property.h>
15 #include <yarp/sig/Image.h>
16 #include <yarp/sig/Vector.h>
17 
18 namespace yarp {
19  namespace dev {
20  class IRgbVisualParams;
21  class IDepthVisualParams;
22  struct CameraConfig;
23  }
24 }
34  int width;
35  int height;
36  double framerate;
38 
40 };
42 
43 // Interface name
46 
47 // Common
48 
49 // Rgb and depth
53 
54 // Methods
59 
60 // Depth only
63 
64 
65 
73 {
74 public:
75  virtual ~IRgbVisualParams(){}
76 
81  virtual int getRgbHeight() = 0;
82 
87  virtual int getRgbWidth() = 0;
88 
103  virtual bool getRgbResolution(int &width, int &height) {return false;}
110  virtual bool setRgbResolution(int width, int height) = 0;
111 
119  virtual bool getRgbFOV(double &horizontalFov, double &verticalFov) = 0;
120 
128  virtual bool setRgbFOV(double horizontalFov, double verticalFov) = 0;
129 
156  virtual bool getRgbIntrinsicParam(yarp::os::Property &intrinsic) = 0;
157 
164  virtual bool getRgbMirroring(bool &mirror) = 0;
165 
172  virtual bool setRgbMirroring(bool mirror) = 0;
173 };
174 
175 
183 {
184 public:
185 
191  virtual int getDepthHeight() = 0;
192 
197  virtual int getDepthWidth() = 0;
198 
205  virtual bool setDepthResolution(int width, int height) = 0;
206 
214  virtual bool getDepthFOV(double &horizontalFov, double &verticalFov) = 0;
215 
223  virtual bool setDepthFOV(double horizontalFov, double verticalFov) = 0;
224 
251  virtual bool getDepthIntrinsicParam(yarp::os::Property &intrinsic) = 0;
252 
257  virtual double getDepthAccuracy() = 0;
258 
264  virtual bool setDepthAccuracy(double accuracy) = 0;
265 
275  virtual bool getDepthClipPlanes(double &nearPlane, double &farPlane) = 0;
276 
286  virtual bool setDepthClipPlanes(double nearPlane, double farPlane) = 0;
287 
294  virtual bool getDepthMirroring(bool &mirror) = 0;
295 
302  virtual bool setDepthMirroring(bool mirror) = 0;
303 
304 
305 };
306 
307 #endif // YARP_DEV_IVISUALPARAMS_H
yarp::dev::IRgbVisualParams::getRgbFOV
virtual bool getRgbFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the rgb camera.
yarp::os::createVocab
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
yarp::dev::IDepthVisualParams::getDepthClipPlanes
virtual bool getDepthClipPlanes(double &nearPlane, double &farPlane)=0
Get the clipping planes of the sensor.
Vector.h
contains the definition of a Vector type
YARP_END_PACK
#define YARP_END_PACK
Ends 1 byte packing for structs/classes.
Definition: system.h:194
VOCAB_ACCURACY
constexpr yarp::conf::vocab32_t VOCAB_ACCURACY
Definition: IVisualParams.h:61
VOCAB_DEPTH_VISUAL_PARAMS
constexpr yarp::conf::vocab32_t VOCAB_DEPTH_VISUAL_PARAMS
Definition: IVisualParams.h:45
VOCAB_SUPPORTED_CONF
constexpr yarp::conf::vocab32_t VOCAB_SUPPORTED_CONF
Definition: IVisualParams.h:58
yarp::dev::IDepthVisualParams::getDepthMirroring
virtual bool getDepthMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
VOCAB_FOV
constexpr yarp::conf::vocab32_t VOCAB_FOV
Definition: IVisualParams.h:56
yarp::dev::IDepthVisualParams::getDepthFOV
virtual bool getDepthFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the depth camera.
YARP_BEGIN_PACK
#define YARP_BEGIN_PACK
Starts 1 byte packing for structs/classes.
Definition: system.h:193
VOCAB_INTRINSIC_PARAM
constexpr yarp::conf::vocab32_t VOCAB_INTRINSIC_PARAM
Definition: IVisualParams.h:57
yarp::dev::IRgbVisualParams::setRgbResolution
virtual bool setRgbResolution(int width, int height)=0
Set the resolution of the rgb image from the camera.
VOCAB_DEPTH
constexpr yarp::conf::vocab32_t VOCAB_DEPTH
Definition: IVisualParams.h:51
yarp::dev::IDepthVisualParams::setDepthClipPlanes
virtual bool setDepthClipPlanes(double nearPlane, double farPlane)=0
Set the clipping planes of the sensor.
yarp::dev::IRgbVisualParams::setRgbFOV
virtual bool setRgbFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the rgb camera.
yarp::dev::IRgbVisualParams::getRgbSupportedConfigurations
virtual bool getRgbSupportedConfigurations(yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations)
Get the possible configurations of the camera.
Definition: IVisualParams.h:95
VOCAB_CLIP_PLANES
constexpr yarp::conf::vocab32_t VOCAB_CLIP_PLANES
Definition: IVisualParams.h:62
yarp::dev::CameraConfig::height
int height
Definition: IVisualParams.h:35
yarp::sig::VectorOf< yarp::dev::CameraConfig >
yarp::dev::CameraConfig::width
int width
Definition: IVisualParams.h:34
yarp::dev::IDepthVisualParams::~IDepthVisualParams
virtual ~IDepthVisualParams()
Definition: IVisualParams.h:186
yarp::dev::IDepthVisualParams::getDepthHeight
virtual int getDepthHeight()=0
Return the height of each frame.
Property.h
yarp::dev::IDepthVisualParams::getDepthIntrinsicParam
virtual bool getDepthIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the depth camera.
yarp::dev::IRgbVisualParams::getRgbMirroring
virtual bool getRgbMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
yarp::dev::CameraConfig::framerate
double framerate
Definition: IVisualParams.h:36
yarp::dev::IDepthVisualParams::setDepthResolution
virtual bool setDepthResolution(int width, int height)=0
Set the resolution of the depth image from the camera.
VOCAB_RGB
constexpr yarp::conf::vocab32_t VOCAB_RGB
Definition: IVisualParams.h:50
yarp::dev::CameraConfig::CameraConfig
CameraConfig()
Definition: IVisualParams.h:39
VOCAB_PIXEL_INVALID
@ VOCAB_PIXEL_INVALID
Definition: Image.h:47
yarp::dev::IRgbVisualParams::getRgbIntrinsicParam
virtual bool getRgbIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the rgb camera.
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
VOCAB_MIRROR
constexpr yarp::conf::vocab32_t VOCAB_MIRROR
Definition: IVisualParams.h:52
Image.h
yarp::dev::IDepthVisualParams::setDepthFOV
virtual bool setDepthFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the depth camera.
yarp::dev::CameraConfig
Struct describing a possible camera configuration.
Definition: IVisualParams.h:33
VOCAB_RGB_VISUAL_PARAMS
constexpr yarp::conf::vocab32_t VOCAB_RGB_VISUAL_PARAMS
Definition: IVisualParams.h:44
yarp::dev::IRgbVisualParams::~IRgbVisualParams
virtual ~IRgbVisualParams()
Definition: IVisualParams.h:75
yarp::dev::IRgbVisualParams
An interface for retrieving intrinsic parameter from a rgb camera.
Definition: IVisualParams.h:73
yarp::dev::IDepthVisualParams::getDepthAccuracy
virtual double getDepthAccuracy()=0
Get the minimum detectable variation in distance [meter].
yarp::dev::IDepthVisualParams::setDepthMirroring
virtual bool setDepthMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::conf::vocab32_t
std::int32_t vocab32_t
Definition: numeric.h:52
Vocab.h
VOCAB_RESOLUTION
constexpr yarp::conf::vocab32_t VOCAB_RESOLUTION
Definition: IVisualParams.h:55
yarp::dev::IRgbVisualParams::setRgbMirroring
virtual bool setRgbMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
yarp::dev::CameraConfig::pixelCoding
YarpVocabPixelTypesEnum pixelCoding
Definition: IVisualParams.h:37
yarp::dev::IRgbVisualParams::getRgbResolution
virtual bool getRgbResolution(int &width, int &height)
Get the resolution of the rgb image from the camera.
Definition: IVisualParams.h:103
yarp::dev::IDepthVisualParams
An interface for retrieving intrinsic parameter from a depth camera.
Definition: IVisualParams.h:183
yarp::dev::IRgbVisualParams::getRgbWidth
virtual int getRgbWidth()=0
Return the width of each frame.
yarp::dev::IRgbVisualParams::getRgbHeight
virtual int getRgbHeight()=0
Return the height of each frame.
YarpVocabPixelTypesEnum
YarpVocabPixelTypesEnum
Definition: Image.h:46
api.h
yarp::dev::IDepthVisualParams::setDepthAccuracy
virtual bool setDepthAccuracy(double accuracy)=0
Set the minimum detectable variation in distance [meter] when possible.
yarp::os::Property
A class for storing options and configuration information.
Definition: Property.h:37
yarp::dev::IDepthVisualParams::getDepthWidth
virtual int getDepthWidth()=0
Return the height of each frame.