Top Banner
Interest Point Detectors (see CS485/685 notes for more details) CS491Y/691Y Topics in Computer Vision Dr. George Bebis
76

Interest Point Detectors (see CS485/685 notes for more details)

Jan 26, 2016

Download

Documents

miach

Interest Point Detectors (see CS485/685 notes for more details). CS491Y/691Y Topics in Computer Vision Dr. George Bebis. What is an Interest Point?. A point in an image which has a well-defined position and can be robustly detected. - PowerPoint PPT Presentation
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: Interest Point Detectors (see CS485/685 notes for more details)

Interest Point Detectors(see CS485/685 notes for more details)

CS491Y/691Y Topics in Computer Vision

Dr. George Bebis

Page 2: Interest Point Detectors (see CS485/685 notes for more details)

What is an Interest Point?

• A point in an image which has a well-defined position and can be robustly detected.

• Typically associated with a significant change of one or more image properties simultaneously (e.g., intensity, color, texture).

Page 3: Interest Point Detectors (see CS485/685 notes for more details)

What is an Interest Point? (cont’d)

• Corners is a special case of interest points.

• However, interest points could be more generic than corners.

Page 4: Interest Point Detectors (see CS485/685 notes for more details)

Why are interest points useful?

• Could be used to find corresponding points between images which is very useful for numerous applications!

stereo matching

panorama stitching

left camera right camera

Page 5: Interest Point Detectors (see CS485/685 notes for more details)

How to find corresponding points?

• Need to define local patches surrounding the interest points and extract feature descriptors from every patch.

• Match feature descriptors to find corresponding points.

( ) ( )=?

featuredescriptor

featuredescriptor

?

Page 6: Interest Point Detectors (see CS485/685 notes for more details)

Properties of good features

• Local:Local: robust to occlusion and clutter.• Accurate:Accurate: precise localization.

• CovariantCovariant• Robust:Robust: noise, blur, compression, etc.

• Efficient:Efficient: close to real-time performance.

RepeatableRepeatable

Page 7: Interest Point Detectors (see CS485/685 notes for more details)

Interest point detectors should be covariant

• Features should be detected in corresponding locations despite geometric or photometric changes.

Page 8: Interest Point Detectors (see CS485/685 notes for more details)

( ) ( )=?

featuredescriptor

featuredescriptor

?

Interest point descriptors should be invariant

Should be similar despite geometricor photometric transformations

Page 9: Interest Point Detectors (see CS485/685 notes for more details)

Interest point candidates

Use features with gradients in at least two, significantly different orientations (e.g., corners, junctions etc)

Page 10: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corner Detector

• AW(x,y) is a 2 x 2 matrix called auto-correlation matrix.

• fx, fy are the horizontal and vertical derivatives.

• w(x,y) is a smoothing function (e.g., Gaussian)

C. Harris and M. Stephens. "A Combined Corner and Edge Detector”, Proceedings of the 4th Alvey Vision Conference: pages 147—151, 1988. 

• Assuming a W x W window, it computes the matrix:

2

2,

( , ) x x yW

x W y W x y y

f f fA w x y

f f f

Page 11: Interest Point Detectors (see CS485/685 notes for more details)

Why is the auto-correlation matrix useful?

Describes the gradient distribution (i.e., local structure) inside thewindow!

2

2,

( , ) x x yW

x W y W x y y

f f fA w x y

f f f

Page 12: Interest Point Detectors (see CS485/685 notes for more details)

Properties of the auto-correlation matrix

Aw is symmetric and can be decomposed :

11

2

0

0WA R R

(max)1/2(min)1/2

• We can visualize AW as an ellipse with axis lengths and directions determined by its eigenvalues and eigenvectors.

Page 13: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corner Detector (cont’d)

• The eigenvectors of AW encode direction of intensity change.

• The eigenvalues of AW encode strength of intensity change.

v1

v2

(max)1/2(min)1/2 direction of

the fastest change

direction of the slowest change

Page 14: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corner Detector (cont’d)

1

2

“Corner”1 and 2 are large,

1 ~ 2;

intensity changes in all directions

1 and 2 are small;

intensity is almost constant in all directions

“Edge” 1 >> 2

“Edge” 2 >> 1

“Flat” region

Classification of pixels using the eigenvalues of AW :

Page 15: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corner Detector (cont’d)

• To avoid computing the eigenvalues explicitly, the Harris detector uses the following function:

R(AW) = det(AW) – α trace2(AW)

which is equal to:

R(AW) = λ1 λ2- α (λ1+ λ2)2

α: is a const

Page 16: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corner Detector (cont’d)

“Corner”R > 0

“Edge” R < 0

“Edge” R < 0

“Flat” region

|R| small α: is usually between

0.04 and 0.06

R(AW) = det(AW) – α trace2(AW)

Classification of image

points using R(AW):

Page 17: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corner Detector (cont’d)

• Other functions:

2 1

1 2

1 2

det

a

A

trA

Page 18: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corner Detector - Steps

( , , )* ( , )x D i if G x y f x yx

( , , )* ( , )y D i if G x y f x y

y

σD is called the “differentiation” scale

1. Compute the horizontal and vertical (Gaussian) derivatives

2. Compute the three images involved in AW :

2

2,

( , ) x x yW

x W y W x y y

f f fA w x y

f f f

Page 19: Interest Point Detectors (see CS485/685 notes for more details)

Harris Detector - Steps

R(AW) = det(AW) – α trace2(AW)

3. Convolve each of the three images with a larger Gaussian

w(x,y) :

Gaussian

σI is called the “integration” scale

4. Determine cornerness:

5. Find local maxima

Page 20: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corenr Detector - Example

Page 21: Interest Point Detectors (see CS485/685 notes for more details)

Harris Detector - Example

Page 22: Interest Point Detectors (see CS485/685 notes for more details)

Compute corner response R

Page 23: Interest Point Detectors (see CS485/685 notes for more details)

Find points with large corner response: R>threshold

Page 24: Interest Point Detectors (see CS485/685 notes for more details)

Take only the points of local maxima of R

Page 25: Interest Point Detectors (see CS485/685 notes for more details)

Map corners on the original image (for visualization)

Page 26: Interest Point Detectors (see CS485/685 notes for more details)

Harris Corner Detector (cont’d)

• Rotation invariant

• Sensitive to:• Scale change• Significant viewpoint change• Significant contrast change

Page 27: Interest Point Detectors (see CS485/685 notes for more details)

Multi-scale Harris Detector

scale

x

y

Harris

• Detect interest points at varying scales.

R(AW) = det(AW(x,y,σI,σD)) – α trace2(AW(x,y,σI,σD))

σσnnσD= σn

σI=γσD

σn=knσ

Page 28: Interest Point Detectors (see CS485/685 notes for more details)

Multi-scale Harris Detector (cont’d)

• The same interest point will be detected at multiple consecutive scales.

• Interest point location will shift as scale increases (i.e., due to smoothing).

i.e., the size of each circle corresponds to the scale at which the interest point was detected.

Page 29: Interest Point Detectors (see CS485/685 notes for more details)

How do we match them?

• Corresponding features might appear at different scales.

• How do we determine these scales?• We need a scale selection mechanism!

Page 30: Interest Point Detectors (see CS485/685 notes for more details)

Exhaustive Search

• Simple approach for scale selection but not efficient!

Page 31: Interest Point Detectors (see CS485/685 notes for more details)

Characteristic Scale

• Find the characteristic scale of each feature (i.e., the scale revealing the spatial extent of an interest point).

characteristic scale characteristic scale

Page 32: Interest Point Detectors (see CS485/685 notes for more details)

Characteristic Scale (cont’d)

• Only a subset of interest points are selected using the characteristic scale of each feature.

