Feature Detectors and Descriptors: Corners, Lines, etc.

Similar documents
CS4670: Computer Vision

Image Features. Work on project 1. All is Vanity, by C. Allan Gilbert,

Image matching. Announcements. Harder case. Even harder case. Project 1 Out today Help session at the end of class. by Diva Sian.

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

Image Features: Local Descriptors. Sanja Fidler CSC420: Intro to Image Understanding 1/ 58

Feature Based Registration - Image Alignment

Local features: detection and description. Local invariant features

Automatic Image Alignment (feature-based)

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

Model Fitting. Introduction to Computer Vision CSE 152 Lecture 11

Local invariant features

Local Features: Detection, Description & Matching

Computer Vision for HCI. Topics of This Lecture

Edge and corner detection

CS 664 Image Matching and Robust Fitting. Daniel Huttenlocher

Local features: detection and description May 12 th, 2015

From Szymon Rusinkiewicz, Princeton

RANSAC and some HOUGH transform

Local Feature Detectors

Feature Matching and Robust Fitting

Scale Invariant Feature Transform

Lecture 9: Hough Transform and Thresholding base Segmentation

Edge detection. Convert a 2D image into a set of curves. Extracts salient features of the scene More compact than pixels

Lecture 8: Fitting. Tuesday, Sept 25

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

Motion Estimation and Optical Flow Tracking

Announcements. Edges. Last Lecture. Gradients: Numerical Derivatives f(x) Edge Detection, Lines. Intro Computer Vision. CSE 152 Lecture 10

Scale Invariant Feature Transform

Feature descriptors and matching

The SIFT (Scale Invariant Feature

SUMMARY: DISTINCTIVE IMAGE FEATURES FROM SCALE- INVARIANT KEYPOINTS

Midterm Wed. Local features: detection and description. Today. Last time. Local features: main components. Goal: interest operator repeatability

Object Recognition with Invariant Features

Local Patch Descriptors

Other Linear Filters CS 211A

Capturing, Modeling, Rendering 3D Structures

Fitting. Fitting. Slides S. Lazebnik Harris Corners Pkwy, Charlotte, NC

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Feature Detection. Raul Queiroz Feitosa. 3/30/2017 Feature Detection 1

Local features and image matching. Prof. Xin Yang HUST

Template Matching Rigid Motion

Feature descriptors. Alain Pagani Prof. Didier Stricker. Computer Vision: Object and People Tracking

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection

3D from Photographs: Automatic Matching of Images. Dr Francesco Banterle

Final Exam Study Guide

Anno accademico 2006/2007. Davide Migliore

Lecture 15: Segmentation (Edge Based, Hough Transform)

Building a Panorama. Matching features. Matching with Features. How do we build a panorama? Computational Photography, 6.882

Chapter 3 Image Registration. Chapter 3 Image Registration

Fitting. Lecture 8. Cristian Sminchisescu. Slide credits: K. Grauman, S. Seitz, S. Lazebnik, D. Forsyth, J. Ponce

Types of Edges. Why Edge Detection? Types of Edges. Edge Detection. Gradient. Edge Detection

Multi-modal Registration of Visual Data. Massimiliano Corsini Visual Computing Lab, ISTI - CNR - Italy

2D Image Processing Feature Descriptors

Model Fitting, RANSAC. Jana Kosecka

Template Matching Rigid Motion. Find transformation to align two images. Focus on geometric features

CS231A Midterm Review. Friday 5/6/2016

Automatic Image Alignment

Automatic Image Alignment

CS 558: Computer Vision 4 th Set of Notes

Local Features Tutorial: Nov. 8, 04

Stereo and Epipolar geometry

Straight Lines and Hough

Features Points. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

Hough Transform and RANSAC

Fitting. Instructor: Jason Corso (jjcorso)! web.eecs.umich.edu/~jjcorso/t/598f14!! EECS Fall 2014! Foundations of Computer Vision!

Fitting D.A. Forsyth, CS 543

Fi#ng & Matching Region Representa3on Image Alignment, Op3cal Flow

Edge Detection. CSE 576 Ali Farhadi. Many slides from Steve Seitz and Larry Zitnick

School of Computing University of Utah

EECS150 - Digital Design Lecture 14 FIFO 2 and SIFT. Recap and Outline

Coarse-to-fine image registration

Feature Matching and RANSAC

HOUGH TRANSFORM CS 6350 C V

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

Edge Detection. Announcements. Edge detection. Origin of Edges. Mailing list: you should have received messages

Photo by Carl Warner

INFO0948 Fitting and Shape Matching

EE795: Computer Vision and Intelligent Systems

Announcements, schedule. Lecture 8: Fitting. Weighted graph representation. Outline. Segmentation by Graph Cuts. Images as graphs

Segmentation and Grouping

Homography estimation

Edge detection. Gradient-based edge operators

An edge is not a line... Edge Detection. Finding lines in an image. Finding lines in an image. How can we detect lines?

Local Image preprocessing (cont d)

Feature Descriptors. CS 510 Lecture #21 April 29 th, 2013

CAP 5415 Computer Vision Fall 2012

CAP 5415 Computer Vision Fall 2012

Automatic Image Alignment (direct) with a lot of slides stolen from Steve Seitz and Rick Szeliski

Biomedical Image Analysis. Point, Edge and Line Detection

Lecture 7: Most Common Edge Detectors

Lecture 16: Computer Vision

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Lecture 16: Computer Vision

Outline 7/2/201011/6/

Computer Vision. Image Segmentation. 10. Segmentation. Computer Engineering, Sejong University. Dongil Han

Instance-level recognition

Patch Descriptors. CSE 455 Linda Shapiro

Edge and local feature detection - 2. Importance of edge detection in computer vision

Transcription:

Feature Detectors and Descriptors: Corners, Lines, etc.

Edges vs. Corners Edges = maxima in intensity gradient

Edges vs. Corners Corners = lots of variation in direction of gradient in a small neighborhood

Detecting Corners How to detect this variation? Not enough to check average f x and f y

Detecting Corners Claim: the following covariance matrix summarizes the statistics of the gradient Summations over local neighborhoods y f f x f f f f f f f f C y x y y x y x x = = =, 2 2

Detecting Corners Examine behavior of C by testing its effect in simple cases Case #1: Single edge in local neighborhood

Case#1: Single Edge Let (a,b) be gradient along edge Compute C (a,b): ( )( ) ( ) = = = b a f f b a f f b a f f f f f f b a C y y x y x x T 2 2

Case #1: Single Edge However, in this simple case, the only nonzero terms are those where f = (a,b) So, C (a,b) is just some multiple of (a,b)

Case #2: Corner Assume there is a corner, with perpendicular gradients (a,b) and (c,d)

Case #2: Corner What is C (a,b)? Since (a,b) (c,d) = 0, the only nonzero terms are those where f = (a,b) So, C (a,b) is again just a multiple of (a,b) What is C (c,d)? Since (a,b) (c,d) = 0, the only nonzero terms are those where f = (c,d) So, C (c,d) is a multiple of (c,d)

Corner Detection Matrix times vector = multiple of vector Eigenvectors and eigenvalues! In particular, if C has one large eigenvalue, there s an edge If C has two large eigenvalues, have corner Tomasi-Kanade corner detector

Corner Detection Implementation 1. Compute image gradient 2. For each m m neighborhood, compute matrix C 3. If smaller eigenvalue λ 2 is larger than threshold τ, record a corner 4. Nonmaximum suppression: only keep strongest corner in each m m window

Corner Detection Results Checkerboard with noise Trucco & Verri

Corner Detection Results

Corner Detection Results Histogram of λ 2 (smaller eigenvalue)

Corner Detection Application: good features for tracking, correspondence, etc. Why are corners better than edges for tracking? Other corner detectors Look for curvature in edge detector output Perform color segmentation on neighborhoods Others

Invariance Suppose you rotate the image by some angle Will you still find the same corners? What if you change the brightness? Scale? [Seitz]

Scale-Invariant Feature Detection Key idea: compute some function f over different scales, find extremum Common definition of f: LoG or DoG Find local minima or maxima over position and scale

Slide from Tinne Tuytelaars Slide from Tinne Tuytelaars Lindeberget et al, al., 1996

Fitting and Matching We ve seen low-level detectors Next step: using output for higher-level tasks Detection/fitting of more complex primitives Matching

Detecting Lines What is the difference between line detection and edge detection? Edges = local Lines = nonlocal Line detection usually performed on the output of an edge detector

Detecting Lines Possible approaches: Brute force: enumerate all lines, check if present Hough transform: vote for lines to which detected edges might belong Fitting: given guess for approximate location, refine it Second method efficient for finding unknown lines, but not always accurate

Hough Transform General idea: transform from image coordinates to parameter space of feature Need parameterized model of features For each pixel, determine all parameter values that might have given rise to that pixel; vote At end, look for peaks in parameter space

Hough Transform for Lines Generic line: y = ax+b Parameters: a and b

Hough Transform for Lines 1. Initialize table of buckets, indexed by a and b, to zero 2. For each detected edge pixel (x,y): a. Determine all (a,b) such that y = ax+b b. Increment bucket (a,b) 3. Buckets with many votes indicate probable lines

Hough Transform for Lines a b

Hough Transform for Lines a b

Bucket Selection How to select bucket size? Too small: poor performance on noisy data Too large: poor accuracy, long running times, possibility of false positives Large buckets + verification and refinement Problems distinguishing nearby lines Be smarter at selecting buckets Use gradient information to select subset of buckets More sensitive to noise

Difficulties with Hough Transform for Lines Slope / intercept parameterization not ideal Non-uniform sampling of directions Can t represent vertical lines Angle / distance parameterization Line represented as (r,θ) where x cos θ + y sin θ = r r θ

Angle / Distance Parameterization Advantage: uniform parameterization of directions Disadvantage: space of all lines passing through a point becomes a sinusoid in (r,θ) space

Hough Transform Results Forsyth & Ponce

Hough Transform Results Forsyth & Ponce

Hough Transform What else can be detected using Hough transform? Anything, but dimensionality is key

Hough Transform for Circles Space of circles has a 3-dimensional parameter space: position (2-d) and radius So, each pixel gives rise to 2-d sheet of values in 3-d space

Hough Transform for Circles In many cases, can simplify problem by using more information Example: using gradient information Still need 3-d bucket space, but each pixel only votes for 1-d subset

Hough Transform for Circles Secants + +... =

Simplifying Hough Transforms Another trick: use prior information For example, if looking for circles of a particular size, reduce votes even further

Fitting Output of Hough transform often not accurate enough Use as initial guess for fitting

Fitting Lines Initial guess

Fitting Lines Least-squares minimization

Fitting Lines

Fitting Lines As before, have to be careful about parameterization Simplest line fitting formulas minimize vertical (not perpendicular) point-to-line distance Closed-form solution for point-to-line distance, not necessarily true for other curves

Total Least Squares 1. Translate center of mass to origin

Total Least Squares 2. Compute covariance matrix, find eigenvector w. largest eigenvalue

Outliers Least squares assumes Gaussian errors Outliers: points with extremely low probability of occurrence (according to Gaussian statistics) Can be result of data association problems Can have strong influence on least squares

Robust Estimation Goal: develop parameter estimation methods insensitive to small numbers of large errors General approach: try to give large deviations less weight M-estimators: minimize some function other than (y f(x,a,b, )) 2

Least Absolute Value Fitting Minimize i y f ( x, a, b, ) i i instead of i ( y f ( x, a, b, ) ) 2 i i Points far away from trend get comparatively less influence

Example: Constant For constant function y = a, minimizing Σ(y a) 2 gives a = mean Minimizing Σ y a gives a = median

Doing Robust Fitting In general case, nasty function: discontinuous derivative Numerical methods (e.g. Nelder-Mead simplex) sometimes work

Iteratively Reweighted Least Squares Sometimes-used approximation: convert to iterated weighted least squares with w i based on previous iteration ( ) ( ) 2 2 ),,, ( ),,, ( ),,, ( 1 ),,, ( b a x f y w b a x f y b a x f y b a x f y i i i i i i i i i i i i = =

Iteratively Reweighted Least Squares Different options for weights Avoid problems with infinities Give even less weight to outliers ( ) ( ) 2 ),,, ( 2 ),,, ( 1 ),,, ( 1 ),,, ( 1 b a x f y k i i i i i i i i i i i i e w b a x f y k w b a x f y k w b a x f y w = + = + = =

Outlier Detection and Rejection Special case of IRWLS: set weight = 0 if outlier, 1 otherwise Detecting outliers: (y i f(x i )) 2 > threshold One choice: multiple of mean squared difference Better choice: multiple of median squared difference Can iterate As before, not guaranteed to do anything reasonable, tends to work OK if only a few outliers

RANSAC RANdom SAmple Consensus: desgined for bad data (in best case, up to 50% outliers) Take many random subsets of data Compute least squares fit for each sample See how many points agree: (y i f(x i )) 2 < threshold Threshold user-specified or estimated from more trials At end, use fit that agreed with most points Can do one final least squares with all inliers

Feature Descriptors Feature matching useful for: Image alignment (e.g., mosaics), 3D reconstruction, motion tracking, object recognition, indexing and database retrieval, robot navigation, etc.? [Seitz]

Properties of Feature Descriptors Easily computed Easily compared (compact, fixed-dimensional) Invariant Translation Rotation Scale Change in image brightness Change in perspective?

Rotation Invariance for Feature Descriptors Rotate window according to dominant orientation Eigenvector of C corresponding to maximum eigenvalue [Matthew Brown]

Scale Invariant Feature Transform Take 16 16 window around detected feature Create histogram of thresholded edge orientations 0 2π angle histogram [Seitz / Lowe]

Full SIFT Descriptor Divide 16 16 window into 4 4 grid of cells Compute an orientation histogram for each cell 16 cells * 8 orientations = 128-dimensional descriptor [Seitz / Lowe]

Properties of SIFT Fast (real-time) and robust descriptor for matching Handles changes in viewpoint (~60 out of plane rotation) Handles significant changes in illumination Lots of code available [Seitz]