Interest Point Detectors & RANSAC Instructor - Simon Lucey - - PowerPoint PPT Presentation

interest point detectors ransac
SMART_READER_LITE
LIVE PREVIEW

Interest Point Detectors & RANSAC Instructor - Simon Lucey - - PowerPoint PPT Presentation

Interest Point Detectors & RANSAC Instructor - Simon Lucey 16-423 - Designing Computer Vision Apps Today Image Gradients. Interest Point Detectors Matching Regions. RANSAC. I I ( x, y ) I ( x + 1 , y + 1) Simoncelli


slide-1
SLIDE 1

Interest Point Detectors & RANSAC

Instructor - Simon Lucey

16-423 - Designing Computer Vision Apps

slide-2
SLIDE 2

Today

  • Image Gradients.
  • Interest Point Detectors
  • Matching Regions.
  • RANSAC.
slide-3
SLIDE 3
slide-4
SLIDE 4

I(x, y) I(x + 1, y + 1) I

Simoncelli & Olshausen 2001

slide-5
SLIDE 5

I(x, y) I I(x + 8, y + 8)

Simoncelli & Olshausen 2001

slide-6
SLIDE 6

I(x, y) I I(x + 16, y + 16)

Simoncelli & Olshausen 2001

slide-7
SLIDE 7

I(x, y) I I(x + 50, y + 50)

Simoncelli & Olshausen 2001

slide-8
SLIDE 8

I(x, y) I I(x + 50, y + 50)

Simoncelli & Olshausen 2001

slide-9
SLIDE 9

Pixel Coherence

  • The pixel coherence assumption demonstrates that pixels

within natural images are heavily correlated with one another within a local neighborhood (e.g., +/- 5 pixels).

  • For example,

5

N

3 4 3 2 ? 5 5 4 2

3

slide-10
SLIDE 10

Pixel Coherence

  • The pixel coherence assumption demonstrates that pixels

within natural images are heavily correlated with one another within a local neighborhood (e.g., +/- 5 pixels).

  • For example,

5

N

3 4 3 2 ? 5 5 4 2

3

“Typically assume that pixels within +/- 3, 5 or 7 pixels are highly correlated.”

slide-11
SLIDE 11

IGxH x

Estimating Gradients

6

  • Images are a discretely sampled representation of a

continuous signal,

(Black)

slide-12
SLIDE 12

IGxH x

Estimating Gradients

7

  • Images are a discretely sampled representation of a

continuous signal,

IGxH x

(Black)

slide-13
SLIDE 13
  • What if I want to know given that I have only the

appearance at and ?

I(x0 + ∆x)

Estimating Gradients

8

(Black)

∆x

IGxH x

IFxH x

x0

I(x0)

I(x0 + ∆x) I(x0)

slide-14
SLIDE 14
  • Again, simply take the Taylor series approximation?

Estimating Gradients

9

(Black)

IGxH x

IFxH x

x0

I(x0 + ∆x) I(x0)

I(x0 + ∆x) ≈ I(x0) + ∂I(x0) ∂x

T

∆x

slide-15
SLIDE 15
  • Again, simply take the Taylor series approximation?

Estimating Gradients

9

(Black)

IGxH x

IFxH x

x0

I(x0 + ∆x) I(x0)

I(x0 + ∆x) ≈ I(x0) + ∂I(x0) ∂x

T

∆x

∂I(x0) ∂x

slide-16
SLIDE 16
  • Traditional method for calculating gradients in vision is

through the use of edge filters. (e.g., Sobel, Prewitt).

  • where,

∗ ∗

Gradients through Filters

10

“Horizontal” “Vertical”

∂I(x) ∂x = [Ix(x), Iy(x)]T

Iy Ix I

slide-17
SLIDE 17
  • Traditional method for calculating gradients in vision is

through the use of edge filters. (e.g., Sobel, Prewitt).

  • where,

∗ ∗

Gradients through Filters

10

“Horizontal” “Vertical”

∂I(x) ∂x = [Ix(x), Iy(x)]T

Iy Ix I

“Often have to apply a smoothing filter as well.”

slide-18
SLIDE 18

Today

  • Natural Image Statistics.
  • Interest Point Detectors.
  • Matching Regions.
  • RANSAC.
slide-19
SLIDE 19

Interest Point Detectors

slide-20
SLIDE 20

Interest Point Detectors

  • Interest point detectors, in general, detect corners.
  • A dense approach (using all pixels) will be far too slow.
  • Matching lines suffers from the “aperture problem” (i.e. has

the line moved along itself?).

  • Corners are:-
  • relatively sparse
  • well-localized
  • good for matching
  • reasonably cheap to compute
  • appear quite robustly
  • useful for geometry.
slide-21
SLIDE 21

A(∆x, ∆y) = X

(xk,yk)∈N (x,y)

||I(xk, yk) − I(xk + ∆x, yk + ∆y)||2 N (∆x, ∆y)

Interest Point Detectors

  • Approach is based on concept of auto-correlation,

14

slide-22
SLIDE 22

N(x)

Interest Point Detectors

  • Approach is based on concept of auto-correlation,

15

“in vector form” “local neighborhood”

A(∆x) = X

xk∈N (x)

||I(xk) − I(xk + ∆x)||2

slide-23
SLIDE 23

A(∆x)

5 10 15 20 25 5 10 15 20 25 5 10 15 20 25 5 10 15 20 25

Interest Point Detectors

  • Which patches match the auto-correlation responses?

16

A(∆x) = X

xk∈N (x)

||I(xk) − I(xk + ∆x)||2

slide-24
SLIDE 24

A(∆x)

5 10 15 20 25 5 10 15 20 25 5 10 15 20 25 5 10 15 20 25

Interest Point Detectors

  • Which patches match the auto-correlation responses?

16

A(∆x) = X

xk∈N (x)

||I(xk) − I(xk + ∆x)||2

slide-25
SLIDE 25

Harris Detector

  • Harris & Stephens (1988) proposed,

17

slide-26
SLIDE 26

≈ X

i∈N

||I(xi) − I(xi) − ∂I(xi) ∂x

T

∆x||2 ≈ ∆xT H∆x H = X

i∈N

∂I(xi) ∂x ∂I(xi) ∂x

T

Harris Detector

  • How can one characterize these three situations?

A(∆x) = X

xk∈N (x)

||I(xk) − I(xk + ∆x)||2

  • We can simplify this through a linear approximation,
  • where,
slide-27
SLIDE 27

Harris Corner Detector

Make decision based on image structure tensor

H = X

i∈N

∂I(xi) ∂x ∂I(xi) ∂x

T

slide-28
SLIDE 28

Harris Detector

20

slide-29
SLIDE 29

Effects of Scale

  • Consider a single row or column of the image

– Plotting intensity as a function of position gives a signal

Source: S. Seitz

slide-30
SLIDE 30

Effects of Scale

  • Consider a single row or column of the image

– Plotting intensity as a function of position gives a signal

  • Where is the edge?

Source: S. Seitz

slide-31
SLIDE 31

Search Multiple Scales

f

Source: S. Seitz

slide-32
SLIDE 32

Search Multiple Scales

f g

Source: S. Seitz

slide-33
SLIDE 33

Search Multiple Scales

f g f * g

Source: S. Seitz

slide-34
SLIDE 34

Search Multiple Scales

f g f * g

Source: S. Seitz

slide-35
SLIDE 35

Search Multiple Scales

  • To find edges, look for peaks in

f g f * g

Source: S. Seitz

slide-36
SLIDE 36

SIFT Detector

  • Filter with difference of Gaussian filters at increasing scales
  • Build image stack (scale space)
  • Find extrema in this 3D volume
slide-37
SLIDE 37

Coarse to Fine

24

slide-38
SLIDE 38

SIFT Detector

Identified Corners Remove those

  • n edges

Remove those where contrast is low

slide-39
SLIDE 39

Today

  • Natural Image Statistics.
  • Interest Point Detectors.
  • Matching Regions.
  • RANSAC.
slide-40
SLIDE 40
  • Once we have detected local regions, we must then match

them.

Matching Regions

27

image 1 image 2

SSD : sum of square difference Small difference values similar patches

X

[∆x,∆y]T ∈N

||I1(x1 + ∆x, y1 + ∆y) − I2(x2 + ∆x, y2 + ∆y)||2

2

(x1, y1) (x2, y2)

slide-41
SLIDE 41

Problems with SSD

  • SSD measures are

sensitive to both,

  • geometric and,
  • photometric variation.
  • Common practice to

use descriptors.

28

I1 I2

slide-42
SLIDE 42

Planar Affine Patch Assumption

29

“View 1” “View 2”

  • A number of technique have been proposed to detect affine

covariant regions (Schmid et al. 2004).

slide-43
SLIDE 43

Rotation Invariance

  • Estimation of the dominant orientation

– extract gradient orientation – histogram over gradient orientation – peak in this histogram

  • Rotate patch in dominant direction
slide-44
SLIDE 44

SIFT Descriptor

  • 1. Compute image gradients
  • 2. Pool into local histograms
  • 3. Concatenate histograms
  • 4. Normalize histograms

More on this in future lectures.

slide-45
SLIDE 45

Why Pool?

slide-46
SLIDE 46

Why Pool?

slide-47
SLIDE 47

Why Pool?

“average”

slide-48
SLIDE 48

Why Pool?

“histogram” “pooling” “blurring”

slide-49
SLIDE 49

Why Pool?

“histogram” “pooling” “blurring”

slide-50
SLIDE 50

MATLAB Example

  • Example in MATLAB,

>> h = fspecial(‘gaussian’,[25,25],3); >> resp = imfilter(im, h);

h resp

slide-51
SLIDE 51

MATLAB Example

  • Example in MATLAB,

>> h = fspecial(‘gaussian’,[25,25],3); >> resp = imfilter(im, h);

h resp

slide-52
SLIDE 52

Other Descriptors

  • Since SIFT, a plethora of other descriptors have been

proposed.

  • SIFT is sometimes problematic to use in practice as it is
  • protected under existing patents.
  • In OpenCV alone there are,
  • SURF - (patent protected)
  • BRIEF
  • PHREAK
  • See following link for tutorial in OpenCV.
  • ORB
  • BRISK
  • FAST
slide-53
SLIDE 53

Other Descriptors

  • Since SIFT, a plethora of other descriptors have been

proposed.

  • SIFT is sometimes problematic to use in practice as it is
  • protected under existing patents.
  • In OpenCV alone there are,
  • SURF - (patent protected)
  • BRIEF
  • PHREAK
  • See following link for tutorial in OpenCV.
  • ORB
  • BRISK
  • FAST
slide-54
SLIDE 54

Today

  • Natural Image Statistics.
  • Interest Point Detectors.
  • Matching Regions.
  • RANSAC.
slide-55
SLIDE 55

Robust Estimation

  • Least squares criterion is

not robust to outliers

  • For example, the two
  • utliers here cause the fitted

line to be quite wrong.

  • One approach to fitting

under these circumstances is to use RANSAC – “Random sampling by consensus”

slide-56
SLIDE 56

RANSAC

slide-57
SLIDE 57

RANSAC

slide-58
SLIDE 58

Fitting a homography with RANSAC

Original images Initial matches Inliers from RANSAC

slide-59
SLIDE 59

Things to try in iOS - GPUImage

See - https://github.com/BradLarson/GPUImage for more details.

slide-60
SLIDE 60

More to read…

  • Prince et al.
  • Chapter 13, Sections 2-3.
  • Corke et al.
  • Chapter 13, Section 3.
  • E. Rublee et al. “ORB: an efficient alternative to SIFT or

SURF”, ICCV 2011.