mtwohey2 commited on
Commit
6278ae1
·
verified ·
1 Parent(s): 2a41939

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -46,8 +46,12 @@ def stitch_rgbd_videos(
46
  for i in range(min(len(full_frames), len(depths))):
47
  rgb_full = full_frames[i] # Full-resolution RGB frame.
48
  depth_frame = depths[i]
 
49
  # Normalize the depth frame to the range [0, 255].
50
- depth_norm = ((depth_frame - d_min) / (d_max - d_min) * 255).astype(np.uint8)
 
 
 
51
  # Generate depth visualization:
52
  if grayscale:
53
  if convert_from_color:
 
46
  for i in range(min(len(full_frames), len(depths))):
47
  rgb_full = full_frames[i] # Full-resolution RGB frame.
48
  depth_frame = depths[i]
49
+
50
  # Normalize the depth frame to the range [0, 255].
51
+ #depth_norm = ((depth_frame - d_min) / (d_max - d_min) * 255).astype(np.uint8)
52
+ depth_norm = cv2.normalize(depth_frame, None, alpha=0, beta=255, norm_type=cv2.NORM_MINMAX)
53
+ depth_norm = depth_norm.astype(np.uint8)
54
+
55
  # Generate depth visualization:
56
  if grayscale:
57
  if convert_from_color: