How it works
To calibrate a stereo pair using OpenCV, one must capture a few photos of a calibration pattern simultaneously from both cameras. In our case, we used a 9x6 chessboard. We used the cv2.findChessboardCorners function to find corners of the board which we will use for rig parameters estimation. We also need calibration pattern points in its local coordinate system. Since we know the size of the pattern and its shape, we can explicitly construct the list of points—pattern_points. Note that the units used here will be used for the translation vector between two cameras.
The calibration itself is performed in the cv2.stereoCalibrate function. As input, it takes a list of image points and a list of pattern points. You can also specify ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access