features
8 posts · browse all tags
Fundamentals Lowe's Ratio Test: Matching Features You Can Trust
How SIFT matches points between two photos: pair each descriptor with its nearest neighbour, then keep the pair only when the second-nearest is clearly farther. On the Barcelona harbour pair, scored against a homography fitted by a different detector, the ratio test at 0.75 keeps 440 matches of which 420 are right; an absolute distance threshold tuned to keep the same 440 gets 391 right. Built in NumPy and checked against OpenCV's BFMatcher.
Fundamentals Scale Space and the Difference of Gaussians
Scale space is a stack of copies of a photo, each blurred a little more, which lets a detector find features of every size and say how big each one is. Discs of radius 4, 8 and 16 px answer most strongly at a blur of 2.77, 5.61 and 11.34 px, close to r/√2; subtracting neighbouring blurs reproduces the scale-normalized Laplacian with a correlation of 0.99; and on a harbour photo SIFT's 9 octaves give each point a size that halves when the photo does.
Fundamentals The SIFT Descriptor: 128 Numbers per Keypoint
How SIFT describes the neighbourhood of a keypoint with 128 numbers that come out the same in another photo: gradient histograms on a 4×4 grid, turned to the keypoint's own direction, normalized and clipped. Each step tested by removing it on a photo of Barcelona harbour: without the direction, matches against a copy turned 45° fall from 1,927 correct to 0; without normalization, a contrast change takes them from 907 to 146.
Fundamentals How SIFT Finds Keypoints: Extrema, Refinement, Orientation
How SIFT turns a stack of blurred photos into a short list of points it can find again: every point that beats its 26 neighbours, a sub-pixel fit, a contrast test, an edge test and a direction for each survivor. Built from scratch on a photo of Barcelona harbour, where 7,053 candidates become 2,896 points and 3,510 keypoints, and checked against OpenCV keypoint for keypoint.
Fundamentals What Makes a Good Keypoint? Repeatability, Measured
A good keypoint is one a detector finds again in another photo of the same scene, in the same place and at the same size. Measured on a harbour photo under known turns, zooms, blur and noise: on position alone Harris corners and SIFT points come back about equally often, and which one leads depends on the tolerance; what SIFT adds is a size that follows the zoom, which takes correct matches across a 2× zoom from 1 to 294.
Fundamentals Corners: The Structure Tensor, Harris, Shi-Tomasi and Förstner
A contour says where a boundary runs but not where you are along it. Two eigenvalues of a 2x2 matrix fix that: measured on a real photo, flat background scores 0.001/0.000, an edge 0.411/0.019 and a corner 0.442/0.318. Harris, Shi-Tomasi and Förstner all read that same matrix, and on the edge patch Harris comes out positive at k = 0.04 and negative at k = 0.06, so k decides the answer rather than the data.
Fundamentals What Is SIFT? Finding the Same Point in Two Photos
SIFT finds points in one photo that can be found again in another photo of the same scene, and describes each with 128 numbers so the two can be paired. One pipeline, from blurring at many sizes to keeping only the unambiguous pairs, run on two photos of Barcelona harbour and scored against a homography fitted by a different detector: 420 of the 440 pairs it keeps are right, and the five lessons take each step apart.
Fundamentals Structure from Motion, from Scratch: 47 Photos to a 3-D Temple in ~800 Lines of Python
How overlapping 2-D photos become 3-D points and camera poses: SIFT matching, the essential matrix, triangulation, PnP growth, and sparse bundle adjustment, built from scratch with OpenCV + SciPy. The pipeline registers all 47 Middlebury temple views at 0.25 px mean reprojection error, next to COLMAP's 0.30 px on the same images. Worked examples, three interactive labs, and the reconstruction growing image by image.