AI Watch A1
Multi-person 3D skeleton detection using Intel RealSense and OpenPose with Kafka support.
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Room Class Reference

Room class represents the Room abstraction. A Room object has different specifications, such as width and height. Furthermore, since we are interested in the conversion from real-world coordinates to Unity coordinates, it's important to have some more informations, such as the axes' origins of the digital twin room and the camera's coordinates' interval value. More...

#include <Room.hpp>

Inheritance diagram for Room:
CVPR_Lab

Public Member Functions

 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. More...
 
float getMinWidth (void)
 Get the Room's minimum width. More...
 
float getMaxWidth (void)
 Get the Room's maximum width. More...
 
float getMinHeight (void)
 Get the Room's minimum height. More...
 
float getMaxHeight (void)
 Get the Room's maximum height. More...
 
float getMaxDepth (void)
 Get the Room's maximum depth. More...
 
float getMinWidthRS (void)
 Get the RealSense environment's minimum width. More...
 
float getMaxWidthRS (void)
 Get the RealSense environment's maximum width. More...
 
float getMinHeightRS (void)
 Get the RealSense environment's minimum height. More...
 
float getMaxHeightRS (void)
 Get the RealSense environment's maximum height. More...
 
float getXOriginUnity (void)
 Get the Ddgital twin's x axis' origin. More...
 
float getZOriginUnity (void)
 Get the digital twin's z axis' origin. More...
 
float getDistanceCameraFromBackWall (void)
 Get the distance between the camera lens and the wall back to the camera. More...
 
float getHeightOffset (void)
 Get the height offset. More...
 

Protected Member Functions

void setMinWidth (float minWidth)
 Set the Room's minimum width. More...
 
void setMaxWidth (float maxWidth)
 Set the Room's maximum width. More...
 
void setMinHeight (float minHeight)
 Set the Room's minimum height. More...
 
void setMaxHeight (float maxHeight)
 Set the Room's maximum height. More...
 
void setMaxDepth (float maxHeight)
 Set the Room's maximum depth. More...
 
void setMinWidthRS (float minWidthRS)
 Set the RealSense environment's minimum width. More...
 
void setMaxWidthRS (float maxWidthRS)
 Set the RealSense environment's maximum width. More...
 
void setMinHeightRS (float minHeightRS)
 Set the RealSense environment's minimum height. More...
 
void setMaxHeightRS (float maxHeightRS)
 Set the RealSense environment's maximum height. More...
 
void setXOriginUnity (float xOriginUnity)
 Set the digital twin's x axis' origin. More...
 
void setZOriginUnity (float zOriginUnity)
 Set the digital twin's z axis' origin. More...
 
void setDistanceCameraFromBackWall (float distanceCameraFromBackWall)
 Set the distance between the camera lens and the wall back to the camera. More...
 
void setHeightOffset (float heightOffset)
 Set the height offset. More...
 

Private Attributes

float _minWidth
 Room's minimum width. More...
 
float _maxWidth
 Room's maximum width. More...
 
float _minHeight
 Room's minimum height. More...
 
float _maxHeight
 Room's maximum height. More...
 
float _maxDepth
 Room's maximum depth. More...
 
float _minWidthRS
 RealSense environment's minimum width. More...
 
float _maxWidthRS
 RealSense environment's maximum width. More...
 
float _minHeightRS
 RealSense environment's minimum height. More...
 
float _maxHeightRS
 RealSense environment's maximum height. More...
 
float _xOriginUnity
 Digital twin's x axis' origin. More...
 
float _zOriginUnity
 Digital twin's z axis' origin. More...
 
float _distanceCameraFromBackWall
 Distance between the camera lens and the wall back to the camera. More...
 
float _heightOffset
 Specific offset that is experimentally considered optimal in order to get more accurate height's measurements. More...
 

Detailed Description

Room class represents the Room abstraction. A Room object has different specifications, such as width and height. Furthermore, since we are interested in the conversion from real-world coordinates to Unity coordinates, it's important to have some more informations, such as the axes' origins of the digital twin room and the camera's coordinates' interval value.

Definition at line 64 of file Room.hpp.

Constructor & Destructor Documentation

◆ Room()

Room::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.

Parameters
minWidthRoom's minimum width.
maxWidthRoom's maximum width.
minHeightRoom's minimum height.
maxHeightRoom's maximum height.
minWidthRSRealSense environment's minimum width.
maxWidthRSRealSense environment's maximum width.
minHeightRSRealSense environment's minimum height.
maxHeightRSRealSense environment's maximum height.
xOriginUnityDigital twin's x axis' origin.
zOriginUnityDigital twin's z axis' origin.
distanceCameraFromBackWallDistance between the camera lens and the wall back to the camera.
heightOffsetSpecific offset that is experimentally considered optimal in order to get more accurate height's measurements.

