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.
Converts Kinect depth frames in unsigned short format to depth frames in float format representing distance from the camera in meters (parallel to the optical center axis).
Note: depthImageData and depthFloatFrame must be the same pixel resolution and equal to depthImageDataWidth by depthImageDataHeight.
The min and max depth clip values enable clipping of the input data, for example, to help isolate particular objects or surfaces to be reconstructed. Note that the thresholds return different values when a depth pixel is outside the threshold - pixels inside minDepthClip will will be returned as 0 and ignored in processing, whereas pixels beyond maxDepthClip will be set to 1000 to signify a valid depth ray with depth beyond the set threshold. Setting this far- distance flag is important for reconstruction integration in situations where the camera is static or does not move significantly, 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 0 and ignored in processing). Note that when reconstructing large real-world size volumes, be sure to set large maxDepthClip distances, as when the camera moves around, any voxels in view which go beyond this threshold distance from the camera will be removed.
Syntax
public static void DepthToDepthFloatFrame (
DepthImagePixel[] depthImageData,
int depthImageDataWidth,
int depthImageDataHeight,
FusionFloatImageFrame depthFloatFrame,
float minDepthClip,
float maxDepthClip,
bool mirrorDepth
)
Parameters
- depthImageData
Type: DepthImagePixel
An array which stores the extended-depth texture of a depth image from the Kinect camera. - depthImageDataWidth
Type: Int32
Width of the depth image data. - depthImageDataHeight
Type: Int32
Height of the depth image data. - depthFloatFrame
Type: FusionFloatImageFrame
A pre-allocated depth float type image frame, to be filled with the floating point depth values. - minDepthClip
Type: Single
Minimum depth distance threshold in meters. Depth pixels below this value will be returned as invalid (0). Min depth must be positive or 0. - maxDepthClip
Type: Single
Maximum depth distance threshold in meters. Depth pixels above this value will be returned as invalid (1000). Max depth must be greater than 0. - mirrorDepth
Type: Boolean
A boolean parameter specifying whether to horizontally mirror the input depth image.
Remarks
This method raises the following exceptions:
Exception | Raised on |
ArgumentNullException | Thrown when the depthImageData or the depthFloatFrame parameter is null. |
ArgumentException | Thrown when the depthImageDataWidth parameter and depthFloatFrame's width is not equal, or the depthImageDataHeight parameter and depthFloatFrame's height member is not equal. Thrown when the minDepthClip parameter or the maxDepthClip is less than zero. |
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