![]() |
OpenNI 1.5.4
|
#include <XnCppWrapper.h>
Public Types | |
typedef void(* | PoseDetection )(PoseDetectionCapability &pose, const XnChar *strPose, XnUserID user, void *pCookie) |
typedef void(* | PoseInProgress )(PoseDetectionCapability &pose, const XnChar *strPose, XnUserID user, XnPoseDetectionStatus poseError, void *pCookie) |
Purpose: Provides a 'Pose Detection' functionality for a xn::UserGenerator node. This capability lets the node recognize when the user is posed in a specific position.
Usage: Do not instantiate directly. Instead, use UserGenerator::GetPoseDetectionCap() to obtain an instance.
Data output: Raises events.
Remarks:
A pose is a specific full body posture involving all the limbs. The PoseDetectionCapability object scans the FOV to detect users performing poses. The PoseDetectionCapability then generates the pose data.
When and if the PoseDetectionCapability object detects a pose it raises the 'Pose Detected' event.
typedef void(* xn::PoseDetectionCapability::PoseDetection)(PoseDetectionCapability &pose, const XnChar *strPose, XnUserID user, void *pCookie) |
'Pose Detection' event
This event is raised to signal that a specific user has entered a pose.
[in] | pose | Reference to the specific xn::UserGenerator node that raised the event. |
[in] | strPose | Name of the specific pose defined for this event handler. (The PoseDetectionCapability can define more than a single pose that can be detected.) |
[in] | user | ID of the user that entered the pose. |
[in] | pCookie | Returns any information ("cookie") that the application placed in this parameter at the time of registering the event.. |
typedef void(* xn::PoseDetectionCapability::PoseInProgress)(PoseDetectionCapability &pose, const XnChar *strPose, XnUserID user, XnPoseDetectionStatus poseError, void *pCookie) |
'Pose In Progress' event:
Raised at each frame time from the time StartPoseDetection was called until the pose is detected. This event returns the current status of pose detection of a user.
[in] | pose | Reference to the specific UserGenerator node that raised the event. |
[in] | strPose | Name of the specific pose defined for this event handler. (The PoseDetectionCapability can define more than a single pose that can be detected. |
[in] | user | ID of the user that entered the pose. |
[in] | poseError | Current status of the pose detection. Defined statuses: XN_POSE_DETECTION_STATUS_OK XN_POSE_DETECTION_STATUS_NO_USER XN_POSE_DETECTION_STATUS_TOP_FOV XN_POSE_DETECTION_STATUS_SIDE_FOV XN_POSE_DETECTION_STATUS_ERROR |
[in] | pCookie | Returns any information ("cookie") that the application placed in this parameter at the time of registering the event. |
|
inline |
Ctor
[in] | hNode | Node handle |
|
inline |
|
inline |
Gets the names of all poses supported by this capability.
[out] | pstrPoses | Pre-allocated memory for the names of the supported poses. |
[in] | nNameLength | Memory size for each pose name. |
[in,out] | nPoses | In input - size of the preallocated memory, in output
|
Remarks
The names of the poses are preset in advance by the developer of this capability.
|
inline |
Get the number of poses supported by this capability.
Remarks
The number of supported poses is defined by the developer of the capability and is common to all xn::UserGenerator nodes using this capability on this OpenNI deployment.
|
inline |
|
inline |
|
inline |
Registers an event handler for the 'Out Of Pose' event.
[in] | handler | Callback function to be invoked when the event is raised. |
[in] | pCookie | User's cookie, to be delivered to the callback. |
[out] | hCallback | Handle to the callback to be used for unregistering it. |
For full details and usage of the parameters, see Registering to Events.
|
inline |
Registers an event handler for the 'Pose Detected' event.
[in] | handler | Callback function to be invoked when the event is raised. |
[in] | pCookie | User's cookie, to be delivered to the callback. |
[out] | hCallback | Handle to the callback to be used for unregistering it. |
For full details and usage of the parameters, see Registering to Events.
|
inline |
Registers an event handler for the 'Pose In Progress' event.
[in] | handler | Callback function to be invoked when the event is raised. |
[in] | pCookie | User's cookie, to be delivered to the callback. |
[out] | hCallback | Handle to the callback to be used for unregistering it. |
For full details and usage of the parameters, see Registering to Events.
Remarks
This event is raised at each frame time from the time StartPoseDetection() method was called until the pose is actually detected.
See the PoseDetection callback type declaration for how to write the callback (event handler).
|
inline |
Starts attempting to detect a pose for a specific user.
[in] | strPose | Name of the requested pose. Call the GetAvailablePoses() method to get the names of poses supported by the PoseDetectionCapability. |
[in] | user | ID of a user to detect a pose for. |
Remarks
This method will typically be used after a new user has been recognized in the FOV. This is typically the next stage in the process of calibrating the new user -
Stops attempting to detect a pose (for a specific user).
[in] | user | ID of a user. |
Remarks
The application will typically call this method when it has already received a 'Pose Detected' event. Once a pose has been detected it is no longer necessary to try to detect poses.
|
inline |
Stop detection of a specific pose for a specific user. For full details and usage, see xnStopSinglePoseDetection
|
inline |
Unregisters an event handler for the 'Out Of Pose' event.
[in] | hCallback | Handle received from registration. |
For full details and usage of the parameter, see Unregistering from Events .
|
inline |
Unregisters an event handler for the 'Pose Detected' event.
[in] | hCallback | Handle received from registration. |
For full details and usage of the parameter, see Unregistering from Events .
|
inline |
Unregisters an event handler for the 'Pose In Progress' event.
[in] | hCallback | Handle received from registration. |
For full details and usage of the parameter, see Unregistering from Events .