mtwohey2 commited on
Commit
e0d775a
·
verified ·
1 Parent(s): c528f77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -57,14 +57,14 @@ def stitch_rgbd_videos(
57
  cmap = matplotlib.colormaps.get_cmap("inferno")
58
  depth_color = (cmap(depth_norm / 255.0)[..., :3] * 255).astype(np.uint8)
59
 
60
- #if len(depth_color.shape) == 3 and depth_color.shape[2] in [3, 4]:
61
- # depth_gray = cv2.cvtColor(depth_color, cv2.COLOR_RGB2GRAY)
62
- #else:
63
- # depth_gray = depth_color
64
- #depth_vis = np.stack([depth_gray] * 3, axis=-1)
65
-
66
- depth_gray = cv2.cvtColor(depth_color, cv2.COLOR_RGB2GRAY)
67
  depth_vis = np.stack([depth_gray] * 3, axis=-1)
 
 
 
68
  else:
69
  # Directly generate a grayscale image from the normalized depth values.
70
  depth_vis = np.stack([depth_norm] * 3, axis=-1)
 
57
  cmap = matplotlib.colormaps.get_cmap("inferno")
58
  depth_color = (cmap(depth_norm / 255.0)[..., :3] * 255).astype(np.uint8)
59
 
60
+ if len(depth_color.shape) == 3 and depth_color.shape[2] in [3, 4]:
61
+ depth_gray = cv2.cvtColor(depth_color, cv2.COLOR_RGB2GRAY)
62
+ else:
63
+ depth_gray = depth_color
 
 
 
64
  depth_vis = np.stack([depth_gray] * 3, axis=-1)
65
+
66
+ #depth_gray = cv2.cvtColor(depth_color, cv2.COLOR_RGB2GRAY)
67
+ #depth_vis = np.stack([depth_gray] * 3, axis=-1)
68
  else:
69
  # Directly generate a grayscale image from the normalized depth values.
70
  depth_vis = np.stack([depth_norm] * 3, axis=-1)