CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection.

Slides:



Advertisements
Similar presentations
Feature extraction: Corners
Advertisements

Scale & Affine Invariant Interest Point Detectors Mikolajczyk & Schmid presented by Dustin Lennon.
CSE 473/573 Computer Vision and Image Processing (CVIP)
Interest points CSE P 576 Ali Farhadi Many slides from Steve Seitz, Larry Zitnick.
Computer vision: models, learning and inference Chapter 13 Image preprocessing and feature extraction.
Matching with Invariant Features
Edge and Corner Detection Reading: Chapter 8 (skip 8.1) Goal: Identify sudden changes (discontinuities) in an image This is where most shape information.
Features CSE 455, Winter 2010 February 1, Neel Joshi, CSE 455, Winter Review From Last Time.
Computational Photography
Algorithms and Applications in Computer Vision
Interest points CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.
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
Interest Points and Corners Computer Vision CS 143, Brown James Hays Slides from Rick Szeliski, Svetlana Lazebnik, Derek Hoiem and Grauman&Leibe 2008 AAAI.
Blob detection.
Lecture 3a: Feature detection and matching CS6670: Computer Vision Noah Snavely.
Lecture 2: Image filtering
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 8: Scale invariance.
CS 558 C OMPUTER V ISION Lecture VII: Corner and Blob Detection Slides adapted from S. Lazebnik.
Lecture 06 06/12/2011 Shai Avidan הבהרה: החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Computer Vision Lecture 4 FEATURE DETECTION. Feature Detection Feature Description Feature Matching Today’s Topics 2.
From Pixels to Features: Review of Part 1 COMP 4900C Winter 2008.
CSE 185 Introduction to Computer Vision Local Invariant Features.
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
Feature extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Local invariant features 1 Thursday October 3 rd 2013 Neelima Chavali Virginia Tech.
Lecture 7: Features Part 2 CS4670/5670: Computer Vision Noah Snavely.
Notes on the Harris Detector
Harris Corner Detector & Scale Invariant Feature Transform (SIFT)
Feature extraction: Corners and blobs. Why extract features? Motivation: panorama stitching We have two images – how do we combine them?
Local features and image matching October 1 st 2015 Devi Parikh Virginia Tech Disclaimer: Many slides have been borrowed from Kristen Grauman, who may.
Features Jan-Michael Frahm.
Lecture 9 Feature Extraction and Motion Estimation Slides by: Michael Black Clark F. Olson Jean Ponce.
CS654: Digital Image Analysis
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Instructor: Mircea Nicolescu Lecture 10 CS 485 / 685 Computer Vision.
CSE 185 Introduction to Computer Vision Local Invariant Features.
Lecture 10: Harris Corner Detector CS4670/5670: Computer Vision Kavita Bala.
Keypoint extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
Invariant Local Features Image content is transformed into local feature coordinates that are invariant to translation, rotation, scale, and other imaging.
MAN-522: Computer Vision Edge detection Feature and blob detection
Interest Points EE/CSE 576 Linda Shapiro.
Local features: main components
3D Vision Interest Points.
Corners and interest points
Source: D. Lowe, L. Fei-Fei Recap: edge detection Source: D. Lowe, L. Fei-Fei.
Lecture 4: Harris corner detection
Scale and interest point descriptors
Corners and Interest Points
Interest Points and Harris Corner Detector
Announcements Project 1 Project 2 (panoramas)
Lecture 5: Feature detection and matching
Local features and image matching
Edge detection f(x,y) viewed as a smooth function
CS 565 Computer Vision Nazar Khan Lecture 11.
Lecture VI: Corner and Blob Detection
Lecture 5: Feature invariance
Lecture 5: Feature invariance
Corner Detection COMP 4900C Winter 2008.
Presentation transcript:

CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection

Announcements HW 1 will be out soon Sign up for demo slots for PA 1 – Remember that both partners have to be there – We will ask you to explain your partners code

Filters Linearly separable filters

Gaussian filters Remove “high-frequency” components from the image (low-pass filter) – Images become more smooth Convolution with self is another Gaussian – So can smooth with small-width kernel, repeat, and get same result as larger-width kernel would have – Convolving two times with Gaussian kernel of width σ is same as convolving once with kernel of width σ√2 Separable kernel – Factors into product of two 1D Gaussians Source: K. Grauman

Separability of the Gaussian filter Source: D. Lowe

Separability example * * = = 2D convolution (center location only) Source: K. Grauman The filter factors into a product of 1D filters: Perform convolution along rows: Followed by convolution along the remaining column:

CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection

Feature detection: the math Consider shifting the window W by (u,v) define an SSD “error” E(u,v): W

Corner Detection: Mathematics The quadratic approximation simplifies to where M is a second moment matrix computed from image derivatives (aka structure tensor): M

Corners as distinctive interest points 2 x 2 matrix of image derivatives (averaged in neighborhood of a point) Notation:

Weighting the derivatives In practice, using a simple window W doesn’t work too well Instead, we’ll weight each derivative value based on its distance from the center pixel or Window function w(x,y) = Gaussian1 in window, 0 outside Source: R. Szeliski

The surface E(u,v) is locally approximated by a quadratic form. Let’s try to understand its shape. Interpreting the second moment matrix

Consider a horizontal “slice” of E(u, v): Interpreting the second moment matrix This is the equation of an ellipse.

Consider a horizontal “slice” of E(u, v): Interpreting the second moment matrix This is the equation of an ellipse. The axis lengths of the ellipse are determined by the eigenvalues and the orientation is determined by R direction of the slowest change direction of the fastest change ( max ) -1/2 ( min ) -1/2 Diagonalization of M:

Quick eigenvalue/eigenvector review The eigenvectors of a matrix A are the vectors x that satisfy: The scalar is the eigenvalue corresponding to x – The eigenvalues are found by solving:

Quick eigenvalue/eigenvector review The solution: Once you know, you find the eigenvectors by solving Symmetric, square matrix: eigenvectors are mutually orthogonal

Corner detection: the math Eigenvalues and eigenvectors of M Define shift directions with smallest and largest change in error x max = direction of largest increase in E max = amount of increase in direction x max x min = direction of smallest increase in E min = amount of increase in direction x min x min x max

Interpreting the eigenvalues 1 2 “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 “Edge” 2 >> 1 “Flat” region Classification of image points using eigenvalues of M:

Corner detection: the math How do max, x max, min, and x min affect feature detection? What’s our feature scoring function?

Corner detection: the math What’s our feature scoring function? Want E(u,v) to be large for small shifts in all directions the minimum of E(u,v) should be large, over all unit vectors [u v] this minimum is given by the smaller eigenvalue ( min ) of M

Corner detection: take 1 Here’s what you do Compute the gradient at each point in the image Create the M matrix from the entries in the gradient Compute the eigenvalues Find points with large response ( min > threshold) Choose those points where min is a local maximum

The Harris operator min is a variant of the “Harris operator” for feature detection The trace is the sum of the diagonals, i.e., trace(M) = h 11 + h 22 Very similar to min but less expensive (no square root) Called the “Harris Corner Detector” or “Harris Operator” Lots of other detectors, this is one of the most popular

The Harris operator Harris operator

Corner response function “Corner” f large “Edge” f small “Flat” region |R| small : constant (0.04 to 0.1)

Harris corner detector 1)Compute M matrix for each image window to get their cornerness scores. 2)Find points whose surrounding window gave large corner response (f > threshold) 3)Take the points of local maxima, i.e., perform non-maximum suppression C.Harris and M.Stephens. “A Combined Corner and Edge Detector.” Proceedings of the 4th Alvey Vision Conference: pages 147—151, “A Combined Corner and Edge Detector.”

Harris Detector [ Harris88 ] Image derivatives 2. Square of derivatives IxIx IyIy Ix2Ix2 Iy2Iy2 IxIyIxIy g(I x 2 )g(I y 2 ) g(I x I y ) 3. Cornerness function – both eigenvalues are strong Compute f har 4. Non-maxima suppression (optionally, blur first)

Harris detector example

f value (red high, blue low)

Threshold (f > value)

Find local maxima of f

Harris features (in red)

Invariance and covariance We want corner locations to be invariant to photometric transformations and covariant to geometric transformations –Invariance: image is transformed and corner locations do not change –Covariance: if we have two transformed versions of the same image, features should be detected in corresponding locations

Image transformations Geometric Rotation Scale Photometric Intensity change

Affine intensity change Only derivatives => invariance to intensity shift I  I + b Intensity scaling: I  a I R x (image coordinate) threshold R x (image coordinate) Partially invariant to affine intensity change I  a I + b

Harris: image translation Derivatives and window function are shift-invariant Corner location is covariant w.r.t. translation

Harris: image rotation Second moment ellipse rotates but its shape (i.e. eigenvalues) remains the same Corner location is covariant w.r.t. rotation

Scaling All points will be classified as edges Corner Corner location is not covariant to scaling!

Scale invariant detection Suppose you’re looking for corners Key idea: find scale that gives local maximum of f – in both position and scale – One definition of f: the Harris operator

Questions?