Docsity

6.2 Harris Corner Detector, Study notes of Algorithms and Programming

Partial preview of the text

Download 6.2 Harris Corner Detector and more Study notes Algorithms and Programming in PDF only on Docsity!

Harris Corners

16-385 Computer Vision (Kris Kitani)

Carnegie Mellon University

How do you find a corner? Easily recognized by looking through a small window Shifting the window should give large change in intensity

[Moravec 1980]

Design a program to detect corners

(hint: use image gradients)

Finding corners

(a.k.a. PCA)

1.Compute image gradients over

small region

2.Subtract mean from each image

gradient

3.Compute the covariance matrix

4.Compute eigenvectors and

eigenvalues

5.Use threshold on eigenvalues to

detect corners

Ix =

@I

@x

Iy =

@I

@y

2 4 P p 2 P IxIx P p 2 P IxIy P p 2 P Iy Ix P p 2 P Iy Iy 3 5  u v

  1. Compute image gradients over a small region

(not just a single pixel)

Ix = @I @x Iy = @I @y

array of x gradients

array of y gradients

visualization of gradients

image

X derivative

Y derivative

Ix =

@I

@x Ix =

@I

@x Ix =

@I

@x

Iy =
@I
@y
Iy =
@I
@y
Iy =
@I
@y

distribution reveals edge orientation and magnitude

Ix =

@I

@x Ix =

@I

@x Ix =

@I

@x

Iy =
@I
@y
Iy =
@I
@y
Iy =
@I
@y

How do you quantify orientation and magnitude?

  1. Subtract the mean from each image gradient plot intensities constant intensity gradient intensities along the line
  1. Subtract the mean from each image gradient plot intensities constant intensity gradient Ix =
@I

@x

Iy =

@I

@y

intensities along the line plot of image gradients subtract mean

  1. Compute the covariance matrix
  1. Compute the covariance matrix

Where does this covariance matrix come from?

2 4 P p 2 P I x I x P p 2 P I x I y P p 2 P I y I x P p 2 P I y I y 3 5  u v = 2 4 Ix = @I @x Iy = @I @y

array of x gradients array of y gradients

=sum( (^) *. ) P I x I x P p 2 P I x I y P I y I x P p 2 P I y I y 3 5  u v = 2 4 P p 2 P I x I t P p 2 P I y I t 3 5

Error function approximation Change of intensity for the shift [ u,v ]:

Second-order Taylor expansion of E(u,v) about (0,0)

(bilinear approximation for small shifts):

first derivative second derivative

Bilinear approximation For small shifts [ u,v ] we have a ‘bilinear approximation’: where M is a 2×2 matrix computed from image derivatives: Change in appearance for a shift [u,v] ‘second moment’ matrix ‘structure tensor’