Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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:
|