Modules | Functions
User Generator
Production Nodes Functionality
Collaboration diagram for User Generator:

Modules

 Skeleton Capability
 Pose Detection Capability

Functions

XN_C_API XnStatus xnCreateUserGenerator (XnContext *pContext, XnNodeHandle *phUserGenerator, XnNodeQuery *pQuery, XnEnumerationErrors *pErrors)
 Creates a user generator.
XN_C_API XnUInt16 xnGetNumberOfUsers (XnNodeHandle hInstance)
 Get current number of users.
XN_C_API XnStatus xnGetUserCoM (XnNodeHandle hInstance, XnUserID user, XnPoint3D *pCoM)
 Get the center of mass of a user.
XN_C_API XnStatus xnGetUserPixels (XnNodeHandle hInstance, XnUserID user, XnSceneMetaData *pScene)
 Get the pixels that belong to a user.
XN_C_API XnStatus xnGetUsers (XnNodeHandle hInstance, XnUserID *pUsers, XnUInt16 *pnUsers)
 Get the current users.
XN_C_API XnStatus xnRegisterUserCallbacks (XnNodeHandle hInstance, XnUserHandler NewUserCB, XnUserHandler LostUserCB, void *pCookie, XnCallbackHandle *phCallback)
 Register to user callbacks.
XN_C_API void xnUnregisterUserCallbacks (XnNodeHandle hInstance, XnCallbackHandle hCallback)
 Unregister from user callbacks.

Detailed Description

A User Generator node is a Generator that identifies a user in the scene. It supports all Generator functions, and adds additional functions.


Function Documentation

XN_C_API XnStatus xnCreateUserGenerator ( XnContext pContext,
XnNodeHandle phUserGenerator,
XnNodeQuery pQuery,
XnEnumerationErrors pErrors 
)

Creates a user generator.

Parameters:
pContext[in] The context in which to create the user generator.
phUserGenerator[out] A handle to the created user generator.
pQuery[in] Optional. Can be used to select which user generator to create. If not specified, this function may create any user generator that is available.
pErrors[in] Optional. If provided, will be filled with information about user generators that could not be created.

Get current number of users.

Parameters:
hInstance[in] A handle to the instance
XN_C_API XnStatus xnGetUserCoM ( XnNodeHandle  hInstance,
XnUserID  user,
XnPoint3D pCoM 
)

Get the center of mass of a user.

Parameters:
hInstance[in] A handle to the instance
user[in] The user for which to get the center of mass
pCoM[out] The center of mass
XN_C_API XnStatus xnGetUserPixels ( XnNodeHandle  hInstance,
XnUserID  user,
XnSceneMetaData pScene 
)

Get the pixels that belong to a user.

The output is in a XnSceneMetaData object, holding a map of the pixels of the scene, with the user's label as the value in the places corresponding with the user's pixels. Pixels outside the user will not contain the user's ID. ID 0 means a request for the pixels of all users. In this case, the background will get the label 0.

Parameters:
hInstance[in] A handle to the instance
user[in] The user for which to get the pixels
pScene[out] XnSceneMetaData object, that holds the pixels of the user
XN_C_API XnStatus xnGetUsers ( XnNodeHandle  hInstance,
XnUserID pUsers,
XnUInt16 pnUsers 
)

Get the current users.

Parameters:
hInstance[in] A handle to the instance
pUsers[out] Preallocated memory for the users
pnUsers[in,out] The size of the preallocated memory. Changes to the number of users
XN_C_API XnStatus xnRegisterUserCallbacks ( XnNodeHandle  hInstance,
XnUserHandler  NewUserCB,
XnUserHandler  LostUserCB,
void pCookie,
XnCallbackHandle phCallback 
)

Register to user callbacks.

Parameters:
hInstance[in] A handle to the instance
NewUserCB[in] Callback to be called when a new user is identified
LostUserCB[in] Callback to be called when an existing user is no longer identified
pCookie[in] User's cookie, to be delivered to the callbacks
phCallback[out] The handle to these callbacks, to allow unregistration

Unregister from user callbacks.

Parameters:
hInstance[in] A handle to the instance
hCallback[in] The handle received from registration


nao_openni
Author(s): Bener SUAY
autogenerated on Mon Jan 6 2014 11:27:52