ColorReconstruction.CalculatePointCloudAndDepth Method
Kinect for Windows 1.8
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 void CalculatePointCloudAndDepth (
FusionPointCloudImageFrame pointCloudFrame,
FusionFloatImageFrame depthFloatFrame,
FusionColorImageFrame colorFrame,
Matrix4 worldToCameraTransform
)
Parameters
pointCloudFrame
Type: FusionPointCloudImageFrameThe 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 FusionDepthProcessor.AlignPointClouds method, or passed to the FusionDepthProcessor.ShadePointCloud method 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 FusionDepthProcessor.ShadePointCloud method to render this image. Note that large images are expensive to calculate.
depthFloatFrame
Type: FusionFloatImageFrame
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 pointCloudFrame parameter. You can use this depth image as a reference frame for the AlignDepthFloatToReconstruction method by calling the SetAlignDepthFloatToReconstructionReferenceFrame method to enable a greater range of tracking.colorFrame
Type: FusionColorImageFrame
The color frame to fill.worldToCameraTransform
Type: Matrix4
The world-to-camera transform (camera pose) to raycast from.
Exceptions
Exception type | Condition |
---|---|
ArgumentException | The pointCloudFrame, depthFloatFrame, or colorFrame parameter is an incorrect image size. |
ArgumentNullException | The pointCloudFrame, depthFloatFrame, or colorFrame parameter is null. |
InvalidOperationException | One of the following occurred:
|
Requirements
Namespace: Microsoft.Kinect.Toolkit.Fusion
Assembly: Microsoft.Kinect.Toolkit.Fusion (in microsoft.kinect.toolkit.fusion.dll)
See Also
Reference
ColorReconstruction Class
ColorReconstruction Members
Microsoft.Kinect.Toolkit.Fusion Namespace