791 B
791 B
Depth Unit Scaling Patterns
Findings
- Native SDK Scaling:
depth_sensing.pyusesinit_params.coordinate_units = sl.UNIT.METER. - Manual Scaling:
aruco/svo_sync.pyusesdepth_data / 1000.0because it leavescoordinate_unitsat the default (MILLIMETER).
Risks
- Double-Scaling: If
svo_sync.pyis updated to usesl.UNIT.METERinInitParameters, the manual/ 1000.0MUST be removed, otherwise depth values will be 1000x smaller than intended. - Inconsistency: Different parts of the codebase handle unit conversion differently (SDK-level vs. Application-level).
Recommendations
- Standardize on
sl.UNIT.METERinInitParametersacross all ZED camera initializations. - Remove manual
/ 1000.0scaling once SDK-level units are set to meters.