Definition at line 67 of file Room.cpp.

69 {
83}
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
void setMaxWidth(float maxWidth)
Set the Room's maximum width.
Definition: Room.cpp:17
void setMaxHeight(float maxHeight)
Set the Room's maximum height.
Definition: Room.cpp:25
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
void setMinHeightRS(float minHeightRS)
Set the RealSense environment's minimum height.
Definition: Room.cpp:41
void setMaxHeightRS(float maxHeightRS)
Set the RealSense environment's maximum height.
Definition: Room.cpp:45
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
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
void setZOriginUnity(float zOriginUnity)
Set the digital twin's z axis' origin.
Definition: Room.cpp:53
void setMinHeight(float minHeight)
Set the Room's minimum height.
Definition: Room.cpp:21

References distanceCameraFromBackWall, heightOffset, maxDepth, maxHeight, maxHeightRS, maxWidth, maxWidthRS, minHeight, minHeightRS, minWidthRS, setDistanceCameraFromBackWall(), setHeightOffset(), setMaxDepth(), setMaxHeight(), setMaxHeightRS(), setMaxWidth(), setMaxWidthRS(), setMinHeight(), setMinHeightRS(), setMinWidth(), setMinWidthRS(), setXOriginUnity(), setZOriginUnity(), xOriginUnity, and zOriginUnity.

Member Function Documentation

◆ getDistanceCameraFromBackWall()

float Room::getDistanceCameraFromBackWall ( void  )

Get the distance between the camera lens and the wall back to the camera.

Returns
float

Definition at line 129 of file Room.cpp.

129 {
130 return this->_distanceCameraFromBackWall;
131}
float _distanceCameraFromBackWall
Distance between the camera lens and the wall back to the camera.
Definition: Room.hpp:117

References _distanceCameraFromBackWall.

◆ getHeightOffset()

float Room::getHeightOffset ( void  )

Get the height offset.

Returns
float

Definition at line 133 of file Room.cpp.

133 {
134 return this->_heightOffset;
135}
float _heightOffset
Specific offset that is experimentally considered optimal in order to get more accurate height's meas...
Definition: Room.hpp:122

References _heightOffset.

Referenced by CoordinateMappingManager::transformHeightCoordinate().

◆ getMaxDepth()

float Room::getMaxDepth ( void  )

Get the Room's maximum depth.

Returns
float

Definition at line 101 of file Room.cpp.

101 {
102 return this->_maxDepth;
103}
float _maxDepth
Room's maximum depth.
Definition: Room.hpp:85

References _maxDepth.

◆ getMaxHeight()

float Room::getMaxHeight ( void  )

Get the Room's maximum height.

Returns
float

Definition at line 97 of file Room.cpp.

97 {
98 return this->_maxHeight;
99}
float _maxHeight
Room's maximum height.
Definition: Room.hpp:81

References _maxHeight.

Referenced by CoordinateMappingManager::transformHeightCoordinate().

◆ getMaxHeightRS()

float Room::getMaxHeightRS ( void  )

Get the RealSense environment's maximum height.

Returns
float

Definition at line 117 of file Room.cpp.

117 {
118 return this->_maxHeightRS;
119}
float _maxHeightRS
RealSense environment's maximum height.
Definition: Room.hpp:102

References _maxHeightRS.

Referenced by CoordinateMappingManager::transformHeightCoordinate().

◆ getMaxWidth()

float Room::getMaxWidth ( void  )

Get the Room's maximum width.

Returns
float

Definition at line 89 of file Room.cpp.

89 {
90 return this->_maxWidth;
91}
float _maxWidth
Room's maximum width.
Definition: Room.hpp:73

References _maxWidth.

◆ getMaxWidthRS()

float Room::getMaxWidthRS ( void  )

Get the RealSense environment's maximum width.

Returns
float

Definition at line 109 of file Room.cpp.

109 {
110 return this->_maxWidthRS;
111}
float _maxWidthRS
RealSense environment's maximum width.
Definition: Room.hpp:94

References _maxWidthRS.

◆ getMinHeight()

float Room::getMinHeight ( void  )

Get the Room's minimum height.

Returns
float

Definition at line 93 of file Room.cpp.

93 {
94 return this->_minHeight;
95}
float _minHeight
Room's minimum height.
Definition: Room.hpp:77

References _minHeight.

◆ getMinHeightRS()

