Spaces:
Configuration error
Configuration error
Update README.md
Browse files
README.md
CHANGED
|
@@ -328,15 +328,16 @@ order = np.argsort(-z) # far first
|
|
| 328 |
depth_map[v[order], u[order]] = z[order]
|
| 329 |
|
| 330 |
# Overlay on image (color by depth)
|
| 331 |
-
z_norm = np.clip(z / z.max(), 0, 1)
|
| 332 |
-
colors = cv2.applyColorMap(
|
| 333 |
for i in range(len(u)):
|
| 334 |
-
cv2.circle(img, (u[i], v[i]), 1, colors[i].tolist()
|
| 335 |
cv2.imwrite("depth_overlay.jpg", img)
|
| 336 |
```
|
| 337 |
|
| 338 |
**To transform to world coordinates:** chain `T_cam_to_rig` (from `sensor_to_trajectory_poses`) and `T_rig_to_world` (from interpolated trajectory at `ts + timestamp_offset`).
|
| 339 |
|
|
|
|
| 340 |
|
| 341 |
## 8. YOLO Bounding-Box Labels
|
| 342 |
|
|
|
|
| 328 |
depth_map[v[order], u[order]] = z[order]
|
| 329 |
|
| 330 |
# Overlay on image (color by depth)
|
| 331 |
+
z_norm = (np.clip(z / z.max(), 0, 1) * 255).astype(np.uint8)
|
| 332 |
+
colors = cv2.applyColorMap(z_norm.reshape(-1, 1), cv2.COLORMAP_TURBO).reshape(-1, 3)
|
| 333 |
for i in range(len(u)):
|
| 334 |
+
cv2.circle(img, (u[i], v[i]), 1, colors[i].tolist(), -1)
|
| 335 |
cv2.imwrite("depth_overlay.jpg", img)
|
| 336 |
```
|
| 337 |
|
| 338 |
**To transform to world coordinates:** chain `T_cam_to_rig` (from `sensor_to_trajectory_poses`) and `T_rig_to_world` (from interpolated trajectory at `ts + timestamp_offset`).
|
| 339 |
|
| 340 |
+
---
|
| 341 |
|
| 342 |
## 8. YOLO Bounding-Box Labels
|
| 343 |
|