concepts.vision.depth_smoother.depth_anything_smoother.fit_spline#

fit_spline(depth, predicted_depth, k=3, s=10, return_sorted_points=False)[source]#

Fit a spline to the depth map using the predicted depth map. In particular, we will fit depth = f(predicted_depth).

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

  • predicted_depth (ndarray) – the predicted depth map.

  • k (int) – the degree of the spline.

  • s (float) – the smoothness of the spline.

  • return_sorted_points (bool) – whether to return the sorted points of the spline.

Returns:

the fitted spline. If return_sorted_points is True, we will also return the sorted points of the depth map and the predicted depth map,

which can be used for visualization.