Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions training/data/dataset_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ def depth_to_cam_coords_points(
u, v = np.meshgrid(np.arange(W), np.arange(H))

# Unproject to camera coordinates
x_cam = (u - cu) * depth_map / fu
y_cam = (v - cv) * depth_map / fv
x_cam = (u - cu + .5) * depth_map / fu
y_cam = (v - cv + .5) * depth_map / fv
z_cam = depth_map

# Stack to form camera coordinates
Expand Down
4 changes: 2 additions & 2 deletions vggt/utils/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def depth_to_cam_coords_points(depth_map: np.ndarray, intrinsic: np.ndarray) ->
u, v = np.meshgrid(np.arange(W), np.arange(H))

# Unproject to camera coordinates
x_cam = (u - cu) * depth_map / fu
y_cam = (v - cv) * depth_map / fv
x_cam = (u - cu + .5) * depth_map / fu
y_cam = (v - cv + .5) * depth_map / fv
z_cam = depth_map

# Stack to form camera coordinates
Expand Down