Represents the interface to the capabilities of the Nuitrack Depth Sensor module.
More...
#include <DepthSensor.h>
Inherits HeaderOnlyAPI_Module.
Represents the interface to the capabilities of the Nuitrack Depth Sensor module.
To enable the module, you must create an instance of this class. To create the instance, use a special named constructor DepthSensor::create. This instance is called DepthSensor module object. To receive the new depth frames, add an DepthSensor::OnNewFrame callback to the module object with DepthSensor::connectOnNewFrame method. Use DepthSensor::convertProjToRealCoords to convert coordinates from the projective system to the world and DepthSensor::convertProjToRealCoords for reverse conversion.
tdv::nuitrack::DepthSensor::DepthSensor |
( |
NuitrackModule * |
pimpl | ) |
|
|
inline |
- Warning
- For internal use only.
uint64_t tdv::nuitrack::DepthSensor::connectOnNewFrame |
( |
const OnNewFrame & |
callback | ) |
|
|
inline |
Add a callback for the new depth frame request.
- Parameters
-
[in] | callback | Callback to be invoked at the new depth frame request. |
- Returns
- Callback ID. You can use it to remove the callback.
- See Also
- disconnectOnNewFrame
Vector3 tdv::nuitrack::DepthSensor::convertProjToRealCoords |
( |
const Vector3 & |
p | ) |
const |
|
inline |
Convert projective coordinates to real world coordinates from Vector3 point.
- Parameters
-
[in] | p | Projective point coordinates. |
- Returns
- Converted real world point.
virtual Vector3 tdv::nuitrack::DepthSensor::convertProjToRealCoords |
( |
size_t |
x, |
|
|
size_t |
y, |
|
|
DepthFrame::DataType |
depth |
|
) |
| const |
|
inlinevirtual |
Convert projective coordinates to real world coordinates from x, y and depth map.
- Parameters
-
[in] | x,y | Projective point coordinates. |
[in] | depth | Depth map. |
- Returns
- Converted real world point.
virtual Vector3 tdv::nuitrack::DepthSensor::convertRealToProjCoords |
( |
const Vector3 & |
p | ) |
const |
|
inlinevirtual |
Convert real world coordinates to projective coordinates from Vector3 point.
- Parameters
-
[in] | p | Real world point coordinates. |
- Returns
- Converted projective point.
virtual Vector3 tdv::nuitrack::DepthSensor::convertRealToProjCoords |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| const |
|
inlinevirtual |
Convert real world coordinates to projective coordinates from x, y, z.
- Parameters
-
[in] | x,y,z | Real world point coordinates. |
- Returns
- Converted projective point.
void tdv::nuitrack::DepthSensor::disconnectOnNewFrame |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the new depth frame request.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnNewFrame
virtual uint64_t tdv::nuitrack::DepthSensor::getTimestamp |
( |
| ) |
|
|
inlinevirtual |
Returns the last processed data timestamp in microseconds.
Returns timestamp corresponding to the last available depth frame.
- Note
- The exact meaning of this value depends on the depth provider.
bool tdv::nuitrack::DepthSensor::isMirror |
( |
| ) |
const |
|
inline |
Returns true if mirror mode is enabled, false otherwise.
- See Also
- setMirror
void tdv::nuitrack::DepthSensor::setMirror |
( |
bool |
mirror | ) |
|
|
inline |
Set mirror mode state.
Call setMirror(true) to enable mirror mode. Call setMirror(false) to disable mirror mode.
If the mirror mode is on, the depth map from the sensor will be reflected horizontally before consequent processing.
- Parameters
-
[in] | mirror | Mirror mode state to be set. |
- See Also
- isMirror