Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Create a visible color shaded image of a point cloud and its normals with simple grayscale L.N surface shading. All image frames must have the same width and height.
Syntax
public static void ShadePointCloud (
FusionPointCloudImageFrame pointCloudFrame,
Matrix4 worldToCameraTransform,
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.
shadedSurfaceFrame
Type: FusionColorImageFrame
Optionally, a pre-allocated color image frame, to be filled with the grayscale L.N shaded surface image. Pass null to skip this image.shadedSurfaceNormalsFrame
Type: FusionColorImageFrame
Optionally, 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