float Room::getMinHeightRS ( void  )

Get the RealSense environment's minimum height.

Returns
float

Definition at line 113 of file Room.cpp.

113 {
114 return this->_minHeightRS;
115}
float _minHeightRS
RealSense environment's minimum height.
Definition: Room.hpp:98

References _minHeightRS.

◆ getMinWidth()

float Room::getMinWidth ( void  )

Get the Room's minimum width.

Returns
float

Definition at line 85 of file Room.cpp.

85 {
86 return this->_minWidth;
87}
float _minWidth
Room's minimum width.
Definition: Room.hpp:69

References _minWidth.

Referenced by CoordinateMappingManager::transformWidthCoordinate().

◆ getMinWidthRS()

float Room::getMinWidthRS ( void  )

Get the RealSense environment's minimum width.

Returns
float

Definition at line 105 of file Room.cpp.

105 {
106 return this->_minWidthRS;
107}
float _minWidthRS
RealSense environment's minimum width.
Definition: Room.hpp:90

References _minWidthRS.

◆ getXOriginUnity()

float Room::getXOriginUnity ( void  )

Get the Ddgital twin's x axis' origin.

Returns
float

Definition at line 121 of file Room.cpp.

121 {
122 return this->_xOriginUnity;
123}
float _xOriginUnity
Digital twin's x axis' origin.
Definition: Room.hpp:108

References _xOriginUnity.

◆ getZOriginUnity()

float Room::getZOriginUnity ( void  )

Get the digital twin's z axis' origin.

Returns
float

Definition at line 125 of file Room.cpp.

125 {
126 return this->_zOriginUnity;
127}
float _zOriginUnity
Digital twin's z axis' origin.
Definition: Room.hpp:112

References _zOriginUnity.

◆ setDistanceCameraFromBackWall()

void Room::setDistanceCameraFromBackWall ( float  distanceCameraFromBackWall)
protected

Set the distance between the camera lens and the wall back to the camera.

Parameters
distanceCameraFromBackWallDistance between the camera lens and the wall back to the camera.

Definition at line 57 of file Room.cpp.

References _distanceCameraFromBackWall, and distanceCameraFromBackWall.

Referenced by Room().

◆ setHeightOffset()

void Room::setHeightOffset ( float  heightOffset)
protected

Set the height offset.

Parameters
heightOffsetSpecific offset that is experimentally considered optimal in order to get more accurate height's measurements.

Definition at line 61 of file Room.cpp.

61 {
63}

References _heightOffset, and heightOffset.

Referenced by Room().

◆ setMaxDepth()

void Room::setMaxDepth ( float  maxHeight)
protected

Set the Room's maximum depth.

Parameters
maxHeightRoom's maximum depth.

Definition at line 29 of file Room.cpp.

29 {
30 this->_maxDepth = maxDepth;
31}

References _maxDepth, and maxDepth.

Referenced by Room().

◆ setMaxHeight()

void Room::setMaxHeight ( float  maxHeight)
protected

Set the Room's maximum height.

Parameters
maxHeightRoom's maximum height.

Definition at line 25 of file Room.cpp.

25 {
26 this->_maxHeight = maxHeight;
27}

References _maxHeight, and maxHeight.

Referenced by Room().

◆ setMaxHeightRS()

void Room::setMaxHeightRS ( float  maxHeightRS)
protected

Set the RealSense environment's maximum height.

Parameters
maxHeightRSRealSense environment's maximum height.

Definition at line 45 of file Room.cpp.

45 {
47}

References _maxHeightRS, and maxHeightRS.

Referenced by Room().

◆ setMaxWidth()

void Room::setMaxWidth ( float  maxWidth)
protected

Set the Room's maximum width.

Parameters
maxWidthRoom's maximum width.

Definition at line 17 of file Room.cpp.

17 {
18 this->_maxWidth = maxWidth;
19}

References _maxWidth, and maxWidth.

Referenced by Room().

◆ setMaxWidthRS()

void Room::setMaxWidthRS ( float  maxWidthRS)
protected

Set the RealSense environment's maximum width.

Parameters
maxWidthRSRealSense environment's maximum width.

Definition at line 37 of file Room.cpp.

37 {
38 this->_maxWidthRS = maxWidthRS;
39}

References _maxWidthRS, and maxWidthRS.

Referenced by Room().

◆ setMinHeight()

void Room::setMinHeight ( float  minHeight)
protected

Set the Room's minimum height.

Parameters
minHeightRoom's minimum height.

Definition at line 21 of file Room.cpp.

21 {
22 this->_minHeight = minHeight;
23}

