Represents the interface to the capabilities of the Nuitrack Skeleton Tracker module.
More...
#include <SkeletonTracker.h>
Inherits HeaderOnlyAPI_Module.
Represents the interface to the capabilities of the Nuitrack Skeleton Tracker module.
To enable the module, you must create an instance of this class. To create the instance, use a special named constructor SkeletonTracker::create. This instance is called SkeletonTracker module object. To receive the skeleton tracking data, add an SkeletonTracker::OnUpdate callback to the module object with SkeletonTracker::connectOnUpdate method. To handle events of appearance and disappearance of an active user, add SkeletonTracker::OnNewUser and SkeletonTracker::OnLostUser callbacks with SkeletonTracker::connectOnNewUser and SkeletonTracker::connectOnLostUser methods respectively.
The callback type of the active user disapearance event.
This callback will be called if an active user disapears. This callback receive the ID of the lost active user.
- See Also
- connectOnLostUser
The callback type of the new active user apearance event.
This callback will be called if a new active user appears. This callback receive the ID of the new active user.
- See Also
- connectOnNewUser
tdv::nuitrack::SkeletonTracker::SkeletonTracker |
( |
NuitrackModule * |
pimpl | ) |
|
|
inline |
- Warning
- For internal use only.
tdv::nuitrack::SkeletonTracker::SkeletonTracker |
( |
NuitrackModule * |
pimpl, |
|
|
CallbackStruct< SkeletonData::Ptr > * |
onUpdateCallbackStruct, |
|
|
CallbackStruct2p< SkeletonTracker::Ptr, int > * |
onNewUserCallbackStruct, |
|
|
CallbackStruct2p< SkeletonTracker::Ptr, int > * |
onLostUserCallbackStruct |
|
) |
| |
|
inline |
- Warning
- For internal use only.
uint64_t tdv::nuitrack::SkeletonTracker::connectOnLostUser |
( |
const OnLostUser & |
callback | ) |
|
|
inline |
Add a callback for the active user disappearance event.
- Parameters
-
[in] | callback | Callback to be invoked after the skeleton data update request, if an active user is found to be missing. |
- Returns
- Registered callback ID. You can use it to remove the callback.
- See Also
- disconnectOnLostUser
uint64_t tdv::nuitrack::SkeletonTracker::connectOnNewUser |
( |
const OnNewUser & |
callback | ) |
|
|
inline |
Add a callback for the new active user appearance event.
- Parameters
-
[in] | callback | Callback to be invoked after the skeleton data update request, if a new active user is appeared. |
- Returns
- Callback ID. You can use it to remove the callback.
- See Also
- disconnectOnNewUser
uint64_t tdv::nuitrack::SkeletonTracker::connectOnUpdate |
( |
const OnUpdate & |
callback | ) |
|
|
inline |
Add a callback for the skeleton data update request.
- Parameters
-
[in] | callback | Callback to be invoked after the skeleton data update request. |
- Returns
- Callback ID. You can use it to remove the callback.
- See Also
- disconnectOnUpdate
void tdv::nuitrack::SkeletonTracker::destroySkeletonTracker |
( |
| ) |
|
|
inlineprotected |
- Warning
- For internal use only.
void tdv::nuitrack::SkeletonTracker::disconnectOnLostUser |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the active user disappearance event.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnLostUser
void tdv::nuitrack::SkeletonTracker::disconnectOnNewUser |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the new active user appearance event.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnNewUser
void tdv::nuitrack::SkeletonTracker::disconnectOnUpdate |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the skeleton data update request.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnUpdate
virtual uint64_t tdv::nuitrack::SkeletonTracker::getTimestamp |
( |
| ) |
|
|
inlinevirtual |
Returns the last processed data timestamp in microseconds.
Returns timestamp corresponding to the last estimation of the skeletal pose.
- Note
- The exact meaning of this value depends on the depth provider.
bool tdv::nuitrack::SkeletonTracker::isAutoTracking |
( |
| ) |
const |
|
inline |
Returns true if auto tracking is enabled, false otherwise.
- Note
- The default value is determined by the Nuitrack config file.
- See Also
- setAutoTracking
bool tdv::nuitrack::SkeletonTracker::isTracking |
( |
int |
userID | ) |
|
|
inline |
static void tdv::nuitrack::SkeletonTracker::onLostUserCallback |
( |
SkeletonTracker * |
tracker, |
|
|
int |
usedID |
|
) |
| |
|
inlinestaticprotected |
- Warning
- For internal use only.
static void tdv::nuitrack::SkeletonTracker::onNewUserCallback |
( |
SkeletonTracker * |
tracker, |
|
|
int |
usedID |
|
) |
| |
|
inlinestaticprotected |
- Warning
- For internal use only.
static void tdv::nuitrack::SkeletonTracker::onUpdateCallback |
( |
SkeletonTrackerData * |
frame, |
|
|
SkeletonTracker * |
tracker |
|
) |
| |
|
inlinestaticprotected |
- Warning
- For internal use only.
void tdv::nuitrack::SkeletonTracker::setAutoTracking |
( |
bool |
tracking | ) |
|
|
inline |
Set user skeleton auto tracking state.
Call setAutoTracking(true) to enable auto tracking. Call setAutoTracking(false) to disable auto tracking.
When auto tracking is enabled, tracking of the skeleton of a user begins immediately when the user appears in the frame. Otherwise, you must manually start tracking of the user's skeleton.
- Parameters
-
[in] | tracking | Auto tracking state to be set. |
- See Also
- startTracking
-
connectOnNewUser
-
isAutoTracking
void tdv::nuitrack::SkeletonTracker::setNumActiveUsers |
( |
int |
numUsers | ) |
|
|
inline |
Set maximum number of users for tracking.
- Note
- The function supports tracking from 0 to 6 users. By default, the skeleton of 2 users is tracked. Tracking of more than 2 users may lead to performance loss.
- Parameters
-
[in] | numUsers | Maximum active user number to be set. |
void tdv::nuitrack::SkeletonTracker::startTracking |
( |
int |
userID | ) |
|
|
inline |
Start tracking of a user.
- Parameters
-
[in] | userID | ID of user which tracking should be started. |
- See Also
- stopTracking
-
isTracking
void tdv::nuitrack::SkeletonTracker::stopTracking |
( |
int |
userID | ) |
|
|
inline |
Stop tracking of a user.
- Parameters
-
[in] | userID | ID of user which tracking should be stopped. |
- See Also
- startTracking
-
isTracking
SkeletonTrackerCallbackWrapper tdv::nuitrack::SkeletonTracker::_callbackWrapper |
|
protected |
- Warning
- For internal use only.
int8_t tdv::nuitrack::SkeletonTracker::_isCopy |
|
protected |
- Warning
- For internal use only.
CallbackStruct2p<SkeletonTracker::Ptr, int>* tdv::nuitrack::SkeletonTracker::_onLostUserCallbackStruct |
|
protected |
- Warning
- For internal use only.
CallbackStruct2p<SkeletonTracker::Ptr, int>* tdv::nuitrack::SkeletonTracker::_onNewUserCallbackStruct |
|
protected |
- Warning
- For internal use only.
CallbackStruct<SkeletonData::Ptr>* tdv::nuitrack::SkeletonTracker::_onUpdateCallbackStruct |
|
protected |
- Warning
- For internal use only.
NuitrackModule* tdv::nuitrack::SkeletonTracker::_pimpl |
|
protected |
- Warning
- For internal use only.