Skip to content

Commit

Permalink
Use nan_mask when visualizing
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Feb 23, 2017
1 parent a0d0d4e commit f844244
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pascal3d/utils/visualization.py
Expand Up @@ -11,6 +11,7 @@ def colorize_depth(depth, min_value, max_value):
print('WARNING: max_value is inf.', file=sys.stderr)
colorized = depth.copy()
nan_mask = np.isnan(colorized)
colorized[nan_mask] = 0
colorized = 1. * (colorized - min_value) / (max_value - min_value)
colorized = matplotlib.cm.jet(colorized)[:, :, :3]
colorized = (colorized * 255).astype(np.uint8)
Expand Down

0 comments on commit f844244

Please sign in to comment.