References _minHeight, and minHeight.

Referenced by Room().

◆ setMinHeightRS()

void Room::setMinHeightRS ( float  minHeightRS)
protected

Set the RealSense environment's minimum height.

Parameters
minHeightRSRealSense environment's minimum height.

Definition at line 41 of file Room.cpp.

41 {
43}

References _minHeightRS, and minHeightRS.

Referenced by Room().

◆ setMinWidth()

void Room::setMinWidth ( float  minWidth)
protected

Set the Room's minimum width.

Parameters
minWidthRoom's minimum width.

Definition at line 13 of file Room.cpp.

13 {
14 this->_minWidth = minWidth;
15}

References _minWidth, and minWidth.

Referenced by Room().

◆ setMinWidthRS()

void Room::setMinWidthRS ( float  minWidthRS)
protected

Set the RealSense environment's minimum width.

Parameters
minWidthRSRealSense environment's minimum width.

Definition at line 33 of file Room.cpp.

33 {
34 this->_minWidthRS = minWidthRS;
35}

References _minWidthRS, and minWidthRS.

Referenced by Room().

◆ setXOriginUnity()

void Room::setXOriginUnity ( float  xOriginUnity)
protected

Set the digital twin's x axis' origin.

Parameters
xOriginUnityDigital twin's x axis' origin.

Definition at line 49 of file Room.cpp.

49 {
51}

References _xOriginUnity, and xOriginUnity.

Referenced by Room().

◆ setZOriginUnity()

void Room::setZOriginUnity ( float  zOriginUnity)
protected

Set the digital twin's z axis' origin.

Parameters
zOriginUnityDigital twin's z axis' origin.

Definition at line 53 of file Room.cpp.

53 {
55}

References _zOriginUnity, and zOriginUnity.

Referenced by Room().

Member Data Documentation

◆ _distanceCameraFromBackWall

float Room::_distanceCameraFromBackWall
private

Distance between the camera lens and the wall back to the camera.

Definition at line 117 of file Room.hpp.

Referenced by getDistanceCameraFromBackWall(), and setDistanceCameraFromBackWall().

◆ _heightOffset

float Room::_heightOffset
private

Specific offset that is experimentally considered optimal in order to get more accurate height's measurements.

Definition at line 122 of file Room.hpp.

Referenced by getHeightOffset(), and setHeightOffset().

◆ _maxDepth

float Room::_maxDepth
private

Room's maximum depth.

Definition at line 85 of file Room.hpp.

Referenced by getMaxDepth(), and setMaxDepth().

◆ _maxHeight

float Room::_maxHeight
private

Room's maximum height.

Definition at line 81 of file Room.hpp.

Referenced by getMaxHeight(), and setMaxHeight().

◆ _maxHeightRS

float Room::_maxHeightRS
private

RealSense environment's maximum height.

Definition at line 102 of file Room.hpp.

Referenced by getMaxHeightRS(), and setMaxHeightRS().

◆ _maxWidth

float Room::_maxWidth
private

Room's maximum width.

Definition at line 73 of file Room.hpp.

Referenced by getMaxWidth(), and setMaxWidth().

◆ _maxWidthRS

float Room::_maxWidthRS
private

RealSense environment's maximum width.

Definition at line 94 of file Room.hpp.

Referenced by getMaxWidthRS(), and setMaxWidthRS().

◆ _minHeight

float Room::_minHeight
private

Room's minimum height.

Definition at line 77 of file Room.hpp.

Referenced by getMinHeight(), and setMinHeight().

◆ _minHeightRS

float Room::_minHeightRS
private

RealSense environment's minimum height.

Definition at line 98 of file Room.hpp.

Referenced by getMinHeightRS(), and setMinHeightRS().

◆ _minWidth

float Room::_minWidth
private

Room's minimum width.

Definition at line 69 of file Room.hpp.

Referenced by getMinWidth(), and setMinWidth().

◆ _minWidthRS

float Room::_minWidthRS
private

RealSense environment's minimum width.

Definition at line 90 of file Room.hpp.

Referenced by getMinWidthRS(), and setMinWidthRS().

◆ _xOriginUnity

float Room::_xOriginUnity
private

Digital twin's x axis' origin.

Definition at line 108 of file Room.hpp.

Referenced by getXOriginUnity(), and setXOriginUnity().

◆ _zOriginUnity

float Room::_zOriginUnity
private

Digital twin's z axis' origin.

Definition at line 112 of file Room.hpp.

Referenced by getZOriginUnity(), and setZOriginUnity().


The documentation for this class was generated from the following files: