Harris Corner Detector & Scale Invariant Feature Transform (SIFT)

Slides:



Advertisements
Similar presentations
Distinctive Image Features from Scale-Invariant Keypoints
Advertisements

Feature extraction: Corners
Feature Detection. Description Localization More Points Robust to occlusion Works with less texture More Repeatable Robust detection Precise localization.
Feature points extraction Many slides are courtesy of Darya Frolova, Denis Simakov A low level building block in many applications: Structure from motion.
CSE 473/573 Computer Vision and Image Processing (CVIP)
The SIFT (Scale Invariant Feature Transform) Detector and Descriptor
TP14 - Local features: detection and description Computer Vision, FCUP, 2014 Miguel Coimbra Slides by Prof. Kristen Grauman.
CSE 473/573 Computer Vision and Image Processing (CVIP)
Distinctive Image Features from Scale- Invariant Keypoints Mohammad-Amin Ahantab Technische Universität München, Germany.
Matching with Invariant Features
Computational Photography
Invariant Features.
Algorithms and Applications in Computer Vision
Feature extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
Harris corner detector
Lecture 6: Feature matching CS4670: Computer Vision Noah Snavely.
Lecture 4: Feature matching
Automatic Image Alignment (feature-based) : Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and.
Feature extraction: Corners and blobs
Distinctive image features from scale-invariant keypoints. David G. Lowe, Int. Journal of Computer Vision, 60, 2 (2004), pp Presented by: Shalomi.
Scale Invariant Feature Transform (SIFT)
Automatic Matching of Multi-View Images
Image Features: Descriptors and matching
SIFT - The Scale Invariant Feature Transform Distinctive image features from scale-invariant keypoints. David G. Lowe, International Journal of Computer.
Blob detection.
Lecture 3a: Feature detection and matching CS6670: Computer Vision Noah Snavely.
Automatic Image Alignment (feature-based) : Computational Photography Alexei Efros, CMU, Fall 2006 with a lot of slides stolen from Steve Seitz and.
1 Image Features Hao Jiang Sept Image Matching 2.
CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection.
CS4670: Computer Vision Kavita Bala Lecture 8: Scale invariance.
Distinctive Image Features from Scale-Invariant Keypoints David G. Lowe – IJCV 2004 Brien Flewelling CPSC 643 Presentation 1.
Scale-Invariant Feature Transform (SIFT) Jinxiang Chai.
Overview Introduction to local features
Overview Harris interest points Comparing interest points (SSD, ZNCC, SIFT) Scale & affine invariant interest points Evaluation and comparison of different.
Local Invariant Features This is a compilation of slides by: Darya Frolova, Denis Simakov,The Weizmann Institute of Science Jiri Matas, Martin Urban Center.
Feature Detection. Image features Global features –global properties of an image, including intensity histogram, frequency domain descriptors, covariance.
Reporter: Fei-Fei Chen. Wide-baseline matching Object recognition Texture recognition Scene classification Robot wandering Motion tracking.
CSE 185 Introduction to Computer Vision Local Invariant Features.
Feature extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Lecture 7: Features Part 2 CS4670/5670: Computer Vision Noah Snavely.
Distinctive Image Features from Scale-Invariant Keypoints Ronnie Bajwa Sameer Pawar * * Adapted from slides found online by Michael Kowalski, Lehigh University.
Notes on the Harris Detector
Features Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/15 with slides by Trevor Darrell Cordelia Schmid, David Lowe, Darya Frolova, Denis Simakov,
Distinctive Image Features from Scale-Invariant Keypoints David Lowe Presented by Tony X. Han March 11, 2008.
Feature extraction: Corners and blobs. Why extract features? Motivation: panorama stitching We have two images – how do we combine them?
Matching features Computational Photography, Prof. Bill Freeman April 11, 2006 Image and shape descriptors: Harris corner detectors and SIFT features.
A Tutorial on using SIFT Presented by Jimmy Huff (Slightly modified by Josiah Yoder for Winter )
Features Jan-Michael Frahm.
CS654: Digital Image Analysis
Presented by David Lee 3/20/2006
CSE 185 Introduction to Computer Vision Local Invariant Features.
Keypoint extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
Blob detection.
Invariant Local Features Image content is transformed into local feature coordinates that are invariant to translation, rotation, scale, and other imaging.
Interest Points EE/CSE 576 Linda Shapiro.
Presented by David Lee 3/20/2006
Distinctive Image Features from Scale-Invariant Keypoints
3D Vision Interest Points.
Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/22
Local Invariant Features
The SIFT (Scale Invariant Feature Transform) Detector and Descriptor
Edge detection f(x,y) viewed as a smooth function
Lecture VI: Corner and Blob Detection
Lecture 5: Feature invariance
SIFT SIFT is an carefully designed procedure with empirically determined parameters for the invariant and distinctive features.
Presented by Xu Miao April 20, 2005
Lecture 5: Feature invariance
Presentation transcript:

Harris Corner Detector & Scale Invariant Feature Transform (SIFT)

Harris Corner Detector

Harris Detector: Intuition “flat” region: no change in all directions “edge”: no change along the edge direction “corner”: significant change in all directions

