Share via


Reconstruction.FusionCreateReconstruction Method

Initialize a Kinect Fusion 3D Reconstruction Volume.

Voxel volume axis sizes must be greater than 0 and a multiple of 32.

Users can select which device the processing is performed on with the parameter. For those with multiple GPUs the parameter also enables users to explicitly configure on which device the reconstruction volume is created.

Note that this function creates a default world-volume transform. To set a non-default transform call ResetReconstruction with an appropriate Matrix4. This default transformation is a combination of translation in X,Y to locate the world origin at the center of the front face of the reconstruction volume cube, and scaling by the voxelsPerMeter reconstruction parameter to convert from the world coordinate system to volume voxel indices.

Syntax

public static Reconstruction FusionCreateReconstruction (
         ReconstructionParameters reconstructionParameters,
         ReconstructionProcessor reconstructionProcessorType,
         int deviceIndex,
         Matrix4 initialWorldToCameraTransform
)

Parameters

  • reconstructionParameters
    Type: ReconstructionParameters
    The Reconstruction parameters to define the size and shape of the reconstruction volume.
  • reconstructionProcessorType
    Type: ReconstructionProcessor
    the processor type to be used for all calls to the reconstruction volume object returned from this function.
  • deviceIndex
    Type: Int32
    Set this variable to an explicit zero-based device index to use a specific GPU as enumerated by NuiFusionGetDeviceInfo, or set to -1 to automatically select the default device for a given processor type.
  • initialWorldToCameraTransform
    Type: Matrix4
    The initial camera pose of the reconstruction volume with respect to the world origin. Pass identity as the default camera pose.

Return Value

Type: Reconstruction
The Reconstruction instance.

This method raises the following exceptions:

Exception Raised By
ArgumentNullException Thrown when the reconstructionParameters parameter is null.
ArgumentException Thrown when the reconstructionParameters parameter's VoxelX, VoxelY, or VoxelZ member is not a greater than 0 and multiple of 32. Thrown when the deviceIndex parameter is less than -1 or greater than the number of available devices for the respective processor type.
OutOfMemoryException Thrown when the memory required for the Reconstruction volume processing could not be allocated.
InvalidOperationException Thrown when the Kinect Runtime could not be accessed, the Kinect device is not connected or the Reconstruction volume is too big so 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

Reconstruction Class
Reconstruction Members
Microsoft.Kinect.Toolkit.Fusion Namespace