concepts.vision.depth_smoother.depth_anything_smoother.sample_and_retrieve_corresponding_depths_flat#
- sample_and_retrieve_corresponding_depths_flat(observed_depth_flat, predicted_depth_flat, n, mask, remove_zero_values=True)[source]#
Sample n points from the depth map and the predicted depth map, and return the corresponding values.
- Parameters:
observed_depth_flat (ndarray) – the observed depth map.
predicted_depth_flat (ndarray) – the predicted depth map.
n (int) – the number of samples to take.
mask (ndarray) – the mask of the valid pixels. We will only sample points from the pixels that are valid.
remove_zero_values (bool) – whether to remove the zero values in the observed depth map and the predicted depth map.