- CameraConfig.set_lens_calibration(fn, chessboard_size=(9, 6), max_imgs=30, plot=True, progress_bar=True, **kwargs)[source]#
Calibrates and sets the properties
dist_coeffsusing a video of a chessboard pattern. Follows methods described on https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.html
fn (str) – path to video file
df (int, optional) – amount of frames to skip after a valid frame with corner points is found, defaults to fps of video.
chessboard_size (tuple, optional) – amount of internal corner points expected on chessboard pattern, default is (9, 6).
max_imgs (int, optional) – maximum amount of images to use for calibration (default: 30).
tolerance (float, optional) – error tolerance alowed for reprojection of corner points (default: 0.1, if set to None, no filtering will be done). images that exceed the tolerance are excluded from calibration. This is to remove images with spuriously defined points, or blurry images.
plot (bool, optional) – if set, chosen frames will be plotted for the user to inspect on-=the-fly with a one-second delay (default: True).
progress_bar (bool, optional) – if set, a progress bar going through the frames is plotted (default: True).