YARP
Yet Another Robot Platform
IVisualParamsImpl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2019 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;
42  bool getRgbSupportedConfigurations(yarp::sig::VectorOf<CameraConfig> &configurations) 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:
73  yarp::os::Port & _port;
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
#define YARP_dev_API
Definition: api.h:19
A class for storing options and configuration information.
Definition: Property.h:34
A mini-server for network communication.
Definition: Port.h:49
Provides:
Definition: Vector.h:32
constexpr char accuracy[]
The main, catch-all namespace for YARP.
Definition: numeric.h:47
An interface for retrieving intrinsic parameter from a rgb camera.
Definition: IVisualParams.h:72
A cheap and cheerful framework for human readable/writable forms of messages to devices.
Definition: DeviceDriver.h:132
A simple collection of objects that can be described and transmitted in a portable way...
Definition: Bottle.h:72
An interface for retrieving intrinsic parameter from a depth camera.