• i.e., the size of the circles is related to the scale at which the interest points were selected.

Matching can be simplified!

Page 33: Interest Point Detectors (see CS485/685 notes for more details)

Automatic Scale Selection – Main Idea

• Design a function F(x,F(x,σσnn)) which provides some local measure.

• Select points at which F(x,F(x,σσnn)) is maximal over σσnn.

T. Lindeberg, "Feature detection with automatic scale selection" International Journal of Computer Vision, vol. 30, no. 2, pp 77-116, 1998.

max of F(x,F(x,σσnn))corresponds to characteristic scale!

σσnn

F(x,F(x,σσnn))

Page 34: Interest Point Detectors (see CS485/685 notes for more details)

Slide from Tinne Tuytelaars

Lindeberg et al, 1996

Page 35: Interest Point Detectors (see CS485/685 notes for more details)
Page 36: Interest Point Detectors (see CS485/685 notes for more details)
Page 37: Interest Point Detectors (see CS485/685 notes for more details)
Page 38: Interest Point Detectors (see CS485/685 notes for more details)
Page 39: Interest Point Detectors (see CS485/685 notes for more details)
Page 40: Interest Point Detectors (see CS485/685 notes for more details)
Page 41: Interest Point Detectors (see CS485/685 notes for more details)
Page 42: Interest Point Detectors (see CS485/685 notes for more details)

Automatic Scale Selection (cont’d)

• Using characteristic scale, the spatial extent of interest points becomes covariant to scale transformations.

• The ratio σ1/σ2 reveals the scale factor between the images.

σ1/σ2 = 2.5

σ1 σ2

Page 43: Interest Point Detectors (see CS485/685 notes for more details)

How to choose F(x,F(x,σσnn)) ?

• Typically, F(x,F(x,σσnn)) is defined using derivatives, e.g.:

• LoG (Laplacian of Gaussian) yielded best results in a recent evaluation study.

• DoG (Difference of Gaussians) was second best.

2 2 2

2

1

2

: ( ( , ) ( , ))

: | ( ( , ) ( , )) |

:| ( )* ( ) ( )* ( ) |

: det( ) ( )

x y

xx yy

n n

W W

Square gradient L x L x

LoG L x L x

DoG I x G I x G

Harris function A trace A

C. Schmid, R. Mohr, and C. Bauckhage, "Evaluation of Interest Point Detectors", International Journal of Computer Vision, 37(2), pp. 151-172, 2000.

Page 44: Interest Point Detectors (see CS485/685 notes for more details)

LoG and DoG

• LoG can be approximated by DoG:

2 2( , , ) ( , , ) ( 1)G x y k G x y k G

Page 45: Interest Point Detectors (see CS485/685 notes for more details)

σσnn

Harris-Laplace Detector

scale

x

y

Harris

L

oG

• Multi-scale Harris with scale selection.• Uses LoG maxima to find characteristic scale.

Page 46: Interest Point Detectors (see CS485/685 notes for more details)

Harris-Laplace Detector (cont’d)

(1) Find interest points at multiple scales using Harris detector.- Scales are chosen as follows: σn =knσ

- At each scale, choose local maxima assuming 3 x 3 window

where2( , ) det( ) ( )n W wF x A trace A

( , ) ( , )

( , )n W n W

n h

F x F x x W

F x t

(σD =σn, σI =γσD )

(i.e., non-maximal suppression)

Page 47: Interest Point Detectors (see CS485/685 notes for more details)

Harris-Laplace Detector (cont’d)

(2) Select points at which the normalized LoG is maximal across scales and the maximum is above a threshold.

K. Mikolajczyk and C. Schmid, “Indexing based on scale invariant interest points" IEEE Int. Conference on Computer Vision, pp 525-531, 2001.

2( , ) | ( ( , ) ( , )) |n xx n yy nF x L x L x

1 1( , ) ( , ) ( , ) ( , )

( , )n n n n

n

F x F x F x F x

F x t

where:σn

σn+1

σn-1

Page 48: Interest Point Detectors (see CS485/685 notes for more details)

Example

• Interest points detected at each scale using Harris-Laplace– Few correspondences between levels corresponding to same σ.

– More correspondences between levels having a ratio of σ = 2.

images differ by a scale factor of 1.92

σ=1.2 σ=2.4 σ=4.8 σ=9.6

σ=1.2 σ=2.4 σ=4.8 σ=9.6

Page 49: Interest Point Detectors (see CS485/685 notes for more details)

Example (cont’d)

-More than 2000 points would have been detected without scale selection.-Using scale selection, 190 and 213 points were detected in the left and right images, respectively.

(same viewpoint – change in focal length and orientation)

Page 50: Interest Point Detectors (see CS485/685 notes for more details)

Example (cont’d)

58 points are initially matched (some were not correct)

Page 51: Interest Point Detectors (see CS485/685 notes for more details)

Example (cont’d)

• Reject outliers (i.e., inconsistent matches) using RANSAC• Left with 32 matches, all of which are correct.•Estimated scale factor is 4:9 and rotation angle is 19 degrees.

Page 52: Interest Point Detectors (see CS485/685 notes for more details)

Harris-Laplace Detector (cont’d)

• Invariant to:– Scale

– Rotation

– Translation

• Robust to: – Illumination changes

– Limited viewpoint changes

Repeatability

Page 53: Interest Point Detectors (see CS485/685 notes for more details)

Harris-Laplace using DoG

Look for local maxima in DoG pyramid

DoG pyramid

David G. Lowe, "Distinctive image features from scale-invariant keypoints.” Int. Journal of Computer Vision, 60 (2), pp. 91-110, 2004.

Page 54: Interest Point Detectors (see CS485/685 notes for more details)

Handling Affine Changes

• Similarity transformations cannot account for perspective distortions; affine could be used for planar surfaces.

• Similarity transform

• Affine transform

Page 55: Interest Point Detectors (see CS485/685 notes for more details)

Harris Affine Detector

• Use an iterative approach:– Extract approximate locations and scales using the Harris-

Laplace detector.

– For each point, modify the scale and shape of its neighborhood in an iterative fashion.

– Converges to stable points that are covariant to affine transformations.

.

Page 56: Interest Point Detectors (see CS485/685 notes for more details)

Steps of Iterative Affine Adaptation

1. Detect initial locations and neighborhood using Harris-Laplace.

2. Estimate affine shape of neighborhood using 2nd order moment matrix μ(x, σI, σD).

Page 57: Interest Point Detectors (see CS485/685 notes for more details)

Steps of Iterative Affine Adaptation (cont’d)

3. Normalize (i.e., de-skew) the affine region by mapping it to a circular one (i.e., “remove” perspective distortions).

4. Re-detect the new location and scale in the normalized image.

5. Go to step 2 if the eigenvalues of μ(x, σI, σD) for the new point are not equal (i.e., not yet adapted to the characteristic shape).

Page 58: Interest Point Detectors (see CS485/685 notes for more details)

Iterative affine adaptation - Examples

Initial points

Example 1 Example 2

Page 59: Interest Point Detectors (see CS485/685 notes for more details)

Iterative affine adaptation – Examples (cont’d)

Iteration #1

Example 1 Example 2

Page 60: Interest Point Detectors (see CS485/685 notes for more details)

Iterative affine adaptation – Examples (cont’d)

Iteration #2

Example 1 Example 2

Page 61: Interest Point Detectors (see CS485/685 notes for more details)

Iterative affine adaptation – Examples (cont’d)

Iteration #3, #4, …

K. Mikolajczyk and C. Schmid, “Scale and Affine invariant interest point detectors”, International Journal of Computer Vision, 60(1), pp. 63-86, 2004.

http://www.robots.ox.ac.uk/~vgg/research/affine/

Example 1 Example 2

Page 62: Interest Point Detectors (see CS485/685 notes for more details)

Iterative affine adaptation – Examples (cont’d)

Page 63: Interest Point Detectors (see CS485/685 notes for more details)

De-skewing

• Consider a point xL with 2nd order matrix ML

• The de-skewing transformation is defined as follows:

xL

Page 64: Interest Point Detectors (see CS485/685 notes for more details)

De-skewing corresponding regions

• Consider two points xL and xR which are related through an affine transformation:

xL xR

Page 65: Interest Point Detectors (see CS485/685 notes for more details)

De-skewing corresponding regions (cont’d)

Normalized regionsare related by purerotation R.

Page 66: Interest Point Detectors (see CS485/685 notes for more details)

Resolving orientation ambiguity

• Create histogram of local gradient directions in the patch.

• Smooth histogram and assign canonical orientation at peak of smoothed histogram.

Dominant gradientdirection!

0 2

(36 bins)

Page 67: Interest Point Detectors (see CS485/685 notes for more details)

Resolving orientation ambiguity (cont’d)

• Resolve orientation ambiguity.

Compute R

Page 68: Interest Point Detectors (see CS485/685 notes for more details)

Other Affine Invariant Blob/Region Detectors

• There are many other techniques for detecting affine invariant blobs or regions, for example:

– Intensity Extrema-Based Region (IER)

– Maximally Stable Extremal Regions (MSERs)

• No need to detect interest points.

Page 69: Interest Point Detectors (see CS485/685 notes for more details)

Intensity Extrema-Based Region Detector(1) Take a local intensity extremum as

initial point.

(2) Examine the intensity along “rays” from the local extremum.

(3) The point on each ray for which fI(t) reaches an extremum is selected (i.e., invariant).

(4) Linking these points together yields an affinely invariant region, to which an ellipse is fitted.

Tuytelaars, T. and Van Gool, L. “Matching Widely Separated Views based on Affine Invariant Regions”, International Journal on Computer Vision, 59(1):61–85, 2004.

d>0: small const

Page 70: Interest Point Detectors (see CS485/685 notes for more details)

Intensity Extrema-Based Region Detector (cont’d)

• The regions found may not exactly correspond, so we approximate them with ellipses using 2nd order moments.

Page 71: Interest Point Detectors (see CS485/685 notes for more details)

Intensity Extrema-Based Region Detector (cont’d)

• Double the size of the ellipse to make regions more distinctive.

• Final ellipse is not necessarily centered at original anchor point.

Page 72: Interest Point Detectors (see CS485/685 notes for more details)

Intensity Extrema-Based Region Detector (cont’d)

Page 73: Interest Point Detectors (see CS485/685 notes for more details)

Intensity Extrema-Based Region Detector (cont’d)

• Region extraction is fairly robust to inaccurate localization of intensity extremum.

Page 74: Interest Point Detectors (see CS485/685 notes for more details)

Maximally Stable Extremal Regions (MSERs)

• Consider all possible thresholdings of a gray-scale image:

If I(x,y) > It then I(x,y)=255; else I(x,y)=0

Matas, J., Chum, O., Urban, M. and Pajdla, T., “Robust wide-baseline stereo from maximally stable extremal regions”, British Machine Vision Conf, pp. 384–393, 2002.

Page 75: Interest Point Detectors (see CS485/685 notes for more details)

Maximally Stable Extremal Regions (MSERs)

• Extermal Regions– All regions formed using different thresholds.– Can be extracted using connected components.

• Maximally Stable Extremal Regions– Regions that remain stable over a large range of thresholds.

• Approximate MSER by an ellipse

Page 76: Interest Point Detectors (see CS485/685 notes for more details)

Example

• Extermal regions can be extracted in O(nlog(logn)) time where n is the number of pixels.

• Sensitive to image blur.