Datasets:
jingyan wang
commited on
Commit
·
c6136d8
1
Parent(s):
27ecb57
change test_code
Browse files- test_code.py +7 -2
test_code.py
CHANGED
|
@@ -20,11 +20,16 @@ def draw_animation(id, rgb, depth, radar):
|
|
| 20 |
ax[1].set_title("RGB")
|
| 21 |
ax[1].imshow(rgb[frame])
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
ax[2].clear()
|
| 24 |
ax[2].set_title("Radar")
|
| 25 |
-
ax[2].imshow(
|
| 26 |
|
| 27 |
-
ani = FuncAnimation(fig, update, frames=len(depth), interval=
|
| 28 |
plt.show()
|
| 29 |
|
| 30 |
|
|
|
|
| 20 |
ax[1].set_title("RGB")
|
| 21 |
ax[1].imshow(rgb[frame])
|
| 22 |
|
| 23 |
+
radar_data = radar[frame]["spec_db_slice"][::-1]
|
| 24 |
+
radar_data = (radar_data - radar_data.min()) / (
|
| 25 |
+
radar_data.max() - radar_data.min()
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
ax[2].clear()
|
| 29 |
ax[2].set_title("Radar")
|
| 30 |
+
ax[2].imshow(radar_data, aspect="auto", cmap="jet")
|
| 31 |
|
| 32 |
+
ani = FuncAnimation(fig, update, frames=len(depth), interval=15)
|
| 33 |
plt.show()
|
| 34 |
|
| 35 |
|