YARP
Yet Another Robot Platform
IVisualParamsImpl.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_IVISUALPARAMSIMPL_H
10 #define YARP_DEV_IVISUALPARAMSIMPL_H
11 
12 #include <yarp/dev/api.h>
13 #include <yarp/os/Port.h>
14 #include <yarp/os/Bottle.h>
15 #include <yarp/dev/DeviceDriver.h>
16 #include <yarp/dev/IVisualParams.h>
17 
18 // use namespace impl??
19 namespace yarp {
20  namespace dev {
21  class Implement_RgbVisualParams_Parser;
22  class Implement_RgbVisualParams_Sender;
23  class Implement_DepthVisualParams_Parser;
24  class Implement_DepthVisualParams_Sender;
25  }
26 }
27 
28 //
29 // RGB helpers
30 //
32 {
33 protected:
35 
36 public:
39 
40  int getRgbHeight() override;
41  int getRgbWidth() override;
43  bool getRgbResolution(int &width, int &height) override;
44  bool setRgbResolution(int width, int height) override;
45  bool getRgbFOV(double &horizontalFov, double &verticalFov) override;
46  bool setRgbFOV(double horizontalFov, double verticalFov) override;
47  bool getRgbIntrinsicParam(yarp::os::Property &intrinsic) override;
48  bool getRgbMirroring(bool &mirror) override;
49  bool setRgbMirroring(bool mirror) override;
50 };
51 
52 
54 {
55 private:
56  IRgbVisualParams *iRgbVisual;
57 
58 public:
61 
62  bool configure(IRgbVisualParams *interface);
63  bool respond(const yarp::os::Bottle& cmd, yarp::os::Bottle& response) override;
64 };
65 
66 
67 //
68 // Depth helpers
69 //
71 {
72 private:
74 
75 public:
78 
79  int getDepthHeight() override;
80  int getDepthWidth() override;
81  bool setDepthResolution(int width, int height) override;
82  bool getDepthFOV(double &horizontalFov, double &verticalFov) override;
83  bool setDepthFOV(double horizontalFov, double verticalFov) override;
84  double getDepthAccuracy() override;
85  bool setDepthAccuracy(double accuracy) override;
86  bool getDepthClipPlanes(double &nearPlane, double &farPlane) override;
87  bool setDepthClipPlanes(double nearPlane, double farPlane) override;
88  bool getDepthIntrinsicParam(yarp::os::Property &intrinsic) override;
89  bool getDepthMirroring(bool &mirror) override;
90  bool setDepthMirroring(bool mirror) override;
91 };
92 
93 
95 {
96 private:
97  IDepthVisualParams *iDepthVisual;
98 
99 public:
102 
103  bool configure(IDepthVisualParams *interface);
104  bool respond(const yarp::os::Bottle& cmd, yarp::os::Bottle& response) override;
105 };
106 
107 #endif // YARP_DEV_IVISUALPARAMSIMPL_H
A cheap and cheerful framework for human readable/writable forms of messages to devices.
Definition: DeviceDriver.h:134
An interface for retrieving intrinsic parameter from a depth camera.
An interface for retrieving intrinsic parameter from a rgb camera.
Definition: IVisualParams.h:73
bool getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
bool getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
bool getRgbSupportedConfigurations(yarp::sig::VectorOf< CameraConfig > &configurations) override
Get the possible configurations of the camera.
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 setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
bool setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
int getRgbHeight() override
Return the height of each frame.
bool getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
bool setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
A mini-server for network communication.
Definition: Port.h:50
A class for storing options and configuration information.
Definition: Property.h:37
Provides:
Definition: Vector.h:122
The main, catch-all namespace for YARP.
Definition: environment.h:18
constexpr char accuracy[]
#define YARP_dev_API
Definition: api.h:19