Share via


INuiCoordinateMapper::MapColorFrameToDepthFrame Method

Kinect for Windows 1.6, 1.7, 1.8

Maps a frame from color space to depth space.

Syntax

public:
HRESULT MapColorFrameToDepthFrame(
         NUI_IMAGE_TYPE eColorType,
         NUI_IMAGE_RESOLUTION eColorResolution,
         NUI_IMAGE_RESOLUTION eDepthResolution,
         DWORD cDepthPixels,
         NUI_DEPTH_IMAGE_PIXEL *pDepthPixels,
         DWORD cDepthPoints,
         NUI_DEPTH_IMAGE_POINT *pDepthPoints
)

Parameters

  • eColorType
    Type: NUI_IMAGE_TYPE
    The color encoding scheme used for the color frame.
  • eColorResolution
    Type: NUI_IMAGE_RESOLUTION
    The resolution of the color image to convert from.
  • eDepthResolution
    Type: NUI_IMAGE_RESOLUTION
    The resolution of the depth image to convert to.
  • cDepthPixels
    Type: DWORD
    The number of elements in the array of depth pixels.
  • pDepthPixels
    Type: NUI_DEPTH_IMAGE_PIXEL
    The depth frame pixel data.
  • cDepthPoints
    Type: DWORD
    The number of elements in the array of depth points.
  • pDepthPoints
    Type: NUI_DEPTH_IMAGE_POINT
    The array to receive the data. Must be equal in length to Width*Height of the color resolution specified by eColorResolution.

Return Value

Type: HRESULT
Returns S_OK if successful; otherwise, returns a failure code.

Remarks

Maps the entire color frame to depth space. Any color pixel without a corresponding depth pixel will result in a sentinel value.

Requirements

Header: Declared in nuisensor.h.