Design and implement a feature detector that allows you to robustly compare images with differences in position, orientation, and illumination.
This project implements Harris corner detection, feature description using simple and MOPS descriptors, and feature matching algorithms to identify corresponding points between images for applications like panorama stitching.
| Language: | Python with NumPy, SciPy, OpenCV |
| Key Concepts: | Harris corners, feature descriptors, matching algorithms |
The goal of feature detection and matching is to identify corresponding points between images that may have differences in position, orientation, and illumination. This forms the foundation for many computer vision applications including panorama stitching, object recognition, and structure from motion.
The project consists of three main components: detecting interest points using Harris corner detection, describing features using both simple and MOPS descriptors, and matching features using different distance metrics.
Harris corner detection identifies points in an image where there are significant changes in intensity in multiple directions. These points are robust to small translations and rotations.
Once interest points are detected, we need to create descriptors that characterize the local appearance around each point for matching purposes.
A 5×5 patch of pixel intensities around each keypoint. Simple but effective for images related by translation.
A more sophisticated approach that achieves rotation invariance:
The 40×40 → 8×8 transformation involves a sequence of operations:
Combined transformation: T = T₂ × S × R × T₁, applied using cv2.warpAffine
Why this works: By rotating the patch so the keypoint orientation points right, features become rotation-invariant. The scaling creates a compact 64-dimensional descriptor (8×8 = 64 values) that can be efficiently compared using distance metrics.
Implemented two distance metrics for finding corresponding features between images:
Direct Euclidean distance between feature vectors. Simple but can be sensitive to illumination changes.
Compares the distance to the best match with the distance to the second-best match. More robust to ambiguous matches.
Successfully implemented all three components and evaluated performance on the Yosemite benchmark dataset.
Evaluated four different combinations of descriptors and distance metrics:
AUC Score
AUC Score
AUC Score
AUC Score ⭐
Best Method: MOPS descriptor with Ratio test distance provides the best performance due to rotation invariance and robust matching criteria.
Image Stitching: Feature correspondences enable panorama creation by finding overlapping regions
Object Recognition: Matching features across different views of the same object
Structure from Motion: Reconstructing 3D scene geometry from multiple 2D images
Visual SLAM: Simultaneous localization and mapping for robotics and AR applications