Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.ip.stereo
Commits
9ece2a85
Commit
9ece2a85
authored
Jul 23, 2021
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/ip/stereo/calibration.py
View file @
9ece2a85
...
...
@@ -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"
]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment