From f3cff42d5cd807505ca4464f2f90ae08c7b12581 Mon Sep 17 00:00:00 2001 From: davidpagnon Date: Wed, 20 Sep 2023 15:32:10 +0200 Subject: [PATCH] solved bug when last point hidden --- Pose2Sim/calibration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Pose2Sim/calibration.py b/Pose2Sim/calibration.py index bd0634f..65a99f6 100644 --- a/Pose2Sim/calibration.py +++ b/Pose2Sim/calibration.py @@ -761,7 +761,8 @@ def imgp_objp_visualizer_clicker(img, imgp=[], objp=[], img_path=''): fig_3d.canvas.draw() elif count == len(objp)-1: # if all objp have been clicked or indicated as not visible, close all - imgp_confirmed = np.array(imgp, np.float32) + objp_confirmed = np.array([[objp[count]] if 'objp_confirmed' not in globals() else objp_confirmed+[objp[count]]][0])[:-1] + imgp_confirmed = np.expand_dims(scat.get_offsets(), axis=1) plt.close('all') for var_to_delete in ['events', 'count', 'scat', 'fig_3d', 'ax_3d', 'objp_confirmed_notok']: if var_to_delete in globals():