VoxelMeasureParameters Struct Reference

Parameters controlling voxel decimation in sl::Camera::retrieveVoxelMeasure. More...

Attributes

float voxel_size = -1.f
 Voxel grid cell size in InitParameters::coordinate_units. If <= 0, a 100 mm equivalent default is used. Clamped internally to [5 mm equivalent, max_depth_range]. More...
 
bool centroid = true
 Controls output point positions within each voxel. If true, output point positions are the centroid of all points in each voxel. If false, output positions are snapped to the voxel grid center. More...
 
VOXELIZATION_MODE resolution_mode = VOXELIZATION_MODE::STEREO_UNCERTAINTY
 How voxel size adapts with depth. More...
 
float resolution_scale = 0.2f
 Scale factor for depth-adaptive voxel growth. Controls how aggressively voxels grow with depth. Larger values produce coarser voxels at distance (fewer points, better performance). Smaller values keep voxels tighter at range (more points, higher cost). Typical range: [0.01, 1.0]. Clamped internally to [0.01, 3.0]. More...
 

Detailed Description

Parameters controlling voxel decimation in sl::Camera::retrieveVoxelMeasure.

A default-constructed instance uses stereo-adaptive mode, matching the stereo camera's noise model out of the box.

Variables

◆ voxel_size

float voxel_size = -1.f

Voxel grid cell size in InitParameters::coordinate_units. If <= 0, a 100 mm equivalent default is used. Clamped internally to [5 mm equivalent, max_depth_range].

◆ centroid

bool centroid = true

Controls output point positions within each voxel. If true, output point positions are the centroid of all points in each voxel. If false, output positions are snapped to the voxel grid center.

◆ resolution_mode

How voxel size adapts with depth.

Focal length, baseline, and unit conversion are derived automatically from camera calibration.

◆ resolution_scale

float resolution_scale = 0.2f

Scale factor for depth-adaptive voxel growth. Controls how aggressively voxels grow with depth. Larger values produce coarser voxels at distance (fewer points, better performance). Smaller values keep voxels tighter at range (more points, higher cost). Typical range: [0.01, 1.0]. Clamped internally to [0.01, 3.0].

Note
Only used when resolution_mode is not VOXELIZATION_MODE::FIXED. Silently ignored otherwise.