← Back to Projects ML/AI & Computer Vision

Camera Calibration & Marker-Based Augmented Reality

Built a complete camera calibration and marker-based AR pipeline using OpenCV. Estimated full camera pose from a checkerboard pattern and overlaid a virtual 3D prism anchored to the physical marker in real time.

View project report

Quick Insights:

Introduction

This project implements a classical computer vision AR system without deep learning. Using a printed checkerboard, the camera’s intrinsic matrix and distortion parameters were estimated. With these, the pose relative to the marker was recovered frame-by-frame and a virtual 3D prism was rendered at the correct physical location on the board.

Representative Code Snippet

// Estimate pose from checkerboard points
solvePnP(objectPoints, imagePoints,
         cameraMatrix, distCoeffs,
         rvec, tvec);

// Project 3D prism vertices into image space
projectPoints(prismVertices, rvec, tvec,
              cameraMatrix, distCoeffs,
              projected2D);

// Draw edges between projected points
for (auto &edge : prismEdges) {
    line(frame, projected2D[edge.first],
         projected2D[edge.second],
         Scalar(0, 255, 255), 2);
}

Why It Matters

This project recreates the core of ARKit/ARCore-style tracking using only geometry and OpenCV. It demonstrates practical understanding of camera projection, pose estimation and real-time rendering—all foundational skills for AR, robotics, SLAM and computer vision work.