concepts.vision.depth_smoother.depth_anything_smoother.fit_single_line#

fit_single_line(depth, predicted_depth, target=None)[source]#

Fit a single line to the depth map using the predicted depth map.

Math input error
Parameters:
  • depth (ndarray) – the observed depth map.

  • predicted_depth (ndarray) – the predicted depth map.

  • target (ndarray | None) – the target depth map to transform.

Returns:

the transformed depth map. If target is not None, we will return k * target + b. Otherwise, we will return k * predicted_depth + b.