Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
NuiTransformSkeletonToDepthImage(Vector4, LONG*, LONG*, USHORT*)

NuiTransformSkeletonToDepthImage(Vector4, LONG*, LONG*, USHORT*)

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Returns the depth space coordinates and depth of the specified point in skeleton space.

void NuiTransformSkeletonToDepthImage(
         Vector4 vPoint,
         LONG *plDepthX,
         LONG *plDepthY,
         USHORT *pusDepthValue
)

Parameters

vPoint
Type: Vector4
[in] The point to transform, in skeleton space coordinates. This point must have a valid depth value.
plDepthX
Type: LONG
[out] A pointer to a LONG that receives the x-coordinate of the point in depth space. This pointer must be non-NULL when you call the function. If this is a NULL pointer, this function returns without doing anything.
plDepthY
Type: LONG
[out] A pointer to a LONG that receives the y-coordinate of the point in depth space. This pointer must be non-NULL when you call the function. If this is a NULL pointer, this function returns without doing anything.
pusDepthValue
Type: USHORT
[out] A pointer to a USHORT that receives the depth value of the point in depth space. This pointer must be non-NULL when you call the function. If this is a NULL pointer, this function returns without doing anything.

The format of this value is the same as that for points in other depth images: the least significant three bits contain a player index that is always zero, and the remaining bits are the depth value, in millimeters. This value is suitable for comparison with values from an image from any of the depth streams, provided that the player index information is masked appropriately from the other image.

Return Value

None.

You can use this function to place virtual objects into the color image with depth-based occlusion. Call this function to determine which skeleton-space vertices of a virtual object are in front of, or behind, real objects that are visible in the depth map image. After occluded parts of the virtual objects have been culled, use the NuiImageGetColorPixelCoordinatesFromDepthPixel function to overlay the virtual object's vertices into color image pixel coordinates for rendering.

Hh855604.note(en-us,IEB.10).gifNote
The output for this function is computed by applying a transform based on the optics of the depth sensor. If the input point is not visible to the depth sensor, the output coordinates will be outside the bounds of the depth image, and the output data will be invalid.

This function is defined as an inline function in NuiSkeleton.h.

Header: Declared in NuiSkeleton.h; however, include NuiApi.h in your project.

Community Additions

ADD
Show:
© 2015 Microsoft