diff --git a/app/camera/__init__.py b/app/camera/__init__.py index 84ee773..174b682 100644 --- a/app/camera/__init__.py +++ b/app/camera/__init__.py @@ -155,6 +155,19 @@ def unproject_points_to_z_plane( pose_matrix: Float[Array, "4 4"], z: float = 0.0, ) -> Float[Array, "N 3"]: + """ + Un-project 2D points to 3D points on a plane at z = constant. + + Args: + points_2d: 2D points in pixel coordinates + K: Camera intrinsic matrix + dist_coeffs: Distortion coefficients + pose_matrix: Camera-to-World (C2W) transformation matrix + z: z-coordinate of the plane (default: 0.0, i.e. ground/horizon/floor plane) + + Returns: + [..., 3] world-space intersection points + """ plane_normal = jnp.array([0.0, 0.0, 1.0]) plane_point = jnp.array([0.0, 0.0, z]) return unproject_points_onto_plane( @@ -374,7 +387,14 @@ class Camera: self, points_2d: Num[Array, "N 2"], z: float = 0.0 ) -> Num[Array, "N 3"]: """ - Unproject 2D points to 3D points on a plane at z = constant. + Un-project 2D points to 3D points on a plane at z = constant. + + Args: + points_2d: 2D points in pixel coordinates + z: z-coordinate of the plane (default: 0.0, i.e. ground/horizon/floor plane) + + Returns: + [..., 3] world-space intersection points """ return unproject_points_to_z_plane( points_2d,