=== Summary ===
* Marker tracking using a pair of cameras is a common task, however setting up and calibrating the cameras can be challenging
* In the [[private:soro_adhesives|SoRo Adhesives]] project, we designed a stereo-vision setup; this setup can be adapted to different projects
* The scripts used are based on the work of Temuge Batpurev which is hosted on [[https://github.com/TemugeB/python_stereo_camera_calibrate?tab=readme-ov-file|GitHub]]
=== Key Points ===
* Camera calibration relies on acquiring images of a checkerboard using two cameras (see image below)
* This {{ :checkerboard.pptx |file}} can be used to generate checkerboards for calibration
* In the camera calibration function, you must set three parameters: rows, columns and world_scaling
* Rows and columns refer the number of "crosses" in each axis of the checkerboard
* In the image below: rows = 5
columns = 7
* Note that OpenCV will throw an error if the number of rows and columns is incorrect
* world_scaling is the physical dimension of a square on the checkerboard, it is up to you to choose the unit
* Checkerboard images are used to obtain the intrinsic matrices and distortion coefficients of each camera individually
* The camera calibration process also outputs a value related to the quality of the calibration (RMSE) which should be less than 0.30
* Note that both camera frames must have the __same__ dimensions for stereo calibration
{{ :checkerboard.jpg?200 |}}
* It is often important to define a world frame