Skip to content

Commit

Permalink
Close figures once saved
Browse files Browse the repository at this point in the history
  • Loading branch information
BAILOOL committed Jun 12, 2024
1 parent 773ef21 commit 5e28b01
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python_utils/compute_error_statistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def visualize_and_save_results(
plt.ylabel("Mean reprojection error")
plt.title("Mean error per frame")
plt.show()

plt.savefig(reprojection_error_data_path / "mean_reprojection_error_per_frame.png")
plt.close()


def compute_error_statistic(reprojection_error_data_path: Path) -> None:
Expand Down
3 changes: 2 additions & 1 deletion python_utils/compute_pose_error_vs_gt.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ def compute_pose_error_vs_gt(
ax.set_xlabel("X")
ax.set_ylabel("Y")
ax.set_zlabel("Z")
plt.savefig(calibrated_cameras_data.parent / "pose_error_vs_gt.png")
plt.show()
plt.savefig(calibrated_cameras_data.parent / "pose_error_vs_gt.png")
plt.close()


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion python_utils/display_calib_cameras.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ def display_calib_cameras(calib_cameras_data_path: Path) -> None:

prepare_figure(ax)
plt.show()

plt.savefig(calib_cameras_data_path.parent / "cameras_calib.png")
plt.close()


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion python_utils/display_calib_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def display_calib_object(calib_object_data_path: Path) -> None:

prepare_figure(ax)
plt.show()

plt.savefig(calib_object_data_path.parent / "calibrated_object.png")
plt.close()


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion python_utils/display_cam_obj_pose.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def display_cam_obj_pose(calib_data: Path) -> None:

axis_equal_3d(ax)
plt.show()

plt.savefig(calib_data / "cam_obj_pose.png")
plt.close()


if __name__ == "__main__":
Expand Down

0 comments on commit 5e28b01

Please sign in to comment.