Advanced level · Module 8: Introduction to SLAM and Robotics Vision · Lesson 1 of 3
Camera Models and Calibration
Learners calibrate a phone or webcam with a printed chessboard to estimate its intrinsic parameters and correct lens distortion.
In this lesson you will
- Explain the pinhole camera model
- Calibrate a camera and undistort images
Key concepts
pinhole modelfocal length and principal pointintrinsic matrixlens distortioncv2.calibrateCamera
The lesson
The pinhole model describes how 3D points project onto the image: the intrinsic matrix contains the focal lengths and the principal point. Real lenses add distortion, especially wide-angle phone cameras.
Calibration estimates these parameters from several photos of a known pattern. Print a chessboard, photograph it from 10–20 angles, find its corners with cv2.findChessboardCorners and run cv2.calibrateCamera.
cv2.undistort removes lens distortion. Calibration is needed for accurate measurement, visual odometry and SLAM.
Step by step
- Print a chessboard and take 15 photos from different angles.
- Detect corners and calibrate the camera.
- Report the intrinsic matrix and reprojection error.
- Undistort a wide-angle photo and compare.
Practice activity
Calibrate your phone camera and report its parameters and reprojection error.
Expected result: A calibrated camera with a low reprojection error and visibly corrected images.
Check your understanding
-
What does the intrinsic matrix contain?
Show answer
The focal lengths and the principal point.
-
Why calibrate a camera?
Show answer
To measure accurately and correct lens distortion.
Further learning
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.