Skip to content

Commit e77c562

Browse files
committed
Main title
1 parent c5c76ba commit e77c562

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Sports2D/process.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ def make_mot_with_angles(angles, time, mot_path):
898898
return angles
899899

900900

901-
def pose_plots(trc_data_unfiltered, trc_data):
901+
def pose_plots(trc_data_unfiltered, trc_data, person_id):
902902
'''
903903
Displays trc filtered and unfiltered data for comparison
904904
/!\ Often crashes on the third window...
@@ -917,9 +917,12 @@ def pose_plots(trc_data_unfiltered, trc_data):
917917
keypoints_names = trc_data.columns[1::3]
918918

919919
pw = plotWindow()
920+
pw.MainWindow.setWindowTitle('Person'+ str(person_id) + ' coordinates') # Main title
921+
920922
for id, keypoint in enumerate(keypoints_names):
921923
f = plt.figure()
922-
924+
f.canvas.manager.window.setWindowTitle(keypoint + ' Plot')
925+
923926
axX = plt.subplot(211)
924927
plt.plot(trc_data_unfiltered.iloc[:,0], trc_data_unfiltered.iloc[:,id*3+1], label='unfiltered')
925928
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):
938941
pw.show()
939942

940943

941-
def angle_plots(angle_data_unfiltered, angle_data):
944+
def angle_plots(angle_data_unfiltered, angle_data, person_id):
942945
'''
943946
Displays angle filtered and unfiltered data for comparison
944947
/!\ Often crashes on the third window...
@@ -957,6 +960,8 @@ def angle_plots(angle_data_unfiltered, angle_data):
957960
angles_names = angle_data.columns[1:]
958961

959962
pw = plotWindow()
963+
pw.MainWindow.setWindowTitle('Person'+ str(person_id) + ' angles') # Main title
964+
960965
for id, angle in enumerate(angles_names):
961966
f = plt.figure()
962967

@@ -1320,7 +1325,7 @@ def process_fun(config_dict, video_file, time_range, frame_rate, result_dir):
13201325
if show_plots:
13211326
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)
13221327
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
13241329

13251330

13261331
# Angles post-processing
@@ -1385,4 +1390,4 @@ def process_fun(config_dict, video_file, time_range, frame_rate, result_dir):
13851390
# Plotting angles before and after interpolation and filtering
13861391
if show_plots:
13871392
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

Comments
 (0)