feat(calibration): robust depth refinement pipeline with diagnostics and benchmarking
This commit is contained in:
@@ -24,6 +24,18 @@ def project_point_to_pixel(P_cam: np.ndarray, K: np.ndarray):
|
||||
return u, v
|
||||
|
||||
|
||||
def get_confidence_weight(confidence: float, threshold: float = 100.0) -> float:
|
||||
"""
|
||||
Convert ZED confidence value to a weight in [0, 1].
|
||||
ZED semantics: 1 is most confident, 100 is least confident.
|
||||
"""
|
||||
if not np.isfinite(confidence) or confidence < 0:
|
||||
return 0.0
|
||||
# Linear weight from 1.0 (at confidence=0) to 0.0 (at confidence=threshold)
|
||||
weight = 1.0 - (confidence / threshold)
|
||||
return float(np.clip(weight, 0.0, 1.0))
|
||||
|
||||
|
||||
def compute_depth_residual(
|
||||
P_world: np.ndarray,
|
||||
T_world_cam: np.ndarray,
|
||||
|
||||
Reference in New Issue
Block a user