@@ -898,7 +898,7 @@ def make_mot_with_angles(angles, time, mot_path):
898
898
return angles
899
899
900
900
901
- def pose_plots (trc_data_unfiltered , trc_data ):
901
+ def pose_plots (trc_data_unfiltered , trc_data , person_id ):
902
902
'''
903
903
Displays trc filtered and unfiltered data for comparison
904
904
/!\ Often crashes on the third window...
@@ -917,9 +917,12 @@ def pose_plots(trc_data_unfiltered, trc_data):
917
917
keypoints_names = trc_data .columns [1 ::3 ]
918
918
919
919
pw = plotWindow ()
920
+ pw .MainWindow .setWindowTitle ('Person' + str (person_id ) + ' coordinates' ) # Main title
921
+
920
922
for id , keypoint in enumerate (keypoints_names ):
921
923
f = plt .figure ()
922
-
924
+ f .canvas .manager .window .setWindowTitle (keypoint + ' Plot' )
925
+
923
926
axX = plt .subplot (211 )
924
927
plt .plot (trc_data_unfiltered .iloc [:,0 ], trc_data_unfiltered .iloc [:,id * 3 + 1 ], label = 'unfiltered' )
925
928
plt .plot (trc_data .iloc [:,0 ], trc_data .iloc [:,id * 3 + 1 ], label = 'filtered' )
@@ -938,7 +941,7 @@ def pose_plots(trc_data_unfiltered, trc_data):
938
941
pw .show ()
939
942
940
943
941
- def angle_plots (angle_data_unfiltered , angle_data ):
944
+ def angle_plots (angle_data_unfiltered , angle_data , person_id ):
942
945
'''
943
946
Displays angle filtered and unfiltered data for comparison
944
947
/!\ Often crashes on the third window...
@@ -957,6 +960,8 @@ def angle_plots(angle_data_unfiltered, angle_data):
957
960
angles_names = angle_data .columns [1 :]
958
961
959
962
pw = plotWindow ()
963
+ pw .MainWindow .setWindowTitle ('Person' + str (person_id ) + ' angles' ) # Main title
964
+
960
965
for id , angle in enumerate (angles_names ):
961
966
f = plt .figure ()
962
967
@@ -1320,7 +1325,7 @@ def process_fun(config_dict, video_file, time_range, frame_rate, result_dir):
1320
1325
if show_plots :
1321
1326
trc_data_unfiltered = pd .concat ([pd .concat ([all_frames_X_person .iloc [:,kpt ], all_frames_Y_person .iloc [:,kpt ], all_frames_Z_person .iloc [:,kpt ]], axis = 1 ) for kpt in range (len (all_frames_X_person .columns ))], axis = 1 )
1322
1327
trc_data_unfiltered .insert (0 , 't' , all_frames_time )
1323
- pose_plots (trc_data_unfiltered , trc_data )
1328
+ pose_plots (trc_data_unfiltered , trc_data , i ) # i = current person
1324
1329
1325
1330
1326
1331
# Angles post-processing
@@ -1385,4 +1390,4 @@ def process_fun(config_dict, video_file, time_range, frame_rate, result_dir):
1385
1390
# Plotting angles before and after interpolation and filtering
1386
1391
if show_plots :
1387
1392
all_frames_angles_person .insert (0 , 't' , all_frames_time )
1388
- angle_plots (all_frames_angles_person , angle_data )
1393
+ angle_plots (all_frames_angles_person , angle_data , i ) # i = current person
0 commit comments