AI Watch A1
Multi-person 3D skeleton detection using Intel RealSense and OpenPose with Kafka support.
Room.hpp
Go to the documentation of this file.
1//
2// Room.hpp
3// AI_Watch_A1
4//
5// Created by Denny Caruso on 27/09/22.
6//
7
8// License: Apache 2.0. See LICENSE file in root directory.
9// Copyright(c) 2022. All Rights Reserved.
10
11#ifndef Room_hpp
12#define Room_hpp
13
14
15
16// CVPR Lab's Measurements Renato Esposito 06/22
17static const float minWidth = 0; // |x<---- |
18static const float maxWidth = 5.271; // | ---->x|
19static const float minHeight = 0.0;
20static const float maxHeight = 3.0;
21static const float maxDepth = 6.48;
22
23
24static const float minWidthRS = -3.5; // |x<---- |
25static const float maxWidthRS = 3.5; // | ---->x|
26static const float minHeightRS = -1.0;
27static const float maxHeightRS = 1.0;
28
29static const float xOriginUnity = -26.89;
30static const float zOriginUnity = -3.842;
31
32static const float distanceCameraFromBackWall = 0.45;
33static const float heightOffset = 0.15;
34
35
36
37// CVPR Lab's Measurements Denny Caruso 09/22
38//static const float minWidth = 0; // |x<---- |
39//static const float maxWidth = 6.03; // | ---->x|
40//static const float minHeight = 0.0;
41//static const float maxHeight = 2.89;
42//static const float maxDepth = 7.25;
43//
44//static const float minWidthRS = -3.5; // |x<---- |
45//static const float maxWidthRS = 3.5; // | ---->x|
48//static const float minHeightRS = -1.0;
49//static const float maxHeightRS = 1.0;
50//
51//static const float xOriginUnity = -26.89;
52//static const float zOriginUnity = -3.842;
53//
54//static const float distanceCameraFromBackWall = 0.45;
55//static const float heightOffset = 0.15;
56
57
58
64class Room {
65private:
69 float _minWidth;
73 float _maxWidth;
85 float _maxDepth;
86
103
104
113
123
124protected:
129 void setMinWidth (float minWidth);
134 void setMaxWidth (float maxWidth);
139 void setMinHeight (float minHeight);
144 void setMaxHeight (float maxHeight);
149 void setMaxDepth (float maxHeight);
150
155 void setMinWidthRS (float minWidthRS);
160 void setMaxWidthRS (float maxWidthRS);
165 void setMinHeightRS (float minHeightRS);
170 void setMaxHeightRS (float maxHeightRS);
171
176 void setXOriginUnity (float xOriginUnity);
181 void setZOriginUnity (float zOriginUnity);
182
193 void setHeightOffset (float heightOffset);
194
195public:
212 Room (float minWidth, float maxWidth, float minHeight, float maxHeight, float maxDepth,
213 float minWidthRS, float maxWidthRS, float minHeightRS, float maxHeightRS,
214 float xOriginUnity, float zOriginUnity,
216
221 float getMinWidth (void);
226 float getMaxWidth (void);
231 float getMinHeight (void);
236 float getMaxHeight (void);
241 float getMaxDepth (void);
242
247 float getMinWidthRS (void);
252 float getMaxWidthRS (void);
257 float getMinHeightRS (void);
262 float getMaxHeightRS (void);
263
268 float getXOriginUnity (void);
273 float getZOriginUnity (void);
274
284 float getHeightOffset (void);
285};
286
287#endif /* Room_hpp */
static const float distanceCameraFromBackWall
Definition: Room.hpp:32
static const float maxWidthRS
Definition: Room.hpp:25
static const float zOriginUnity
Definition: Room.hpp:30
static const float xOriginUnity
Definition: Room.hpp:29
static const float minWidth
Definition: Room.hpp:17
static const float minWidthRS
Definition: Room.hpp:24
static const float minHeightRS
Definition: Room.hpp:26
static const float minHeight
Definition: Room.hpp:19
static const float heightOffset
Definition: Room.hpp:33
static const float maxWidth
Definition: Room.hpp:18
static const float maxHeight
Definition: Room.hpp:20
static const float maxHeightRS
Definition: Room.hpp:27
static const float maxDepth
Definition: Room.hpp:21
Room class represents the Room abstraction. A Room object has different specifications,...
Definition: Room.hpp:64
float _minWidthRS
RealSense environment's minimum width.
Definition: Room.hpp:90
float getMaxWidthRS(void)
Get the RealSense environment's maximum width.
Definition: Room.cpp:109
float getMinHeight(void)
Get the Room's minimum height.
Definition: Room.cpp:93
float getMinHeightRS(void)
Get the RealSense environment's minimum height.
Definition: Room.cpp:113
float getMaxHeightRS(void)
Get the RealSense environment's maximum height.
Definition: Room.cpp:117
void setMaxWidth(float maxWidth)
Set the Room's maximum width.
Definition: Room.cpp:17
float _heightOffset
Specific offset that is experimentally considered optimal in order to get more accurate height's meas...
Definition: Room.hpp:122
float _minHeight
Room's minimum height.
Definition: Room.hpp:77
void setMaxHeight(float maxHeight)
Set the Room's maximum height.
Definition: Room.cpp:25
float getMinWidth(void)
Get the Room's minimum width.
Definition: Room.cpp:85
float _distanceCameraFromBackWall
Distance between the camera lens and the wall back to the camera.
Definition: Room.hpp:117
void setMaxWidthRS(float maxWidthRS)
Set the RealSense environment's maximum width.
Definition: Room.cpp:37
void setMinWidth(float minWidth)
Set the Room's minimum width.
Definition: Room.cpp:13
float getDistanceCameraFromBackWall(void)
Get the distance between the camera lens and the wall back to the camera.
Definition: Room.cpp:129
float getMaxDepth(void)
Get the Room's maximum depth.
Definition: Room.cpp:101
void setMinHeightRS(float minHeightRS)
Set the RealSense environment's minimum height.
Definition: Room.cpp:41
float _minWidth
Room's minimum width.
Definition: Room.hpp:69
void setMaxHeightRS(float maxHeightRS)
Set the RealSense environment's maximum height.
Definition: Room.cpp:45
float _maxHeightRS
RealSense environment's maximum height.
Definition: Room.hpp:102
void setHeightOffset(float heightOffset)
Set the height offset.
Definition: Room.cpp:61
void setMaxDepth(float maxHeight)
Set the Room's maximum depth.
Definition: Room.cpp:29
void setMinWidthRS(float minWidthRS)
Set the RealSense environment's minimum width.
Definition: Room.cpp:33
float getHeightOffset(void)
Get the height offset.
Definition: Room.cpp:133
float _maxWidthRS
RealSense environment's maximum width.
Definition: Room.hpp:94
float _maxHeight
Room's maximum height.
Definition: Room.hpp:81
float _maxDepth
Room's maximum depth.
Definition: Room.hpp:85
float getXOriginUnity(void)
Get the Ddgital twin's x axis' origin.
Definition: Room.cpp:121
void setDistanceCameraFromBackWall(float distanceCameraFromBackWall)
Set the distance between the camera lens and the wall back to the camera.
Definition: Room.cpp:57
void setXOriginUnity(float xOriginUnity)
Set the digital twin's x axis' origin.
Definition: Room.cpp:49
float _zOriginUnity
Digital twin's z axis' origin.
Definition: Room.hpp:112
float _maxWidth
Room's maximum width.
Definition: Room.hpp:73
void setZOriginUnity(float zOriginUnity)
Set the digital twin's z axis' origin.
Definition: Room.cpp:53
float getMaxHeight(void)
Get the Room's maximum height.
Definition: Room.cpp:97
Room(float minWidth, float maxWidth, float minHeight, float maxHeight, float maxDepth, float minWidthRS, float maxWidthRS, float minHeightRS, float maxHeightRS, float xOriginUnity, float zOriginUnity, float distanceCameraFromBackWall, float heightOffset)
Construct a new Room object.
Definition: Room.cpp:67
float getZOriginUnity(void)
Get the digital twin's z axis' origin.
Definition: Room.cpp:125
float getMaxWidth(void)
Get the Room's maximum width.
Definition: Room.cpp:89
float _minHeightRS
RealSense environment's minimum height.
Definition: Room.hpp:98
float _xOriginUnity
Digital twin's x axis' origin.
Definition: Room.hpp:108
float getMinWidthRS(void)
Get the RealSense environment's minimum width.
Definition: Room.cpp:105
void setMinHeight(float minHeight)
Set the Room's minimum height.
Definition: Room.cpp:21