This repository contains implementations of camera calibration techniques and height estimation algorithms using computer vision principles. The project demonstrates practical applications of camera geometry, projective transformations, and 3D-to-2D point correspondences. The exercises are based on course content for CS436/5310/EE513 - Fall 2024 Computer Vision and cover practical simulations related to focal length and camera positioning.
- Objective: Constructed a camera matrix and project 3D points to the image plane.
- Definedand implement helper functions to:
- Generated a camera matrix.
- Visualized the camera in 3D space using matplotlib.
- Displayed the projection results.
- Encapsulated logic for setting up the camera matrix.
- Handled point projection and 3D plotting.
- Objective: Study how varying focal lengths affect the image.
- Task:
- Generate images using different focal lengths.
- Visualize how perspective changes with focal length.
- Objective: Analyze how camera translations influence the captured scene.
- Task:
- Move the camera to different positions.
- Compare projections and draw insights.
-
Python 3.x
-
NumPy
-
Matplotlib
-
Jupyter Notebook
-
Camera Matrix Computation: Calculate camera intrinsic and extrinsic parameters from 3D-2D point correspondences
-
Height Estimation: Estimate object heights using known reference objects and vanishing point geometry
- Interactive Point Selection: Custom GUI tools for marking points on images
- Camera Matrix Calculation: Compute projection matrix
Pusing SVD decomposition - Matrix Decomposition: Extract intrinsic (
K), rotation (R), and translation (t) components - Reprojection Error Analysis: Validate calibration accuracy through point reprojection
- Height Estimation: Implement Algorithm 8.1 for measuring object heights from single images
import numpy as np
import cv2
import matplotlib.pyplot as plt