Lecture 4: Harris corner detection

Slides:



Advertisements
Similar presentations
Feature extraction: Corners
Advertisements

Feature matching “What stuff in the left image matches with stuff on the right?” Necessary for automatic panorama stitching (Part of Project 4!) Slides.
CSE 473/573 Computer Vision and Image Processing (CVIP)
Interest points CSE P 576 Ali Farhadi Many slides from Steve Seitz, Larry Zitnick.
TP14 - Local features: detection and description Computer Vision, FCUP, 2014 Miguel Coimbra Slides by Prof. Kristen Grauman.
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.
Lecture 6: Feature matching CS4670: Computer Vision Noah Snavely.
Affine Linear Transformations Prof. Graeme Bailey (notes modified from Noah Snavely, Spring 2009)
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.
Detecting Patterns So far Specific patterns (eyes) Generally useful patterns (edges) Also (new) “Interesting” distinctive patterns ( No specific pattern:
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.
CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection.
CS4670: Computer Vision Kavita Bala Lecture 8: Scale invariance.
Lecture 6: Feature matching and alignment CS4670: Computer Vision Noah Snavely.
CS 558 C OMPUTER V ISION Lecture VII: Corner and Blob Detection Slides adapted from S. Lazebnik.
Lecture 06 06/12/2011 Shai Avidan הבהרה: החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Feature Detection and Matching
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.
Local invariant features 1 Thursday October 3 rd 2013 Neelima Chavali Virginia Tech.
Lecture 7: Features Part 2 CS4670/5670: Computer Vision Noah Snavely.
Feature extraction: Corners and blobs. Why extract features? Motivation: panorama stitching We have two images – how do we combine them?
Project 3 questions? Interest Points and Instance Recognition Computer Vision CS 143, Brown James Hays 10/21/11 Many slides from Kristen Grauman and.
Lecture 5: Image Interpolation and Features
Local features and image matching October 1 st 2015 Devi Parikh Virginia Tech Disclaimer: Many slides have been borrowed from Kristen Grauman, who may.
Local features: detection and description
Features Jan-Michael Frahm.
CS654: Digital Image Analysis
Image matching by Diva SianDiva Sian by swashfordswashford TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAA.
Announcements Project 1 Out today Help session at the end of class.
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.
Lecture 5: Feature detection and matching CS4670 / 5670: Computer Vision Noah Snavely.
Recognizing objects Prof. Noah Snavely CS1114
Computer Vision Jia-Bin Huang, Virginia Tech
Interest Points EE/CSE 576 Linda Shapiro.
Image Features: Points and Regions
3D Vision Interest Points.
Corners and interest points
TP12 - Local features: detection and description
Source: D. Lowe, L. Fei-Fei Recap: edge detection Source: D. Lowe, L. Fei-Fei.
Local features: detection and description May 11th, 2017
Corners and Interest Points
Features Readings All is Vanity, by C. Allan Gilbert,
Interest Points and Harris Corner Detector
Announcements Project 1 Project 2 (panoramas)
Lecture 5: Feature detection and matching
Announcement Project 1 1.
Local features and image matching
Edge detection f(x,y) viewed as a smooth function
Lecture VI: Corner and Blob Detection
Lecture 5: Feature invariance
Lecture 5: Feature invariance
Corner Detection COMP 4900C Winter 2008.
Presentation transcript:

Lecture 4: Harris corner detection CS5670: Computer Vision Noah Snavely Lecture 4: Harris corner detection

Reading Szeliski: 4.1

Announcements Project 1 code due tomorrow, 2/15, by 11:59pm on CMS Artifacts due Friday, 2/17 by 11:59pm on CMS

Feature extraction: Corners and blobs

Motivation: Automatic panoramas Credit: Matt Brown

Motivation: Automatic panoramas GigaPan http://gigapan.com / Also see Google Zoom Views: https://www.google.com/culturalinstitute/beta/project/gigapixels

Why extract features? Motivation: panorama stitching We have two images – how do we combine them?

Why extract features? Motivation: panorama stitching We have two images – how do we combine them? Step 1: extract features Step 2: match features

Why extract features? Motivation: panorama stitching We have two images – how do we combine them? Step 1: extract features Step 2: match features Step 3: align images

Application: Visual SLAM (aka Simultaneous Localization and Mapping)

Image matching TexPoint fonts used in EMF. by Diva Sian by swashford TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAA

Harder case by Diva Sian by scgbt

Harder still?

Answer below (look for tiny colored squares…) NASA Mars Rover images with SIFT feature matches

Feature Matching

Feature Matching

Invariant local features Find features that are invariant to transformations geometric invariance: translation, rotation, scale photometric invariance: brightness, exposure, … Feature Descriptors

Advantages of local features Locality features are local, so robust to occlusion and clutter Quantity hundreds or thousands in a single image Distinctiveness: can differentiate a large database of objects Efficiency real-time performance achievable

More motivation… Feature points are used for: Image alignment (e.g., mosaics) 3D reconstruction Motion tracking Object recognition Indexing and database retrieval Robot navigation … other

Approach Feature detection: find it Feature descriptor: represent it Feature matching: match it Feature tracking: track it, when motion

Local features: main components Detection: Identify the interest points Description: Extract vector feature descriptor surrounding each interest point. Matching: Determine correspondence between descriptors in two views Kristen Grauman

What makes a good feature? Snoop demo

Want uniqueness Look for image regions that are unusual Lead to unambiguous matches in other images How to define “unusual”?

Local measures of uniqueness Suppose we only consider a small window of pixels What defines whether a feature is a good or bad candidate? High level idea is that corners are good. You want to find windows that contain strong gradients AND gradients oriented in more than one direction Credit: S. Seitz, D. Frolova, D. Simakov

Local measure of feature uniqueness How does the window change when you shift it? Shifting the window in any direction causes a big change “flat” region: no change in all directions “edge”: no change along the edge direction “corner”: significant change in all directions Credit: S. Seitz, D. Frolova, D. Simakov

Harris corner detection: the math Consider shifting the window W by (u,v) how do the pixels in W change? compare each pixel before and after by summing up the squared differences (SSD) this defines an SSD “error” E(u,v): We are happy if this error is high Slow to compute exactly for each pixel and each offset (u,v) W (u,v)

Small motion assumption Taylor Series expansion of I: If the motion (u,v) is small, then first order approximation is good Plugging this into the formula on the previous slide…

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

Corner detection: the math Consider shifting the window W by (u,v) define an SSD “error” E(u,v): W (u,v) Thus, E(u,v) is locally approximated as a quadratic error function

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

u v E(u,v) Horizontal edge:

u v E(u,v) Vertical edge:

General case We can visualize H as an ellipse with axis lengths determined by the eigenvalues of H and orientation determined by the eigenvectors of H max, min : eigenvalues of H Ellipse equation: direction of the slowest change direction of the fastest change (max)-1/2 (min)-1/2

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: In our case, A = H is a 2x2 matrix, so we have The solution: Once you know , you find x by solving

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

Corner detection: the math How are max, xmax, min, and xmin relevant for feature detection? What’s our feature scoring function?

Corner detection: the math How are max, xmax, min, and xmin relevant for feature detection? 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 H

Interpreting the eigenvalues Classification of image points using eigenvalues of M: 2 “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

Corner detection summary Here’s what you do Compute the gradient at each point in the image Create the H 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 as features

Corner detection summary Here’s what you do Compute the gradient at each point in the image Create the H 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 as features

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(H) = h11 + h22 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

Harris detector example

f value (red high, blue low)

Threshold (f > value)

Find local maxima of f

Harris features (in red)

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

Harris Detector [Harris88] Second moment matrix 1. Image derivatives Ix Iy (optionally, blur first) Ix2 Iy2 IxIy 2. Square of derivatives g(IxIy) 3. Gaussian filter g(sI) g(Ix2) g(Iy2) 4. Cornerness function – both eigenvalues are strong 5. Non-maxima suppression har

Harris Corners – Why so complicated? Can’t we just check for regions with lots of gradients in the x and y directions? No! A diagonal line would satisfy that criteria Current Window

Questions?