Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -140,6 +140,9 @@ def main(share=True):
|
|
| 140 |
|
| 141 |
depth_vis = (depth - depth.min()) / (depth.max() - depth.min() + 1e-5) * 255.0
|
| 142 |
depth_vis = depth_vis.astype(np.uint8)
|
|
|
|
|
|
|
|
|
|
| 143 |
colored_depth = (cmap(depth_vis)[:, :, :3] * 255).astype(np.uint8)
|
| 144 |
|
| 145 |
split_region = np.ones((image.shape[0], 50, 3), dtype=np.uint8) * 255
|
|
@@ -148,7 +151,7 @@ def main(share=True):
|
|
| 148 |
vis_path = os.path.join(output_path, 'image_depth_vis.png')
|
| 149 |
cv2.imwrite(vis_path, combined_result)
|
| 150 |
|
| 151 |
-
file_names = ["image_depth_vis.png", "raw_depth.npy", "pointcloud.ply"]
|
| 152 |
|
| 153 |
download_files = [
|
| 154 |
(output_path / name).as_posix()
|
|
|
|
| 140 |
|
| 141 |
depth_vis = (depth - depth.min()) / (depth.max() - depth.min() + 1e-5) * 255.0
|
| 142 |
depth_vis = depth_vis.astype(np.uint8)
|
| 143 |
+
gray_vis_path = os.path.join(output_path, 'image_depth_gray.png')
|
| 144 |
+
cv2.imwrite(gray_vis_path, depth_vis)
|
| 145 |
+
|
| 146 |
colored_depth = (cmap(depth_vis)[:, :, :3] * 255).astype(np.uint8)
|
| 147 |
|
| 148 |
split_region = np.ones((image.shape[0], 50, 3), dtype=np.uint8) * 255
|
|
|
|
| 151 |
vis_path = os.path.join(output_path, 'image_depth_vis.png')
|
| 152 |
cv2.imwrite(vis_path, combined_result)
|
| 153 |
|
| 154 |
+
file_names = ["image_depth_vis.png", "image_depth_gray.png", "raw_depth.npy", "pointcloud.ply"]
|
| 155 |
|
| 156 |
download_files = [
|
| 157 |
(output_path / name).as_posix()
|