INuiFusionReconstruction::DepthToDepthFloatFrame Method
Kinect for Windows 1.8
Converts the specified array of Kinect depth pixels to a NUI_FUSION_IMAGE_FRAME structure.
Syntax
public:
HRESULT DepthToDepthFloatFrame(
const NUI_DEPTH_IMAGE_PIXEL *pDepthImageData,
UINT countDepthImageDataBytes,
const NUI_FUSION_IMAGE_FRAME *pDepthFloatFrame,
FLOAT minDepthClip,
FLOAT maxDepthClip,
BOOL mirrorDepth
)
Parameters
- pDepthImageData
Type: NUI_DEPTH_IMAGE_PIXEL
Pointer to the array of Kinect depth pixels in unsigned short format to convert. This data must have the same pixel resolution as the structure pointed to by the pDepthFloatFrame parameter. - countDepthImageDataBytes
Type: UINT
Size of the data pointed to by the pDepthImageData parameter, in bytes. - pDepthFloatFrame
Type: NUI_FUSION_IMAGE_FRAME
Pointer to a floating-point depth float frame that receives the converted depth data. This data must have the same pixel resolution as the data pointed to by the pDepthImageData parameter. - minDepthClip
Type: FLOAT
The minimum depth threshold, meters. Values below this threshold will be set to zero. - maxDepthClip
Type: FLOAT
The maximum depth threshold, in meters. Values above this threshold will be set to 1,000. - mirrorDepth
Type: BOOL
Specify true to mirror the depth values. Specify false so the image appears correct if viewing the Kinect sensor from behind.
Return Value
Type: HRESULT
HRESULT success or error code.
Remarks
The minDepthClip and maxDepthClip parameters enable clipping of the input data; for example, these values help to isolate particular objects or surfaces to be reconstructed. In situations where the camera is static or does not move significantly, the minDepthClip parameter is important for reconstruction integration, as it enables any voxels closer to the camera along this ray to be culled instead of persisting (as would happen if the pixels were simply set to zero and ignored in processing). When reconstructing large real-world size volumes, the maxDepthClip parameter is important when the camera moves around, as any voxels in view which are farther from the sensor than this threshold will be removed.
This method runs on the GPU.
Requirements
Header: Declared in nuikinectfusionvolume.h.
Library: Use KinectFusion180_32.lib for 32-bit applications and use KinectFusion180_64.lib for 64-bit applications.