Moravec Corner Detector Shift in any direction would result in a significant change at a corner. Algorithm: Shift in horizontal, vertical, and diagonal directions by one pixel. Calculate the absolute value of the MSE for each shift. Take the minimum as the cornerness response.

Harris Detector: Mathematics Change of intensity for the shift [u,v]: Intensity Window function Shifted intensity or Window function w(x,y) = Gaussian 1 in window, 0 outside

Harris Detector: Mathematics Apply Taylor series expansion:

Harris Detector: Mathematics For small shifts [u,v] we have the following approximation: where M is a 22 matrix computed from image derivatives:

Harris Detector: Mathematics Intensity change in shifting window: eigenvalue analysis 1, 2 – eigenvalues of M direction of the fastest change Ellipse E(u,v) = const direction of the slowest change (max)-1/2 (min)-1/2

Harris Detector: Mathematics 2 Classification of image points using eigenvalues of M: “Edge” 2 >> 1 “Corner” 1 and 2 are large, 1 ~ 2; E increases in all directions 1 and 2 are small; E is almost constant in all directions “Edge” 1 >> 2 “Flat” region 1

Harris corner detector Measure of corner response: (k – empirical constant, k = 0.04-0.06) No need to compute eigenvalues explicitly!

Eliminate small responses.

Find local maxima of the remaining.

Harris Detector: Scale Rmin= 0 Rmin= 1500

Summary of the Harris detector

Harris Detector: Some Properties Rotation invariance Ellipse rotates but its shape (i.e. eigenvalues) remains the same Corner response R is invariant to image rotation

Harris Detector: Some Properties Partial invariance to affine intensity change Only derivatives are used => invariance to intensity shift I  I + b Intensity scale: I  a I R x (image coordinate) threshold

Harris Detector: Some Properties But: non-invariant to image scale! All points will be classified as edges Corner !

Harris Detector: Some Properties Quality of Harris detector for different scale changes Repeatability rate: # correspondences # possible correspondences C.Schmid et.al. “Evaluation of Interest Point Detectors”. IJCV 2000

Scale Invariant Detection Consider regions (e.g. circles) of different sizes around a point Regions of corresponding sizes will look the same in both images

Scale Invariant Detection The problem: how do we choose corresponding circles independently in each image?

Scale Invariant Detection Solution: Design a function on the region (circle), which is “scale invariant” (the same for corresponding regions, even if they are at different scales) Example: average intensity. For corresponding regions (even of different sizes) it will be the same. For a point in one image, we can consider it as a function of region size (circle radius) f region size Image 1 f region size Image 2 scale = 1/2

Scale Invariant Detection Common approach: Take a local maximum of this function Observation: region size, for which the maximum is achieved, should be invariant to image scale. f region size Image 1 f region size Image 2 scale = 1/2 s1 s2

Characteristic Scale Ratio of scales corresponds to a scale factor between two images

Scale Invariant Detection A “good” function for scale detection: has one stable sharp peak f region size bad f region size Good ! f region size bad For usual images: a good function would be a one which responds to contrast (sharp local intensity change)

Scale Invariant Detection Functions for determining scale Kernels: (Laplacian) (Difference of Gaussians) where Gaussian L or DoG kernel is a matching filter. It finds blob-like structure. It turns out to be also successful in getting characteristic scale of other structures, such as corner regions.

Difference-of-Gaussians

Scale-Space Extrema Choose all extrema within 3x3x3 neighborhood. X is selected if it is larger or smaller than all 26 neighbors

Scale Invariant Detectors x y  Harris   Laplacian  Harris-Laplacian1 Find local maximum of: Harris corner detector in space (image coordinates) Laplacian in scale SIFT (Lowe)2 Find local maximum of: Difference of Gaussians in space and scale scale x y  DoG  1 K.Mikolajczyk, C.Schmid. “Indexing Based on Scale Invariant Interest Points”. ICCV 2001 2 D.Lowe. “Distinctive Image Features from Scale-Invariant Keypoints”. Accepted to IJCV 2004

Harris-Laplace Detector

Scale Invariant Detectors Experimental evaluation of detectors w.r.t. scale change Repeatability rate: # correspondences # possible correspondences K.Mikolajczyk, C.Schmid. “Indexing Based on Scale Invariant Interest Points”. ICCV 2001

Affine Invariant Detection Above we considered: Similarity transform (rotation + uniform scale) Now we go on to: Affine transform (rotation + non-uniform scale)

Affine Invariant Detection Take a local intensity extremum as initial point Go along every ray starting from this point and stop when extremum of function f is reached f points along the ray T.Tuytelaars, L.V.Gool. “Wide Baseline Stereo Matching Based on Local, Affinely Invariant Regions”. BMVC 2000.

Affine Invariant Detection Such extrema occur at positions where intensity suddenly changes compared to the intensity changes up to that point. In theory, leaving out the denominator would still give invariant positions. In practice, the local extrema would be shallow, and might result in inaccurate positions. T.Tuytelaars, L.V.Gool. “Wide Baseline Stereo Matching Based on Local, Affinely Invariant Regions”. BMVC 2000.

Affine Invariant Detection The regions found may not exactly correspond, so we approximate them with ellipses Find the ellipse that best fits the region

Affine Invariant Detection Covariance matrix of region points defines an ellipse: ( p = [x, y]T is relative to the center of mass) Ellipses, computed for corresponding regions, also correspond!

Affine Invariant Detection Algorithm summary (detection of affine invariant region): Start from a local intensity extremum point Go in every direction until the point of extremum of some function f Curve connecting the points is the region boundary Compute the covariance matrix Replace the region with ellipse T.Tuytelaars, L.V.Gool. “Wide Baseline Stereo Matching Based on Local, Affinely Invariant Regions”. BMVC 2000.

Affine Invariant Detection Maximally Stable Extremal Regions Threshold image intensities: I > I0 Extract connected components (“Extremal Regions”) Find “Maximally Stable” regions Approximate a region with an ellipse J.Matas et.al. “Distinguished Regions for Wide-baseline Stereo”. Research Report of CMP, 2001.

Affine Invariant Detection : Summary Under affine transformation, we do not know in advance shapes of the corresponding regions Ellipse given by geometric covariance matrix of a region robustly approximates this region For corresponding regions ellipses also correspond Methods: Search for extremum along rays [Tuytelaars, Van Gool]: Maximally Stable Extremal Regions [Matas et.al.]

? Point Descriptors We know how to detect points Next question: How to match them? ? Point descriptor should be: Invariant Distinctive

Descriptors Invariant to Rotation Convert from Cartesian to Polar coordinates Rotation becomes translation in polar coordinates Take Fourier Transform Magnitude of the Fourier transform is invariant to translation.

Descriptors Invariant to Rotation Find local orientation Dominant direction of gradient Compute image regions relative to this orientation

Descriptors Invariant to Scale Use the characteristic scale determined by detector to compute descriptor in a normalized frame

Affine Invariant Descriptors Find affine normalized frame A A1 A2 rotation Compute rotational invariant descriptor in this normalized frame J.Matas et.al. “Rotational Invariants for Wide-baseline Stereo”. Research Report of CMP, 2003

Affine covariant regions

SIFT (Scale Invariant Feature Transform)

SIFT – Scale Invariant Feature Transform1 Empirically found2 to show very good performance, invariant to image rotation, scale, intensity change, and to moderate affine transformations Scale = 2.5 Rotation = 450 1 D.Lowe. “Distinctive Image Features from Scale-Invariant Keypoints”. Accepted to IJCV 2004 2 K.Mikolajczyk, C.Schmid. “A Performance Evaluation of Local Descriptors”. CVPR 2003

SIFT – Scale Invariant Feature Transform Descriptor overview: Determine scale (by maximizing DoG in scale and in space), local orientation as the dominant gradient direction. Use this scale and orientation to make all further computations invariant to scale and rotation. Compute gradient orientation histograms of several small windows (to produce 128 values for each point) D.Lowe. “Distinctive Image Features from Scale-Invariant Keypoints”. Accepted to IJCV 2004

Scale-space extrema detection Need to find “characteristic scale” for each feature point.

Difference-of-Gaussians

Scale-Space Extrema Choose all extrema within 3x3x3 neighborhood. X is selected if it is larger or smaller than all 26 neighbors

Keypoint Localization & Filtering Now we have much less points than pixels. However, still lots of points (~1000s)… With only pixel-accuracy at best And this includes many bad points Brown & Lowe 2002

Keypoint Filtering - Low Contrast Reject points with bad contrast: DoG smaller than 0.03 (image values in [0,1]) Reject edges Similar to the Harris detector; look at the autocorrelation matrix

Maxima in D

Remove low contrast and edges

Orientation assignment By assigning a consistent orientation, the keypoint descriptor can be orientation invariant. Let, for a keypoint, L is the image with the closest scale. Compute gradient magnitude and orientation using finite differences:

Orientation assignment

Orientation assignment

Orientation assignment

Orientation assignment

Orientation Assignment Any peak within 80% of the highest peak is used to create a keypoint with that orientation ~15% assigned multiplied orientations, but contribute significantly to the stability

SIFT descriptor

SIFT Descriptor Each point so far has x, y, σ, m, θ Now we need a descriptor for the region Could sample intensities around point, but… Sensitive to lighting changes Sensitive to slight errors in x, y, θ Edelman et al. 1997

Image from: Jonas Hurrelmann SIFT Descriptor 16x16 Gradient window is taken. Partitioned into 4x4 subwindows. Histogram of 4x4 samples in 8 directions Gaussian weighting around center( is 0.5 times that of the scale of a keypoint) 4x4x8 = 128 dimensional feature vector Image from: Jonas Hurrelmann

SIFT Descriptor – Lighting changes Gains do not affect gradients Normalization to unit length removes contrast Saturation affects magnitudes much more than orientation Threshold gradient magnitudes with 0.2 and renormalize

Performance Very robust 80% Repeatability at: 10% image noise 45° viewing angle 1k-100k keypoints in database Best descriptor in [Mikolajczyk & Schmid 2005]’s extensive survey

Recognition under occlusion