INuiFusionColorReconstruction::CalculatePointCloudAndDepth Method
Calculates a point cloud by raycasting into the reconstruction volume, returning the point cloud containing 3D points and normals of the zero-crossing dense surface at every visible pixel in the image from the specified camera pose, color visualization image, and the depth to the surface.
Syntax
public:
HRESULT CalculatePointCloudAndDepth(
const NUI_FUSION_IMAGE_FRAME *pPointCloudFrame,
const NUI_FUSION_IMAGE_FRAME *pDepthFloatFrame,
const NUI_FUSION_IMAGE_FRAME *pColorFrame,
const Matrix4 *pWorldToCameraTransform
)
Parameters
pPointCloudFrame
Type: NUI_FUSION_IMAGE_FRAME
The pre-allocated point cloud frame, to be filled by raycasting into the reconstruction volume. This point cloud can be used as a reference frame in the next call to the AlignPointClouds method, or passed to the NuiFusionShadePointCloud function to produce a visible image output.The cloud frame can be an arbitrary image size. This allows you to calculate point clouds at the size of your window and then create a visible image by calling the NuiFusionShadePointCloud function method to render this image. Note that large images are expensive to calculate.
pDepthFloatFrame
Type: NUI_FUSION_IMAGE_FRAME
A floating-point depth frame, to be filled with floating-point depths to the raycast surface, in meters. This image must be identical in size and camera parameters to the pPointCloudFrame parameter. You can use this depth image as a reference frame for the INuiFusionColorReconstruction::AlignDepthFloatToReconstruction Method method by calling the INuiFusionColorReconstruction::SetAlignDepthFloatToReconstructionReferenceFrame Method method to enable a greater range of tracking.pColorFrame
Type: NUI_FUSION_IMAGE_FRAME
The color frame to fill.pWorldToCameraTransform
Type: Matrix4
The world-to-camera transform (camera pose) to raycast from.
Return value
Type: HRESULT
S_OK if successful; otherwise, returns a failure code.
Requirements
Header: nuikinectfusioncolorvolume.h
Library: TBD