top of page

Create Your First Project

Start adding your projects to your portfolio. Click on "Manage Projects" to get started

AutoCalib: Automatic Camera Calibration via Zhang's Method

Project type

University course project

Date

February 2026

Location

Worcester, MA

Here's the portfolio-ready write-up for the camera calibration project:

AutoCalib: Automatic Camera Calibration via Zhang's Method
Worcester Polytechnic Institute | Computer Vision
Tech stack: Python, OpenCV, NumPy, SciPy, Levenberg-Marquardt Optimization
A from-scratch implementation of Zhengyou Zhang's seminal camera calibration method (Microsoft Research, 1998) — one of the most widely used techniques in computer vision for recovering camera intrinsics and lens distortion from a planar checkerboard target. Built the complete pipeline from corner detection through non-linear geometric error minimization to estimate focal lengths (fₓ, f_y), principal point (cₓ, c_y), and radial distortion coefficients (k₁, k₂) from 13 images of a printed checkerboard captured on a Google Pixel XL.
Highlights

Detected sub-pixel checkerboard corners across all calibration images using cv2.findChessboardCorners with corner refinement, establishing 2D-3D correspondences against the known 21.5 mm square geometry.
Estimated per-image homographies between the planar target and image plane, then derived constraints on the image of the absolute conic (B = K⁻ᵀK⁻¹) using Zhang's closed-form formulation.
Solved for the initial camera intrinsic matrix K via SVD on the stacked V-matrix system, then recovered per-image extrinsics (R, t) from each homography using the estimated K.
Initialized radial distortion as k = [0, 0]ᵀ under the small-distortion assumption, providing a good starting point for the non-linear refinement.
Implemented non-linear geometric error minimization using scipy.optimize.least_squares (Levenberg-Marquardt) to jointly refine all 7 intrinsic parameters plus per-image extrinsics, minimizing the reprojection error including the radial distortion model:

Good things take time

bottom of page