NuiTransformSkeletonToDepthImage(Vector4, FLOAT*, FLOAT*, NUI_IMAGE_RESOLUTION)

Kinect for Windows 1.5, 1.6, 1.7, 1.8

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

void NuiTransformSkeletonToDepthImage(
         Vector4 vPoint,
         FLOAT *pfDepthX,
         FLOAT *pfDepthY,
         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.
pfDepthX
Type: FLOAT
[out] A pointer to a FLOAT 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.
pfDepthY
Type: FLOAT
[out] A pointer to a FLOAT 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.
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.

JJ663872.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: