From 592bfdfd086e4471b4a6754a882caa9ad62da07c Mon Sep 17 00:00:00 2001
From: Ouhouuhu <40174296+Ouhouuhu@users.noreply.github.com>
Date: Tue, 28 Feb 2023 15:44:06 +0100
Subject: [PATCH] adimensions des positions des cones

---
 PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py
index a5949a3..22ca2bd 100644
--- a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py	
+++ b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py	
@@ -203,7 +203,7 @@ def draw_bbox(image, bboxes,liste_pos_car, CLASSES=YOLO_COCO_CLASSES, show_label
     
     #Determination de la position de la voiture
     #speed with 10= 3.8/40
-    pos_car, liste_pos_car_temp = get_position(bboxes, (previous_command[0]*3.7/170, previous_command[1]/200*35/360*2*3.1415, previous_command[2]), liste_pos_car.liste)
+    pos_car, liste_pos_car_temp, cone_x, cone_y = get_position(bboxes, (previous_command[0]*3.7/170, previous_command[1]/200*35/360*2*3.1415, previous_command[2]), liste_pos_car.liste)
     liste_pos_car.update_liste(liste_pos_car_temp)
 
     """Algorithme de conduite"""
@@ -218,6 +218,9 @@ def draw_bbox(image, bboxes,liste_pos_car, CLASSES=YOLO_COCO_CLASSES, show_label
     track = Polygon(track_points)
     
     plt.plot(x_car, y_car,'+')
+    for x,y in zip(cone_x, cone_y):
+        x, y= (x-1.23855)/2.4+1, (y-0.889)/2.4+0.5
+        plt.plot(x,y,'*')
     plt.plot([i for i,j in track_points], [j for i,j in track_points])
     plt.show()
 
-- 
GitLab