Skip to content

Commit

Permalink
fix(intrinsic_camera_calibrator): use desired camera model
Browse files Browse the repository at this point in the history
Signed-off-by: amadeuszsz <[email protected]>
  • Loading branch information
amadeuszsz committed Nov 11, 2024
1 parent 6943312 commit b266710
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from intrinsic_camera_calibrator.calibrators.utils import get_entropy
from intrinsic_camera_calibrator.camera_models.camera_model import CameraModel
from intrinsic_camera_calibrator.camera_models.camera_model import CameraModelEnum
from intrinsic_camera_calibrator.camera_models.camera_model_factory import make_camera_model
from intrinsic_camera_calibrator.data_collector import DataCollector
from intrinsic_camera_calibrator.parameter import Parameter
from intrinsic_camera_calibrator.parameter import ParameterizedClass
Expand Down Expand Up @@ -463,7 +464,10 @@ def _pre_rejection_filter_impl(
detection.get_flattened_image_points() for detection in sampled_detections
]

model = CameraModel()
model_cfg, model_type = self.get_model_info()
model = make_camera_model(model_type)
model.update_config(**model_cfg)

model.calibrate(
height=height,
width=width,
Expand Down

0 comments on commit b266710

Please sign in to comment.