Configuration

class phoxi_instant_meshing.DeviceParameters(device_id: str = '', width: int = 0, height: int = 0, orthogonal_projection: bool = False, camera_intrinsics: CameraIntrinsics | None = None, distortion_coefficients: DistortionCoefficients | None = None, ortho_width: float = 0.0, ortho_height: float = 0.0, min_depth: float = 200.0, max_depth: float = 2500.0, min_color_intensity: float = 0.0, max_color_intensity: float = 512.0, tracking_enabled: bool = True, texture_tracking_enabled: bool = True, movement_prediction_enabled: bool = True, force_camera_space_enabled: bool = False, calibration_matrix: list[float] | None = None)

Bases: object

PhoXi device parameters configuration.

Encapsulates all configuration parameters for a PhoXi device, including resolution, projection mode, camera intrinsics, depth range, and tracking settings.

class CameraIntrinsics(fx: float = 0.0, fy: float = 0.0, cx: float = 0.0, cy: float = 0.0)

Bases: object

Camera intrinsics for perspective projection.

Focal lengths and principal point coordinates used in perspective camera projection model.

class DistortionCoefficients(k1: float = 0.0, k2: float = 0.0, p1: float = 0.0, p2: float = 0.0, k3: float = 0.0)

Bases: object

Camera distortion coefficients for perspective projection.

Radial and tangential distortion coefficients used to model lens distortion in perspective cameras.

classmethod from_phoxi(device)

Create DeviceParameters from PhoXi device using public API.

Extracts device configuration from a PhoXiDevice instance, including resolution, projection mode, camera intrinsics, and distortion coefficients.

Parameters:

device – PhoXiDevice instance

Returns:

DeviceParameters populated from device settings

classmethod get_default() → DeviceParameters

Get default device parameters from the C API.

Returns a DeviceParameters instance with default values obtained from phoim_GetDefaultDeviceParameters, ensuring Python defaults always match the C++ library defaults.

Returns:

DeviceParameters instance with default values

class phoxi_instant_meshing.Settings(gpu_id: int = 0, max_gpu_memory_usage: int = 85, voxel_size: float = 1.0, working_volume_edge_length: float = 33.0, min_voxel_consensus: int = 3, streaming_enabled: bool = True, rasterization_engine: RasterizationEngine = RasterizationEngine.OPENGL, color_intensity_auto_minmax_enabled: bool = True, tracking_lost_tolerance: float = 1.0)

Bases: object

InstantMeshing configuration settings.

Configuration for the meshing process independent of device settings. Controls GPU usage, voxel resolution, streaming, and tracking behavior. Corresponds to phoim_Settings in the C API.

classmethod get_default() → Settings

Get default settings from the C API.

Returns a Settings instance with default values obtained from phoim_GetDefaultSettings, ensuring Python defaults always match the C++ library defaults.

Returns:

Settings instance with default values

class phoxi_instant_meshing.CameraParamsPerspective(width: int = 0, height: int = 0, position: list[float] | None = None, forward_vector: list[float] | None = None, up_vector: list[float] | None = None, fx: float = 0.0, fy: float = 0.0, cx: float = 0.0, cy: float = 0.0, min_depth: float = 0.0, max_depth: float = 0.0)

Bases: CameraParamsCommon

Camera parameters for GetVirtualScan with perspective projection.

Defines camera position, orientation, resolution, depth range, and intrinsic parameters for perspective projection.

class phoxi_instant_meshing.CameraParamsOrthogonal(width: int = 0, height: int = 0, position: list[float] | None = None, forward_vector: list[float] | None = None, up_vector: list[float] | None = None, ortho_width: float = 0.0, ortho_height: float = 0.0, min_depth: float = 0.0, max_depth: float = 0.0)

Bases: CameraParamsCommon

Camera parameters for GetVirtualScan with orthogonal projection.

Defines camera position, orientation, resolution, depth range, and view volume dimensions for orthogonal projection.

class phoxi_instant_meshing.CroppingVolume

Bases: object

Spatial cropping volume for mesh generation.

Defines a region of space to include in mesh generation. Supports axis-aligned bounding boxes and spherical volumes. Corresponds to phoim_CroppingVolume in the C API.

classmethod aabb(min_pt: list[float], max_pt: list[float]) → CroppingVolume

Create an axis-aligned bounding box cropping volume.

Parameters:
  • min_pt – Minimum corner [x, y, z]

  • max_pt – Maximum corner [x, y, z]

Returns:

CroppingVolume with AABB type

Raises:

ValueError – If min_pt or max_pt does not have exactly 3 elements

classmethod none() → CroppingVolume

Create a no-cropping volume.

Returns:

CroppingVolume with NONE type

classmethod sphere(origin: list[float], radius: float) → CroppingVolume

Create a spherical cropping volume.

Parameters:
  • origin – Center of sphere [x, y, z]

  • radius – Radius of sphere

Returns:

CroppingVolume with SPHERE type

Raises:

ValueError – If origin does not have exactly 3 elements