Skip to content

Commit

Permalink
refactor: cached model restarts inside class
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioReyesSan committed Jan 17, 2025
1 parent 96d89a3 commit bada59d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def on_evaluation_sample_changed(index):
self.process_db_data(img)

def on_rectify_type_change(index):
self.calibrated_camera_model._cached_undistorted_model = None
self.calibrated_camera_model.restart_camera_cached_model()

self.pause_button.clicked.connect(pause_callback)
self.image_view_type_combobox.currentIndexChanged.connect(on_image_view_type_change)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ def _calibrate_impl(
def _update_config_impl(self, **kwargs):
"""Abstract method to update the camera model configuration."""
raise NotImplementedError

def restart_camera_cached_model(self):
"""Restarts the current cached camera model"""
self._cached_undistorted_model = None


class CameraModelWithBoardDistortion(CameraModel):
Expand Down

0 comments on commit bada59d

Please sign in to comment.