730 likes | 745 Views
This tutorial explores the main components of local feature detection, extraction of feature descriptors, and matching of feature vectors for correspondence using the concepts of motion illusion and rotating snakes.
E N D
Local features: main components • Detection:Find a set of distinctive key points. • Description: Extract feature descriptor around each interest point as vector. • Matching: Compute distance between feature vectors to find correspondence. K. Grauman, B. Leibe
Review: Harris corner detector • Approximate distinctiveness by local auto-correlation. • Approximate local auto-correlation by second moment matrix M. • Distinctiveness (or cornerness) relates to the eigenvalues of M. • Instead of computing eigenvaluesdirectly, we can use determinant and trace of M. • E(u, v) • (max)-1/2 • (min)-1/2 James Hays
Trace / determinant and eigenvalues • Given n x n matrix A with eigenvalues λ1…n • R = λ1λ2 – α(λ1+λ2)2 = det(M) – αtrace(M)2
Affine intensity change • Intensity scaling:I aI • R • R • Threshold • x(image coordinate) • x(image coordinate) • I aI + b • Only derivatives are used => invariance to intensity shiftI I+b • Partially invariant to affine intensity change James Hays
Image translation • Derivatives and window function are shift-invariant. • Corner location is covariant w.r.t. translation James Hays
Image rotation • Second moment ellipse rotates but its shape (i.e., eigenvalues) remains the same. • Corner location is covariant w.r.t. rotation James Hays
Scaling • Corner • All points will be classified as edges • Corner location is not covariant to scaling! James Hays
Automatic Scale Selection How to find patch sizes at which f response is equal? What is a good f ? K. Grauman, B. Leibe
Automatic Scale Selection • Function responses for increasing scale (scale signature) Response of some function f K. Grauman, B. Leibe
Automatic Scale Selection • Function responses for increasing scale (scale signature) Response of some function f K. Grauman, B. Leibe
Automatic Scale Selection • Function responses for increasing scale (scale signature) Response of some function f K. Grauman, B. Leibe
Automatic Scale Selection • Function responses for increasing scale (scale signature) Response of some function f K. Grauman, B. Leibe
Automatic Scale Selection • Function responses for increasing scale (scale signature) Response of some function f K. Grauman, B. Leibe
Automatic Scale Selection • Function responses for increasing scale (scale signature) Response of some function f K. Grauman, B. Leibe
What Is A Useful Signature Function f ? 1st Derivative of Gaussian (Laplacian of Gaussian) Earl F. Glynn
What Is A Useful Signature Function f ? • “Blob” detector is common for corners • - Laplacian (2nd derivative) of Gaussian (LoG) Scale space Function response Image blob size K. Grauman, B. Leibe
Find local maxima in position-scale space s5 Find maxima s4 s3 List of(x, y, s) s2 s K. Grauman, B. Leibe
Alternative approach Approximate LoG with Difference-of-Gaussian (DoG). Ruye Wang
Alternative approach Approximate LoG with Difference-of-Gaussian (DoG). 1. Blur image with σ Gaussian kernel 2. Blur image with kσ Gaussian kernel 3. Subtract 2. from 1. = - K. Grauman, B. Leibe
Find local maxima in position-scale space of DoG Find maxima … … ks 2ks - = s List of(x, y, s) - = ks - = s K. Grauman, B. Leibe Input image
Results: Difference-of-Gaussian • Larger circles = larger scale • Descriptors with maximal scale response K. Grauman, B. Leibe
Maximally Stable Extremal Regions [Matas ‘02] • Based on Watershed segmentation algorithm • Select regions that stay stable over a large parameter range K. Grauman, B. Leibe
Example Results: MSER K. Grauman, B. Leibe
Review: Interest points • Keypoint detection: repeatable and distinctive • Corners, blobs, stable regions • Harris, DoG, MSER
Review: Choosing an interest point detector • Why choose? • Collect more points with more detectors, for more possible matches • What do you want it for? • Precise localization in x-y: Harris • Good localization in scale: Difference of Gaussian • Flexible region shape: MSER • Best choice often application dependent • Harris-/Hessian-Laplace/DoG work well for many natural categories • MSER works well for buildings and printed things • There have been extensive evaluations/comparisons • [Mikolajczyk et al., IJCV’05, PAMI’05] • All detectors/descriptors shown here work well
Comparison of Keypoint Detectors TuytelaarsMikolajczyk 2008
Local Image Descriptors Read Szeliski 4.1 Acknowledgment: Many slides from James Hays, Derek Hoiem and Grauman & Leibe 2008 AAAI Tutorial
Local features: main components • Detection:Find a set of distinctive key points. • Description: Extract feature descriptor around each interest point as vector. • Matching: Compute distance between feature vectors to find correspondence. K. Grauman, B. Leibe
Image Representations: Histograms Global histogram to represent distribution of features • Color, texture, depth, … Local histogram per detected point Space Shuttle Cargo Bay Images from Dave Kauchak
For what things do we compute histograms? • Color • Model local appearance L*a*b* color space HSV color space James Hays
For what things do we compute histograms? • Texture • Local histograms of oriented gradients • SIFT: Scale Invariant Feature Transform • Extremely popular (40k citations) SIFT – Lowe IJCV 2004 James Hays
SIFT • Find Difference of Gaussian scale-space extrema • Post-processing • Position interpolation • Discard low-contrast points • Eliminate points along edges
SIFT • Find Difference of Gaussian scale-space extrema • Post-processing • Position interpolation • Discard low-contrast points • Eliminate points along edges • Orientation estimation
SIFT Orientation Normalization p 2 0 • Compute orientation histogram • Select dominant orientation ϴ • Normalize: rotate to fixed orientation p 2 0 T. Tuytelaars, B. Leibe [Lowe, SIFT, 1999]
SIFT • Find Difference of Gaussian scale-space extrema • Post-processing • Position interpolation • Discard low-contrast points • Eliminate points along edges • Orientation estimation • Descriptor extraction • Motivation: We want some sensitivity to spatial layout, but not too much, so blocks of histograms give us that.
SIFT Descriptor Extraction • Given a keypoint with scale and orientation: • Pick scale-space image which most closely matches estimated scale • Resample image to match orientation OR • Subtract detector orientation from vector to give invariance to general image rotation.
SIFT Orientation Normalization p 2 0 • Compute orientation histogram • Select dominant orientation ϴ • Normalize: rotate to fixed orientation p 2 0 T. Tuytelaars, B. Leibe [Lowe, SIFT, 1999]
SIFT Descriptor Extraction • Given a keypoint with scale and orientation Gradient magnitude and orientation 8 bin ‘histogram’ - add magnitude amounts! Utkarsh Sinha
SIFT Descriptor Extraction • Within each 4x4 window Gradient magnitude and orientation 8 bin ‘histogram’ - add magnitude amounts! Weight magnitude that is added to ‘histogram’ by Gaussian Utkarsh Sinha
SIFT Descriptor Extraction • Extract 8 x 16 values into 128-dim vector • Illumination invariance: • Working in gradient space, so robust to I = I + b • Normalize vector to [0…1] • Robust to I = αI brightness changes • Clamp all vector values > 0.2 to 0.2. • Robust to “non-linear illumination effects” • Image value saturation / specular highlights • Renormalize
SIFT-like descriptor in Project 2 • SIFT is hand designed based on intuition • You implement your own SIFT-like descriptor • Ignore scale/orientation to start. • Parameters: stick with defaults + minor tweaks • Feel free to look at papers / resources for inspiration 2017 Spring TA Martin Zhu recommends this tutorial: http://aishack.in/tutorials/sift-scale-invariant-feature-transform-features/ Lowe’s original paper: http://www.cs.ubc.ca/~lowe/papers/ijcv04.pdf
Efficient Implementation • Filter using oriented kernels based on directions of histogram bins. • Called ‘steerable filters’
Local Descriptors: SURF • Fast approximation of SIFT idea • Efficient computation by 2D box filters & integral images 6 times faster than SIFT • Equivalent quality for object identification • GPU implementation available • Feature extraction @ 200Hz(detector + descriptor, 640×480 img) • http://www.vision.ee.ethz.ch/~surf [Bay, ECCV’06], [Cornelis, CVGPU’08] K. Grauman, B. Leibe
Local Descriptors: Shape Context Count the number of points inside each bin, e.g.: Count = 4 ... Count = 10 Log-polar binning: More precision for nearby points, more flexibility for farther points. Belongie & Malik, ICCV 2001 K. Grauman, B. Leibe