Update visualizer.py
Browse files- visualizer.py +20 -19
visualizer.py
CHANGED
@@ -289,25 +289,26 @@ class Visualizer:
|
|
289 |
# coord_ = coord[t,i]
|
290 |
# draw a red cross
|
291 |
# if gt_tracks[0] > 0 and gt_tracks[1] > 0:
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
|
|
311 |
res_video[t] = np.array(img)
|
312 |
|
313 |
# construct the final rgb sequence
|
|
|
289 |
# coord_ = coord[t,i]
|
290 |
# draw a red cross
|
291 |
# if gt_tracks[0] > 0 and gt_tracks[1] > 0:
|
292 |
+
if visibile:
|
293 |
+
length = self.linewidth * 3
|
294 |
+
coord_y = (int(coord[0]) + length, int(coord[1]) + length)
|
295 |
+
coord_x = (int(coord[0]) - length, int(coord[1]) - length)
|
296 |
+
rgb = draw_line(
|
297 |
+
img,
|
298 |
+
coord_y,
|
299 |
+
coord_x,
|
300 |
+
vector_colors[t, i].astype(int),
|
301 |
+
self.linewidth,
|
302 |
+
)
|
303 |
+
coord_y = (int(coord[0]) - length, int(coord[1]) + length)
|
304 |
+
coord_x = (int(coord[0]) + length, int(coord[1]) - length)
|
305 |
+
rgb = draw_line(
|
306 |
+
img,
|
307 |
+
coord_y,
|
308 |
+
coord_x,
|
309 |
+
vector_colors[t, i].astype(int),
|
310 |
+
self.linewidth,
|
311 |
+
)
|
312 |
res_video[t] = np.array(img)
|
313 |
|
314 |
# construct the final rgb sequence
|