Top Banner
CSE486, Penn State Robert Collins Lecture 06: Harris Corner Detector Reading: T&V Section 4.3
27
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture06

CSE486, Penn StateRobert Collins

Lecture 06:Harris Corner Detector

Reading: T&V Section 4.3

Page 2: Lecture06

CSE486, Penn StateRobert Collins

Motivation: Matchng ProblemVision tasks such as stereo and motion estimation requirefinding corresponding features across two or more views.

Page 3: Lecture06

CSE486, Penn StateRobert Collins

Motivation: Patch Matching

Camps, PSU

==??

Task: find the best (most similar) patch in a second image

Elements to be matched are image patches of fixed size

Page 4: Lecture06

CSE486, Penn StateRobert Collins

Not all Patches are Created Equal!

Camps, PSU

==??

Inituition: this would be a good patch for matching, sinceit is very distinctive (there is only one patch in the secondframe that looks similar).

Page 5: Lecture06

CSE486, Penn StateRobert Collins

==??

Not all Patches are Created Equal!

Camps, PSU

Inituition: this would be a BAD patch for matching, sinceit is not very distinctive (there are many similar patchesin the second frame)

Page 6: Lecture06

CSE486, Penn StateRobert Collins

What are Corners?

M.Hebert, CMU• They are good features to match!

Page 7: Lecture06

CSE486, Penn StateRobert Collins

Corner Points: Basic Idea

C.Dyer, UWisc

• We should easily recognize the point by looking at intensity values within a small window

• Shifting the window in any direction should yield a large change in appearance.

Page 8: Lecture06

CSE486, Penn StateRobert Collins Appearance Change in

Neighborhood of a PatchInteractive“demo”

Page 9: Lecture06

CSE486, Penn StateRobert Collins

Harris Corner Detector: Basic Idea

C.Dyer, UWisc

Harris corner detector gives a mathematicalapproach for determining which case holds.

Page 10: Lecture06

CSE486, Penn StateRobert Collins

Harris Detector: Mathematics

C.Dyer, UWisc

Page 11: Lecture06

CSE486, Penn StateRobert Collins

Harris Detector: Intuition

C.Dyer, UWisc

For nearly constant patches, this will be near 0.For very distinctive patches, this will be larger.Hence... we want patches where E(u,v) is LARGE.

Page 12: Lecture06

CSE486, Penn StateRobert Collins

Taylor Series for 2D Functions

(Higher order terms)

First partial derivatives

Second partial derivatives

Third partial derivatives

First order approx

Page 13: Lecture06

CSE486, Penn StateRobert Collins

Harris Corner Derivation

First order approx

Rewrite as matrix equation

Page 14: Lecture06

CSE486, Penn StateRobert Collins

Harris Detector: Mathematics

C.Dyer, UWisc

Note: these are just products ofcomponents of the gradient, Ix, Iy

Windowing function - computing aweighted sum (simplest case, w=1)

Page 15: Lecture06

CSE486, Penn StateRobert Collins

Intuitive Way to Understand Harris

Treat gradient vectors as a set of (dx,dy) pointswith a center of mass defined as being at (0,0).

Fit an ellipse to that set of points via scatter matrix

Analyze ellipse parameters for varying cases…

Page 16: Lecture06

CSE486, Penn StateRobert Collins

Example: Cases and 2D DerivativesM

.Heb

ert,

CM

U

Page 17: Lecture06

CSE486, Penn StateRobert Collins

Plotting Derivatives as 2D PointsM

.Heb

ert,

CM

U

Page 18: Lecture06

CSE486, Penn StateRobert Collins

Fitting Ellipse to each Set of PointsM

.Heb

ert,

CM

U

λ1~λ2 = small

λ1 large; λ2 = smallλ1~λ2 = large

Page 19: Lecture06

CSE486, Penn StateRobert Collins

Classification via Eigenvalues

C.Dyer, UWisc

Page 20: Lecture06

CSE486, Penn StateRobert Collins

Corner Response Measure

C.Dyer, UWisc

Page 21: Lecture06

CSE486, Penn StateRobert Collins

Corner Response Map

R=0

R=28

R=65

R=104

R=142

lambda1

lambda2

(0,0)

Page 22: Lecture06

CSE486, Penn StateRobert Collins

Corner Response Map

R=0

R=28

R=65

R=104

R=142

lambda1

lambda2

|R| small“Flat”

R < 0 “Edge”

R < 0 “E

dge”

R large“Corner”

Page 23: Lecture06

CSE486, Penn StateRobert Collins

Corner Response Example

Harris R score. Ix, Iy computed using Sobel operator Windowing function w = Gaussian, sigma=1

Page 24: Lecture06

CSE486, Penn StateRobert Collins

Corner Response Example

Threshold: R < -10000(edges)

Page 25: Lecture06

CSE486, Penn StateRobert Collins

Corner Response Example

Threshold: > 10000(corners)

Page 26: Lecture06

CSE486, Penn StateRobert Collins

Corner Response Example

Threshold: -10000 < R < 10000(neither edges nor corners)

Page 27: Lecture06

CSE486, Penn StateRobert Collins

Harris Corner Detection Algorithm

M.Hebert, CMU

6. Threshold on value of R. Compute nonmax suppression.