Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Remove deprecation decorator from depth_to_3d function (#3142)

Inchara J57296883b150
diff --git a/kornia/geometry/depth.py b/kornia/geometry/depth.py
index 7e2c655d9..30eac603c 100644
--- a/kornia/geometry/depth.py
+++ b/kornia/geometry/depth.py
@@ -28,7 +28,6 @@ from kornia.core import Module, Tensor, tensor
from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
from kornia.filters.sobel import spatial_gradient
from kornia.utils import create_meshgrid
-from kornia.utils.helpers import deprecated
from .camera import PinholeCamera, cam2pixel, pixel2cam, project_points, unproject_points
from .conversions import normalize_pixel_coordinates, normalize_points_with_intrinsics
@@ -136,14 +135,6 @@ def depth_to_3d_v2(
return points_xyz * depth[..., None] # HxWx3
-@deprecated(
- replace_with="depth_to_3d_v2",
- version="0.8.0",
- extra_reason=(
- " This function will be replaced with the `depth_to_3d_v2` behaviour, where the that does not require the"
- " creation of a meshgrid. The return shape can be not backward compatible between these implementations."
- ),
-)
def depth_to_3d(depth: Tensor, camera_matrix: Tensor, normalize_points: bool = False) -> Tensor:
"""Compute a 3d point per pixel given its depth value and the camera intrinsics.