Reconstruction.ProcessFrame Method
A high-level function to process a depth frame through the Kinect Fusion pipeline.
Specifically, this performs processing equivalent to the following functions for each frame:
- AlignDepthFloatToReconstruction
- IntegrateFrame
Users may also optionally call the low-level functions individually, instead of calling this function, for more control. However, this function call will be faster due to the integrated nature of the calls. After this call completes, if a visible output image of the reconstruction is required, the user can call CalculatePointCloud and then ShadePointCloud. The maximum image resolution supported in this function is 640x480.
If there is a tracking error in the AlignDepthFloatToReconstruction stage, no depth data integration will be performed, and the camera pose will remain unchanged.
Syntax
public bool ProcessFrame (
FusionFloatImageFrame depthFloatFrame,
int maxAlignIterationCount,
int maxIntegrationWeight,
Matrix4 worldToCameraTransform
)
Parameters
- depthFloatFrame
Type: FusionFloatImageFrame
The depth float frame to be processed. - maxAlignIterationCount
Type: Int32
The maximum number of iterations of the align camera tracking algorithm to run. The minimum value is 1. Using only a small number of iterations will have a faster runtime, however, the algorithm may not converge to the correct transformation. - maxIntegrationWeight
Type: Int32
A parameter to control the temporal smoothing of depth integration. Lower values have more noisy representations, but objects that move appear and disappear faster, so are suitable for more dynamic environments. Higher values integrate objects more slowly, but provides finer detail with less noise. - worldToCameraTransform
Type: Matrix4
The best guess of the latest camera pose (usually the camera pose result from the last process call).
Return Value
Type: Boolean
Returns true if successful; return false if the algorithm encountered a problem aligning the input depth image and could not calculate a valid transformation.
This method raises the following exceptions:
Exception | Raised By |
ArgumentNullException | Thrown when the depthFloatFrame parameter is null. |
ArgumentException | Thrown when the depthFloatFrame parameter is an incorrect image size. Thrown when the maxAlignIterationCount parameter is less than 1 or greater than the maximum unsigned short value. Thrown when the maxIntegrationWeight parameter is less than 1 or greater than the maximum unsigned short value. |
InvalidOperationException | Thrown when the Kinect Runtime could not be accessed, the device is not connected, 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
Reconstruction Class
Reconstruction Members
Microsoft.Kinect.Toolkit.Fusion Namespace