Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

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

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Returns the depth space coordinates, depth, and resolution of the specified point in skeleton space.
void NuiTransformSkeletonToDepthImage(
         Vector4 vPoint,
         LONG *plDepthX,
         LONG *plDepthY,
         USHORT *pusDepthValue,
         NUI_IMAGE_RESOLUTION eResolution
)

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.

eResolution
Type: NUI_IMAGE_RESOLUTION
[in] A NUI_IMAGE_RESOLUTION value that specifies the resolution of the depth 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.

JJ663873.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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.