Commit 9ece2a85 authored by Vincent POLLET's avatar Vincent POLLET
Browse files

Bugfix Type in intrinsics_guess in calibration.py

parent e57c4324
Pipeline #52669 failed with stages
in 13 minutes and 27 seconds
......@@ -336,6 +336,7 @@ def create_3Dpoints(pattern_size, square_size):
object_points *= square_size
return object_points
def get_valid_frames_for_intrinsic_calibration(detection_df, camera, pattern_type):
"""Filters the detection df to keep only the frames that allow to estimate the intrinsic parameters of `camera`.
......@@ -475,16 +476,10 @@ def compute_intrinsics(im_pts, image_size, params, obj_pts=None, ids=None, charu
cam_m, dist_coefs = None, None
if params["use_intrinsic_guess"]:
flags += cv2.CALIB_USE_INTRINSIC_GUESS
fx, fy = params["intrinsic_guess"]["f"]
cx, cy = params["intrinsic_guess"]["center_point"]
dist_coefs = params["intrinsic_guess"]["dist_coefs"]
cam_m = np.array(
[
[fx, 0, cx],
[0, fy, cy],
[0, 0, 1],
]
)
fx, fy = params["intrinsics_guess"]["f"]
cx, cy = params["intrinsics_guess"]["center_point"]
dist_coefs = np.array(params["intrinsics_guess"]["dist_coefs"])
cam_m = np.array([[fx, 0, cx], [0, fy, cy], [0, 0, 1],])
if params["fix_aspect_ratio"]:
flags += cv2.CALIB_FIX_ASPECT_RATIO
if params["fix_center_point"]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment