Lecture 10: Scales and Descriptors Justin Johnson EECS 442 WI - - PowerPoint PPT Presentation

β–Ά
lecture 10 scales and descriptors
SMART_READER_LITE
LIVE PREVIEW

Lecture 10: Scales and Descriptors Justin Johnson EECS 442 WI - - PowerPoint PPT Presentation

Lecture 10: Scales and Descriptors Justin Johnson EECS 442 WI 2020: Lecture 10 - 1 February 11, 2020 Administrative HW2 out, due 1 week from tomorrow: Wednesday 2/19/2019, 11:59pm HW3 out tomorrow, due 2 weeks from Friday: Friday 2/27,


slide-1
SLIDE 1

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Lecture 10: Scales and Descriptors

1

slide-2
SLIDE 2

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Administrative

HW2 out, due 1 week from tomorrow: Wednesday 2/19/2019, 11:59pm HW3 out tomorrow, due 2 weeks from Friday: Friday 2/27, 11:59pm

2

slide-3
SLIDE 3

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Last Time: Motivation

3

Are these pictures of the same object? If so, how are they related?

slide-4
SLIDE 4

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Last Time: Finding + Matching

4

1: find corners+features 2: match based on local image data

Slide Credit: S. Lazebnik, original figure: M. Brown, D. Lowe

Finding and Matching

slide-5
SLIDE 5

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 - 5

Corner of the glasses Edge next to panel

Part 1: Finding Edges Part 2: Finding Corners

Last Time: Edges + Corners

slide-6
SLIDE 6

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Last Time: Edges via Image Gradients

6

Compute derivatives Ix and Iy with filters Ix Iy

slide-7
SLIDE 7

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Last Time: Edges via Image Gradients

7

I’m making the lightness equal to gradient magnitude

Gradient Direction: atan2(Ix, Iy) Gradient Magnitude: sqrt(Ix2 + Iy2)

slide-8
SLIDE 8

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Last Time: Edges via Image Gradients

8

g dx d f *

f

g dx d

Slide Credit: S. Seitz

𝑒 𝑒𝑦 𝑔 βˆ— 𝑕 = 𝑔 βˆ— 𝑒 𝑒𝑦 𝑕

slide-9
SLIDE 9

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Last Time: Corners

9

β€œedge”: no change along the edge direction β€œcorner”: significant change in all directions β€œflat” region: no change in all directions

Can localize the location, or any shift β†’ big intensity change.

Diagram credit: S. Lazebnik

slide-10
SLIDE 10

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Last Time: Detecting Corners

10

𝑡 = (

),+∈-

𝐽)

/

(

),+∈-

𝐽)𝐽+ (

),+∈-

𝐽)𝐽+ (

),+∈-

𝐽+

/

= 𝑺12 πœ‡2 πœ‡/ 𝑺

By doing a taylor expansion of the image, the second moment matrix tells us how quickly the image changes and in which directions. Can compute at each pixel Directions Amounts

slide-11
SLIDE 11

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Last Time: Detecting Corners

11

𝑆 = det 𝑡 βˆ’ 𝛽 𝑒𝑠𝑏𝑑𝑓 𝑡 / = πœ‡2πœ‡/ βˆ’ 𝛽 πœ‡2 + πœ‡/

/

β€œCorner” R > 0 β€œEdge” R < 0 β€œEdge” R < 0 β€œFlat” region |R| small

Ξ±: constant (0.04 to 0.06)

Slide credit: S. Lazebnik; Note: this refers to visualization ellipses, not original M ellipse. Other slides on the internet may vary

slide-12
SLIDE 12

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Harris Corner Detector

12

  • 1. Compute partial derivatives Ix, Iy per pixel
  • 2. Compute M at each pixel, using Gaussian

weighting w

C.Harris and M.Stephens. β€œA Combined Corner and Edge Detector.” Proceedings

  • f the 4th Alvey Vision Conference: pages 147β€”151, 1988.

Slide credit: S. Lazebnik

𝑡 = (

),+∈-

π‘₯(𝑦, 𝑧)𝐽)

/

(

),+∈-

π‘₯(𝑦, 𝑧)𝐽)𝐽+ (

),+∈-

π‘₯(𝑦, 𝑧)𝐽)𝐽+ (

),+∈-

π‘₯(𝑦, 𝑧)𝐽+

/

slide-13
SLIDE 13

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Harris Corner Detector

13

  • 1. Compute partial derivatives Ix, Iy per pixel
  • 2. Compute M at each pixel, using Gaussian

weighting w

  • 3. Compute response function R

𝑆 = det 𝑡 βˆ’ 𝛽 𝑒𝑠𝑏𝑑𝑓 𝑡 / = πœ‡2πœ‡/ βˆ’ 𝛽 πœ‡2 + πœ‡/

/ C.Harris and M.Stephens. β€œA Combined Corner and Edge Detector.” Proceedings

  • f the 4th Alvey Vision Conference: pages 147β€”151, 1988.

Slide credit: S. Lazebnik

slide-14
SLIDE 14

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Computing R

14

Slide credit: S. Lazebnik

slide-15
SLIDE 15

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Computing R

15

Slide credit: S. Lazebnik

slide-16
SLIDE 16

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Harris Corner Detector

16

  • 1. Compute partial derivatives Ix, Iy per pixel
  • 2. Compute M at each pixel, using Gaussian

weighting w

  • 3. Compute response function R
  • 4. Threshold R

C.Harris and M.Stephens. β€œA Combined Corner and Edge Detector.” Proceedings

  • f the 4th Alvey Vision Conference: pages 147β€”151, 1988.

Slide credit: S. Lazebnik

slide-17
SLIDE 17

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Harris Corner Detector

17

Slide credit: S. Lazebnik

slide-18
SLIDE 18

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Harris Corner Detector

18

  • 1. Compute partial derivatives Ix, Iy per pixel
  • 2. Compute M at each pixel, using Gaussian

weighting w

  • 3. Compute response function R
  • 4. Threshold R
  • 5. Take only local maxima

(Non-Maxima Suppression, NMS)

C.Harris and M.Stephens. β€œA Combined Corner and Edge Detector.” Proceedings

  • f the 4th Alvey Vision Conference: pages 147β€”151, 1988.

Slide credit: S. Lazebnik

slide-19
SLIDE 19

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Harris Corner Detector: NMS

19

R

x (image coordinate)

threshold Local Maxima are pixels with a higher R value than their neighbors

slide-20
SLIDE 20

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Harris Corner Detector

20

Slide credit: S. Lazebnik

slide-21
SLIDE 21

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Harris Corner Detector: Result

21

Slide credit: S. Lazebnik

slide-22
SLIDE 22

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Desirable Properties

22

If our detectors are repeatable, they should be:

  • Invariant to some things: image is transformed

and corners remain the same: D(T(I)) = D(I)

  • Covariant/equivariant with some things: image

is transformed and corners transform with it: D(T(I)) = T(D(I)) Where I is an image, T is a transformation, and D is our detector

Slide credit: S. Lazebnik

slide-23
SLIDE 23

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Affine Intensity Change

23

R x (image coordinate)

threshold

R x (image coordinate)

Partially invariant to affine intensity changes

Slide credit: S. Lazebnik

𝐽EFG = 𝑏𝐽HIJ + 𝑐

M only depends on derivatives, so b is irrelevant But a scales derivatives and there’s a threshold

slide-24
SLIDE 24

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Image Translation

24

All done with convolution. Convolution is translation invariant. Equivariant with translation

Slide credit: S. Lazebnik

slide-25
SLIDE 25

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Image Rotation

25

Rotations just cause the corner rotation to change. Eigenvalues remain the same. Equivariant with rotation

slide-26
SLIDE 26

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Image Scaling

26

Corner

One pixel can become many pixels and vice-versa. Not equivariant with scaling

slide-27
SLIDE 27

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Today

27

  • Fixing scaling by making detectors

in both location and scale

  • Enabling matching between

features by describing regions

slide-28
SLIDE 28

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Key Idea: Scale

28

1/2 1/2 1/2

Note: I’m also slightly blurring to prevent aliasing (https://en.wikipedia.org/wiki/Aliasing)

Left to right: each image is half-sized Upsampled with big pixels below

slide-29
SLIDE 29

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Key Idea: Scale

29

1/2 1/2 1/2

Note: I’m also slightly blurring to prevent aliasing (https://en.wikipedia.org/wiki/Aliasing)

Left to right: each image is half-sized If I apply a KxK filter, how much of the original image does it see in each image?

slide-30
SLIDE 30

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Solution to Scales: Try them all!

30

See: Multi-Image Matching using Multi-Scale Oriented Patches, Brown et al. CVPR 2005

Harris Detection Harris Detection Harris Detection Harris Detection

slide-31
SLIDE 31

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Aside: This is a common trick!

31

Given a 50x16 person detector, how do I detect: (a) 250x80 (b) 150x48 (c) 100x32 (d) 25x8 people?

Sample people from image

slide-32
SLIDE 32

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Aside: This is a common trick!

32

Detecting all the people The red box is a fixed size

Sample people from image

slide-33
SLIDE 33

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Aside: This is a common trick!

33

Sample people from image

Detecting all the people The red box is a fixed size

slide-34
SLIDE 34

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Aside: This is a common trick!

34

Sample people from image

Detecting all the people The red box is a fixed size

slide-35
SLIDE 35

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Blob Detection

35

Another detector (has some nice properties)

βˆ— =

Find maxima and minima of blob filter response in scale and space

Slide credit: N. Snavely

Minima Maxima

slide-36
SLIDE 36

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Gaussian Derivatives (1D)

36

𝐻M 𝑦 𝐻M 𝑦 = 1 𝜏 2𝜌 exp βˆ’ 𝑦/ 2𝜏/

slide-37
SLIDE 37

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Gaussian Derivatives (1D)

37

𝐻M 𝑦 πœ– πœ–π‘¦ 𝐻M 𝑦 πœ– πœ–π‘¦ 𝐻M 𝑦 = 𝑦 𝜏U 2𝜌 exp βˆ’ 𝑦/ 2𝜏/ = βˆ’ 𝑦 𝜏/ 𝐻M 𝑦

slide-38
SLIDE 38

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Gaussian Derivatives (1D)

38

𝐻M 𝑦 πœ– πœ–π‘¦ 𝐻M 𝑦 πœ–/ πœ–π‘¦/ 𝐻M 𝑦

πœ–/ πœ–π‘¦/ 𝐻M 𝑦 = 𝑦/ βˆ’ 𝜏/ 𝜏V 2𝜌 exp βˆ’ 𝑦/ 2𝜏/ = 𝑦/ 𝜏W βˆ’ 1 𝜏/ 𝐻M 𝑦

slide-39
SLIDE 39

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Gaussian Derivatives (2D)

πœ– πœ–π‘§ 𝑕 πœ– πœ–π‘¦ 𝑕

Gaussian 1st Deriv

πœ–/ πœ–/𝑧 𝑕 πœ–/ πœ–/𝑦 𝑕

2nd Deriv

slide-40
SLIDE 40

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Laplace of Gaussian (2D)

40

πœ–/ πœ–/𝑧 𝑕 πœ–/ πœ–/𝑦 𝑕

πœ–/ πœ–/𝑦 𝑕 + πœ–/ πœ–/𝑧 𝑕 +

Slight detail: for technical reasons, you need to scale the Laplacian.

βˆ‡EHYZ

/

= 𝜏/ πœ–/ πœ–π‘¦/ 𝑕 + πœ–/ πœ–/𝑧 𝑕

slide-41
SLIDE 41

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Edge Detection with Laplacian

41

𝑔

Edge

πœ–/ πœ–/𝑦 𝑕

Laplacian Of Gaussian

𝑔 βˆ— πœ–/ πœ–/𝑦 𝑕

Edge = Zero-crossing

Figure credit: S. Seitz

slide-42
SLIDE 42

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Blob Detection with Laplacian

42

Figure credit: S. Lazebnik

maximum Edge: zero-crossing Blob = Two edges in opposite directions When blob is just the right size, Laplacian gives a large absolute value

slide-43
SLIDE 43

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Scale Selection with Laplacian

43

Given binary circle and Laplacian filter of scale Οƒ, we can compute the response as a function of the scale.

𝜏 = 2

R: 0.02

𝜏 = 6

R: 2.9

𝜏 = 10

R: 1.8 Radius: 8

Image

slide-44
SLIDE 44

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Characteristic Scale

44

Characteristic scale of a blob is the scale that produces the maximum response

Image

  • Abs. Response

Slide credit: S. Lazebnik. For more, see: T. Lindeberg (1998). "Feature detection with automatic scale selection." International Journal of Computer Vision 30 (2): pp 77--116.

slide-45
SLIDE 45

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Blob Detection in Scale Space

45

  • 1. Convolve image with scale-normalized Laplacian

at several scales

Slide credit: S. Lazebnik

slide-46
SLIDE 46

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Blob Detection in Scale Space

46

Slide credit: S. Lazebnik

slide-47
SLIDE 47

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Blob Detection in Scale Space

47

Slide credit: S. Lazebnik

slide-48
SLIDE 48

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Blob Detection in Scale Space

48

  • 1. Convolve image with scale-normalized Laplacian

at several scales

  • 2. Find local maxima and minima of squared

Laplacian response in image+scale space

Slide credit: S. Lazebnik

slide-49
SLIDE 49

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Image and Scale Space

49

𝜏 = 2

R: 0.02

𝜏 = 6

R: 2.9

𝜏 = 10

R: 1.8 Radius: 8

Image

slide-50
SLIDE 50

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Image-Space Neighbors

50

Blue points are image-space neighbors

𝜏 = 2

R: 0.02

𝜏 = 6

R: 2.9

𝜏 = 10

R: 1.8 Radius: 8

Image

slide-51
SLIDE 51

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Scale Space Neighbors

51

Red points are neighbors in scale space

𝜏 = 2

R: 0.02

𝜏 = 6

R: 2.9

𝜏 = 10

R: 1.8 Radius: 8

Image

slide-52
SLIDE 52

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Local Maxima in Scale and Image

52

𝜏 = 2

R: 0.02

𝜏 = 6

R: 2.9

𝜏 = 10

R: 1.8 Radius: 8

Image

Green point is a local maxima in both image and scale space if: it is larger than its image-space neighbors (blue) and larger than its scale-space neighbors (red)

slide-53
SLIDE 53

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Blob Detection in Scale Space

53

Slide credit: S. Lazebnik

slide-54
SLIDE 54

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Blob Detection in Scale Space

54

Slide credit: S. Lazebnik

slide-55
SLIDE 55

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Efficient Implementation

55

  • Approximating the Laplacian with a difference of

Gaussians:

( )

2

( , , ) ( , , )

xx yy

L G x y G x y s s s = +

( , , ) ( , , ) DoG G x y k G x y s s =

  • (Laplacian)

(Difference of Gaussians)

Slide credit: S. Lazebnik

Gaussian is separable, so cheaper to compute!

slide-56
SLIDE 56

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Efficient Implementation

56

Original Image

Gaussian, sigma=2 Downsample by 2x Downsample by 2x Gaussian, sigma=1

Save computation by downsampling before blurring

slide-57
SLIDE 57

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Efficient Implementation

57

David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.

Slide credit: S. Lazebnik

slide-58
SLIDE 58

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Recall Two Problems for Today:

58

  • Fixing scaling by making detectors

in both location and scale

  • Enabling matching between

features by describing regions

slide-59
SLIDE 59

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Problem 1 Solved!

59

  • How do we deal with scales: try them all
  • Why is this efficient?

1 + 1 4 + 1 16 + 1 64 + 1 4a … = 4 3

Vast majority of effort is in the first and second scales

slide-60
SLIDE 60

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Second Problem: Describing Features

60

1: find corners+features 2: match based on local image data

Slide Credit: S. Lazebnik, original figure: M. Brown, D. Lowe

Finding and Matching

slide-61
SLIDE 61

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Second Problem: Describing Features

61

Image – 40

Image

1/2 size, rot. 45Β° Lightened+40

100x100 crop at Glasses

slide-62
SLIDE 62

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 - 62

Second Problem: Describing Features

Once we’ve found a corner/blobs, we can’t just use the image nearby. What about:

  • 1. Scale?
  • 2. Rotation?
  • 3. Additive light?
slide-63
SLIDE 63

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Handling Scale

63

Given characteristic scale (maximum Laplacian response), we can just rescale image

Slide credit: S. Lazebnik

slide-64
SLIDE 64

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Handling Rotation

64

2 p

Given window, can compute dominant

  • rientation and then rotate image

β€œy” β€œx”

Compute gradient direction at each pixel Build a histogram of gradient directions in window Find dominant direction from histogram Rotate so dominant direction is up

slide-65
SLIDE 65

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Scale and Rotation

65

Keypoints at characteristic scales and dominant orientations

Picture credit: S. Lazebnik. Paper: David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.

slide-66
SLIDE 66

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Scale and Rotation

66

Keypoints at characteristic scales and dominant orientations

Picture credit: S. Lazebnik. Paper: David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.

Rotate and set to common scale j Rotate and set to common scale

slide-67
SLIDE 67

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Scale and Rotation

67

Now if we had two images of the same scene but different scale / rotation, we would find the same keypoints and set them to a common scale / rotation

Pixels of the rotated, rescaled patches should be the same!

slide-68
SLIDE 68

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Illumination, Out-of-plane rotation?

68

We would like to be able to match these two points But the local patches look very different! Idea: Instead of comparing the pixels, instead use a feature vector to describe the appearance of each patch

slide-69
SLIDE 69

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

SIFT Descriptors

69

Figure from David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.

j

  • 1. Normalize the rotation / scale of the patch
  • 2. Compute gradient at each pixel
  • 3. Divide into sub-patches (here 2x2, actually 4x4)
  • 4. In each sub-patch, compute histogram of 8

gradient directions

  • 5. Describe the patch with 4*4*8 = 128 numbers
slide-70
SLIDE 70

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

SIFT Descriptors

70

Figure from David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.

j

Nice properties of SIFT:

  • 1. Using gradients gives invariance to illumination
  • 2. Using histograms of patches gives invariance to

small shifts / rotations

  • 3. Compactly describe local appearance of patches

with 128-dim vector

slide-71
SLIDE 71

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

SIFT Descriptors

71

  • In principle: build a histogram of the gradients
  • In reality: quite complicated
  • Gaussian weighting: smooth response
  • Normalization: reduces illumination effects
  • Clamping
  • Affine adaptation

Figure from David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.

Read the paper for all the gory details…

slide-72
SLIDE 72

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Properties of SIFT

72

  • Can handle: up to ~60 degree out-of-plane rotation,

Changes of illumination

  • Fast and efficient and lots of code available

Slide credit: N. Snavely

slide-73
SLIDE 73

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Feature Descriptors

73

128D vector x

Think of feature as some non-linear filter that maps pixels to 128D feature

Photo credit: N. Snavely

Distance between vectors gives us the visual appearance between patches

slide-74
SLIDE 74

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

SIFT Features: Instance Matching

π’š2 π’š/ π’š2 βˆ’ π’š/ = 0.61 π’šU π’š2 βˆ’ π’šU = 1.22

Example credit: J. Hays

slide-75
SLIDE 75

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

SIFT Features: Instance Matching

Example credit: J. Hays

π’šW π’šV π’šf π’šg π’šW βˆ’ π’šV = 0.34 π’šW βˆ’ π’šf = 0.30 π’šW βˆ’ π’šf = 0.40

slide-76
SLIDE 76

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

2nd Nearest Neighbor Trick

76

  • Given a feature x, nearest neighbor to x is a good match,

but distances can’t be thresholded.

  • Instead, find nearest neighbor and second nearest
  • neighbor. This ratio is a good test for matches:

𝑠 = π’šh βˆ’ π’š2ii π’šh βˆ’ π’š/ii

slide-77
SLIDE 77

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

2nd Nearest Neighbor Trick

77

Figure from David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.

slide-78
SLIDE 78

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Recap

78

1: find corners+features 2: match based on local image data

Slide Credit: S. Lazebnik, original figure: M. Brown, D. Lowe

Finding and Matching

slide-79
SLIDE 79

Justin Johnson February 11, 2020 EECS 442 WI 2020: Lecture 10 -

Next Task: Find a Transform

79

Find a transform that brings our matched features together!