Skip to content

Commit

Permalink
fix(camera): Fixes depth_via_raytracing with return_dist=True
Browse files Browse the repository at this point in the history
  • Loading branch information
cornerfarmer authored Feb 12, 2024
1 parent 76621a1 commit 867283f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blenderproc/python/camera/CameraProjection.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def depth_via_raytracing(bvh_tree: BVHTree, frame: Optional[int] = None, return_
dists = np.reshape(dists, [resolution_y, resolution_x])

if not return_dist:
depth = dist2depth(dists)
return depth
return dist2depth(dists)
else:
return dists

def unproject_points(points_2d: np.ndarray, depth: np.ndarray, frame: Optional[int] = None, depth_cut_off: float = 1e6) -> np.ndarray:
""" Unproject 2D points into 3D
Expand Down

0 comments on commit 867283f

Please sign in to comment.