From 65231674d3109677fb832062e49137faa710e29a Mon Sep 17 00:00:00 2001 From: Paul Lacroix <paul.lacroix@ecl21.ec-lyon.fr> Date: Tue, 28 Feb 2023 15:18:32 +0100 Subject: [PATCH] outils debug camerac --- PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py index cb8cf57..4cd5bdf 100644 --- a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py +++ b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py @@ -210,6 +210,10 @@ def get_position(boxes,commande,pos): liste_y.append(y) z_t = [] + cone_x = [] + cone_y = [] + + for i in range(len(liste_x)): z_t.append((liste_x[i], liste_y[i])) @@ -223,7 +227,12 @@ def get_position(boxes,commande,pos): pos_calc[1] += pos[i][1]*W[i] pos_calc[2] += pos[i][2]*W[i] - return pos_calc, pos + for i in range(len(liste_x)): + x,y = rotation((liste_x[i] ,liste_y[i]), (0,0), pos_calc[2]) + cone_x.append(x+pos_calc[0]) + cone_y.append(y+pos_calc[1]) + + return pos_calc, pos, cone_x, cone_y ''' -- GitLab