FusionDepthProcessor.ShadePointCloud Method (FusionPointCloudImageFrame, Matrix4, Matrix4, FusionColorImageFrame, FusionColorImageFrame)
Create a visible color shaded image of a point cloud and its normals. All image frames must have the same width and height.
Syntax
public static void ShadePointCloud (
FusionPointCloudImageFrame pointCloudFrame,
Matrix4 worldToCameraTransform,
Matrix4 worldToBGRTransform,
FusionColorImageFrame shadedSurfaceFrame,
FusionColorImageFrame shadedSurfaceNormalsFrame
)
Parameters
pointCloudFrame
Type: FusionPointCloudImageFrame
The point cloud frame to be shaded.worldToCameraTransform
Type: Matrix4The world to camera transform (camera pose) where the raycast was performed from.
Pass identity if the point cloud did not originate from a raycast and is in the camera local coordinate system.
worldToBGRTransform
Type: Matrix4
A transform mapping the XYZ co-ordinates of world space to a BGR color space, used to color surfaces according to their world positions. RGB values are clamped to the range [0, 1].shadedSurfaceFrame
Type: FusionColorImageFrame
Optionally, a pre-allocated color image frame, to be filled with the shaded surface image. Pass null to skip this image.shadedSurfaceNormalsFrame
Type: FusionColorImageFrame
ptionally, a pre-allocated color image frame, to be filled with the color shaded normals image with color indicating orientation. Pass null to skip this image.
Remarks
This method raises the following exceptions:
Exception | Raised on |
ArgumentNullException | Thrown when the pointCloudFrame parameter is null. |
ArgumentException | Thrown when the pointCloudFrame or shadedSurfaceFrame or shadedSurfaceNormalsFrame parameters are different image sizes. Thrown when the pointCloudFrame or shadedSurfaceFrame or shadedSurfaceNormalsFrame parameters have different camera parameters. |
OutOfMemoryException | Thrown if a CPU memory allocation failed. |
InvalidOperationException | Thrown when the Kinect Runtime could not be accessed, the device is not connected, a GPU memory allocation failed or the call failed for an unknown reason. |
Requirements
Namespace: Microsoft.Kinect.Toolkit.Fusion
Assembly: Microsoft.Kinect.Toolkit.Fusion (in microsoft.kinect.toolkit.fusion.dll)
See Also
Reference
FusionDepthProcessor Class
FusionDepthProcessor Members
Microsoft.Kinect.Toolkit.Fusion Namespace