Skip to content

Commit

Permalink
demo cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishad Gothoskar authored and littleredcomputer committed Feb 23, 2024
1 parent 3c199c3 commit 8399bf0
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 40 deletions.
4 changes: 2 additions & 2 deletions bayes3d/viz/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def get_depth_image(image, min_val=None, max_val=None, remove_max=True):
depth = np.array(image)

if max_val is None:
max_val = depth.max()
max_val = depth[depth < depth.max()].max()
if not remove_max:
max_val += 1
if min_val is None:
min_val = depth.min()
min_val = depth[depth > depth.min()].min()

mask = (depth < max_val) * (depth > min_val)
depth[np.logical_not(mask)] = np.nan
Expand Down
Loading

0 comments on commit 8399bf0

Please sign in to comment.