From 8b331c642247ec1d599234af028ecaaacfacd69d Mon Sep 17 00:00:00 2001 From: Alexander Kharin <42934906+Alexankharin@users.noreply.github.com> Date: Tue, 10 Jun 2025 20:59:39 +0200 Subject: [PATCH] fix bug for projection of pointcloud to equirect --- pointcloud_nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pointcloud_nodes.py b/pointcloud_nodes.py index 0ee35bd..c4ee283 100644 --- a/pointcloud_nodes.py +++ b/pointcloud_nodes.py @@ -113,7 +113,7 @@ def XYZ_to_equirect(X: torch.Tensor, Y: torch.Tensor, Z: torch.Tensor, fov: floa Convert XYZ coordinates to normalized UV and depth using equirectangular projection. """ # full 360°×180° - fov_rad = math.radians(fov) + fov_rad = math.radians(fov) / 2 depth = torch.sqrt(X**2 + Y**2 + Z**2) lon = torch.atan2(X, Z) # –π → +π lat = torch.asin(Y / depth) # –π/2 → +π/2