Image S(tching Ali Farhadi CSE 576 Several - - PowerPoint PPT Presentation

image s tching
SMART_READER_LITE
LIVE PREVIEW

Image S(tching Ali Farhadi CSE 576 Several - - PowerPoint PPT Presentation

Image S(tching Ali Farhadi CSE 576 Several slides from Rick Szeliski, Steve Seitz, Derek Hoiem, and Ira Kemelmacher Combine two or


slide-1
SLIDE 1

Image ¡S(tching ¡

Ali ¡Farhadi ¡ CSE ¡576 ¡ ¡

¡ ¡ ¡ ¡ ¡

Several ¡slides ¡from ¡Rick ¡Szeliski, ¡Steve ¡Seitz, ¡Derek ¡Hoiem, ¡and ¡Ira ¡Kemelmacher ¡

slide-2
SLIDE 2
  • Combine ¡two ¡or ¡more ¡overlapping ¡images ¡to ¡

make ¡one ¡larger ¡image ¡

Add example Slide credit: Vaibhav Vaish

slide-3
SLIDE 3

How ¡to ¡do ¡it? ¡

  • Basic ¡Procedure ¡
  • 1. Take ¡a ¡sequence ¡of ¡images ¡from ¡the ¡same ¡

posi(on ¡

  • 1. Rotate ¡the ¡camera ¡about ¡its ¡op(cal ¡center ¡
  • 2. Compute ¡transforma(on ¡between ¡second ¡

image ¡and ¡first ¡

  • 3. ShiQ ¡the ¡second ¡image ¡to ¡overlap ¡with ¡the ¡first ¡
  • 4. Blend ¡the ¡two ¡together ¡to ¡create ¡a ¡mosaic ¡
  • 5. If ¡there ¡are ¡more ¡images, ¡repeat ¡
slide-4
SLIDE 4
  • 1. Take a sequence of images from the same

position

  • Rotate ¡the ¡camera ¡about ¡its ¡op(cal ¡center ¡
slide-5
SLIDE 5
  • 2. Compute transformation between images
  • Extract ¡interest ¡points ¡
  • Find ¡Matches ¡
  • Compute ¡transforma(on ¡? ¡
slide-6
SLIDE 6
  • 3. Shift the images to overlap
slide-7
SLIDE 7
  • 4. Blend the two together to create a mosaic
slide-8
SLIDE 8
  • 5. ¡Repeat ¡for ¡all ¡images ¡
slide-9
SLIDE 9

How ¡to ¡do ¡it? ¡

  • Basic ¡Procedure ¡
  • 1. Take ¡a ¡sequence ¡of ¡images ¡from ¡the ¡same ¡

posi(on ¡

  • 1. Rotate ¡the ¡camera ¡about ¡its ¡op(cal ¡center ¡
  • 2. Compute ¡transforma(on ¡between ¡second ¡

image ¡and ¡first ¡

  • 3. ShiQ ¡the ¡second ¡image ¡to ¡overlap ¡with ¡the ¡first ¡
  • 4. Blend ¡the ¡two ¡together ¡to ¡create ¡a ¡mosaic ¡
  • 5. If ¡there ¡are ¡more ¡images, ¡repeat ¡

✓ ¡

slide-10
SLIDE 10

Compute ¡Transforma(ons ¡

  • Extract ¡interest ¡points ¡
  • Find ¡good ¡matches ¡ ¡
  • Compute ¡transforma(on ¡

✓ ¡

Let’s ¡assume ¡we ¡are ¡given ¡a ¡set ¡of ¡good ¡matching ¡ interest ¡points ¡

✓ ¡

slide-11
SLIDE 11

mosaic PP

Image ¡reprojec(on ¡

  • The ¡mosaic ¡has ¡a ¡natural ¡interpreta(on ¡in ¡3D ¡

– The ¡images ¡are ¡reprojected ¡onto ¡a ¡common ¡plane ¡ – The ¡mosaic ¡is ¡formed ¡on ¡this ¡plane ¡

slide-12
SLIDE 12

Example ¡

Camera Center

slide-13
SLIDE 13

Image ¡reprojec(on ¡

  • Observa(on ¡

– Rather ¡than ¡thinking ¡of ¡this ¡as ¡a ¡3D ¡reprojec(on, ¡think ¡

  • f ¡it ¡as ¡a ¡2D ¡image ¡warp ¡from ¡one ¡image ¡to ¡another ¡
slide-14
SLIDE 14

Mo(on ¡models ¡

  • What ¡happens ¡when ¡we ¡take ¡two ¡images ¡with ¡

a ¡camera ¡and ¡try ¡to ¡align ¡them? ¡

  • transla(on? ¡
  • rota(on? ¡
  • scale? ¡
  • affine? ¡
  • Perspec(ve? ¡
slide-15
SLIDE 15

Recall: ¡Projec(ve ¡transforma(ons ¡

  • (aka ¡homographies) ¡
slide-16
SLIDE 16

Parametric ¡(global) ¡warping ¡

  • Examples ¡of ¡parametric ¡warps: ¡

transla(on ¡ rota(on ¡ aspect ¡ affine ¡ perspec(ve ¡

slide-17
SLIDE 17

2D ¡coordinate ¡transforma(ons ¡

  • transla(on: ¡

¡x’ ¡= ¡x ¡+ ¡t ¡ ¡ ¡x ¡= ¡(x,y) ¡

  • rota(on: ¡

¡x’ ¡= ¡R ¡x ¡+ ¡t ¡

  • similarity: ¡

¡x’ ¡= ¡s ¡R ¡x ¡+ ¡t ¡

  • affine:

¡ ¡x’ ¡= ¡A ¡x ¡+ ¡t ¡

  • perspec(ve: ¡x’ ¡≅ ¡H ¡x ¡

¡ ¡x ¡= ¡(x,y,1) ¡ ¡(x ¡is ¡a ¡homogeneous ¡coordinate) ¡

slide-18
SLIDE 18

Image ¡Warping ¡

  • Given ¡a ¡coordinate ¡transform ¡x’ ¡= ¡h(x) ¡and ¡a ¡

source ¡image ¡f(x), ¡how ¡do ¡we ¡compute ¡a ¡ transformed ¡image ¡g(x’) ¡= ¡f(h(x))? ¡

f(x) ¡ g(x’) ¡ x ¡ x’ ¡ h(x) ¡

slide-19
SLIDE 19

Forward ¡Warping ¡

  • Send ¡each ¡pixel ¡f(x) ¡to ¡its ¡corresponding ¡

loca(on ¡x’ ¡= ¡h(x) ¡in ¡g(x’) ¡

f(x) ¡ g(x’) ¡ x ¡ x’ ¡ h(x) ¡

  • What if pixel lands “between” two pixels?
slide-20
SLIDE 20

Forward ¡Warping ¡

  • Send ¡each ¡pixel ¡f(x) ¡to ¡its ¡corresponding ¡

loca(on ¡x’ ¡= ¡h(x) ¡in ¡g(x’) ¡

f(x) ¡ g(x’) ¡ x ¡ x’ ¡ h(x) ¡

  • What if pixel lands “between” two pixels?
  • Answer: add “contribution” to several pixels,

normalize later (splatting)

slide-21
SLIDE 21

Richard ¡Szeliski ¡ Image ¡S(tching ¡ 21 ¡

Inverse ¡Warping ¡

  • Get ¡each ¡pixel ¡g(x’) ¡from ¡its ¡corresponding ¡

loca(on ¡x’ ¡= ¡h(x) ¡in ¡f(x) ¡

f(x) ¡ g(x’) ¡ x ¡ x’ ¡ h-­‑1(x) ¡

  • What if pixel comes from “between” two pixels?
slide-22
SLIDE 22

Richard ¡Szeliski ¡ Image ¡S(tching ¡ 22 ¡

Inverse ¡Warping ¡

  • Get ¡each ¡pixel ¡g(x’) ¡from ¡its ¡corresponding ¡

loca(on ¡x’ ¡= ¡h(x) ¡in ¡f(x) ¡

  • What if pixel comes from “between” two pixels?
  • Answer: resample color value from

interpolated source image

f(x) ¡ g(x’) ¡ x ¡ x’ ¡ h-­‑1(x) ¡

slide-23
SLIDE 23

Interpola(on ¡

  • Possible ¡interpola(on ¡filters: ¡

– nearest ¡neighbor ¡ – bilinear ¡ – bicubic ¡(interpola(ng) ¡

slide-24
SLIDE 24

Mo(on ¡models ¡

Translation 2 unknowns Affine 6 unknowns Perspective 8 unknowns

slide-25
SLIDE 25

Finding ¡the ¡transforma(on ¡

  • Transla(on ¡

¡= ¡ ¡2 ¡degrees ¡of ¡freedom ¡

  • Similarity ¡ ¡= ¡ ¡4 ¡degrees ¡of ¡freedom ¡
  • Affine ¡ ¡

¡= ¡ ¡6 ¡degrees ¡of ¡freedom ¡

  • Homography ¡ ¡= ¡ ¡8 ¡degrees ¡of ¡freedom ¡
  • How ¡many ¡corresponding ¡points ¡do ¡we ¡need ¡

to ¡solve? ¡

slide-26
SLIDE 26

Plane ¡perspec(ve ¡mosaics ¡

– 8-­‑parameter ¡generaliza(on ¡of ¡affine ¡mo(on ¡

  • works ¡for ¡pure ¡rota(on ¡or ¡planar ¡surfaces ¡

– Limita(ons: ¡

  • local ¡minima ¡ ¡
  • slow ¡convergence ¡
  • difficult ¡to ¡control ¡interac(vely ¡
slide-27
SLIDE 27

Simple ¡case: ¡transla(ons ¡

How ¡do ¡we ¡solve ¡for ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡? ¡ ¡

slide-28
SLIDE 28

Mean ¡displacement ¡= ¡ ¡

¡ ¡

Simple ¡case: ¡transla(ons ¡

Displacement ¡of ¡match ¡i ¡ ¡= ¡

slide-29
SLIDE 29

Simple ¡case: ¡transla(ons ¡

  • System ¡of ¡linear ¡equa(ons ¡

– What ¡are ¡the ¡knowns? ¡ ¡Unknowns? ¡ – How ¡many ¡unknowns? ¡ ¡How ¡many ¡equa(ons ¡(per ¡match)? ¡

slide-30
SLIDE 30

Simple ¡case: ¡transla(ons ¡

  • Problem: ¡more ¡equa(ons ¡than ¡unknowns ¡

– “Overdetermined” ¡system ¡of ¡equa(ons ¡ – We ¡will ¡find ¡the ¡least ¡squares ¡solu(on ¡

slide-31
SLIDE 31

Least ¡squares ¡formula(on ¡

  • For ¡each ¡point ¡
  • we ¡define ¡the ¡residuals ¡as ¡ ¡
slide-32
SLIDE 32

Least ¡squares ¡formula(on ¡

  • Goal: ¡minimize ¡sum ¡of ¡squared ¡residuals ¡
  • “Least ¡squares” solu(on ¡
  • For ¡transla(ons, ¡is ¡equal ¡to ¡mean ¡displacement ¡
slide-33
SLIDE 33

Least ¡squares ¡

  • Find ¡t ¡that ¡minimizes ¡ ¡

¡

  • To ¡solve, ¡form ¡the ¡normal ¡equa4ons ¡
slide-34
SLIDE 34

Solving for translations

  • Using least squares

2n x 2 2 x 1 2n x 1

slide-35
SLIDE 35

Affine transformations

  • How many unknowns?
  • How many equations per match?
  • How many matches do we need?
slide-36
SLIDE 36

Affine transformations

  • Residuals:
  • Cost function:
slide-37
SLIDE 37

Affine transformations

  • Matrix form

2n x 6 6 x 1 2n x 1

slide-38
SLIDE 38

Solving for homographies

slide-39
SLIDE 39

Solving for homographies

slide-40
SLIDE 40

Direct Linear Transforms

Defines ¡a ¡least ¡squares ¡problem: ¡

  • Since ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡is ¡only ¡defined ¡up ¡to ¡scale, ¡solve ¡for ¡unit ¡vector ¡
  • Solu(on: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡eigenvector ¡of ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡with ¡smallest ¡eigenvalue ¡
  • Works ¡with ¡4 ¡or ¡more ¡points ¡

2n × 9 9 2n

slide-41
SLIDE 41

Richard ¡Szeliski ¡ Image ¡S(tching ¡ 41 ¡

Matching ¡features ¡

What ¡do ¡we ¡do ¡about ¡the ¡“bad” ¡matches? ¡

slide-42
SLIDE 42

Richard ¡Szeliski ¡ Image ¡S(tching ¡ 42 ¡

RAndom ¡SAmple ¡Consensus ¡

Select ¡one ¡match, ¡count ¡inliers ¡

slide-43
SLIDE 43

Richard ¡Szeliski ¡ Image ¡S(tching ¡ 43 ¡

RAndom ¡SAmple ¡Consensus ¡

Select ¡one ¡match, ¡count ¡inliers ¡

slide-44
SLIDE 44

Richard ¡Szeliski ¡ Image ¡S(tching ¡ 44 ¡

Least ¡squares ¡fit ¡

Find ¡“average” ¡transla(on ¡vector ¡

slide-45
SLIDE 45
slide-46
SLIDE 46

RANSAC ¡for ¡es(ma(ng ¡homography ¡

  • RANSAC ¡loop: ¡
  • 1. Select ¡four ¡feature ¡pairs ¡(at ¡random) ¡
  • 2. Compute ¡homography ¡H ¡(exact) ¡
  • 3. Compute ¡inliers ¡where ¡||pi’, H pi|| < ε
  • Keep ¡largest ¡set ¡of ¡inliers ¡
  • Re-­‑compute ¡least-­‑squares ¡H ¡es(mate ¡using ¡all ¡
  • f ¡the ¡inliers ¡

CSE ¡576, ¡Spring ¡2008 ¡ Structure ¡from ¡Mo(on ¡ 46 ¡

slide-47
SLIDE 47

47 ¡

Simple ¡example: ¡fit ¡a ¡line ¡

  • Rather ¡than ¡homography ¡H ¡(8 ¡numbers) ¡ ¡

fit ¡y=ax+b ¡(2 ¡numbers ¡a, ¡b) ¡to ¡2D ¡pairs ¡

47

slide-48
SLIDE 48

48 ¡

Simple ¡example: ¡fit ¡a ¡line ¡

  • Pick ¡2 ¡points ¡
  • Fit ¡line ¡
  • Count ¡inliers ¡

48

3 ¡inliers ¡

slide-49
SLIDE 49

49 ¡

Simple ¡example: ¡fit ¡a ¡line ¡

  • Pick ¡2 ¡points ¡
  • Fit ¡line ¡
  • Count ¡inliers ¡

49

4 ¡inliers ¡

slide-50
SLIDE 50

50 ¡

Simple ¡example: ¡fit ¡a ¡line ¡

  • Pick ¡2 ¡points ¡
  • Fit ¡line ¡
  • Count ¡inliers ¡

50

9 ¡inliers ¡

slide-51
SLIDE 51

51 ¡

Simple ¡example: ¡fit ¡a ¡line ¡

  • Pick ¡2 ¡points ¡
  • Fit ¡line ¡
  • Count ¡inliers ¡

51

8 ¡inliers ¡

slide-52
SLIDE 52

52 ¡

Simple ¡example: ¡fit ¡a ¡line ¡

  • Use ¡biggest ¡set ¡of ¡inliers ¡
  • Do ¡least-­‑square ¡fit ¡

52

slide-53
SLIDE 53

RANSAC ¡

Red: ¡ ¡ ¡rejected ¡by ¡2nd ¡nearest ¡neighbor ¡criterion ¡ Blue: ¡ ¡Ransac ¡outliers ¡ Yellow: ¡ ¡inliers ¡

slide-54
SLIDE 54

How ¡many ¡rounds? ¡ ¡

  • If ¡we ¡have ¡to ¡choose ¡s ¡samples ¡each ¡(me ¡

– with ¡an ¡outlier ¡ra(o ¡e ¡ – and ¡we ¡want ¡the ¡right ¡answer ¡with ¡probability ¡p ¡

slide-55
SLIDE 55

Richard ¡Szeliski ¡ Image ¡S(tching ¡ 55 ¡

Rota(onal ¡mosaics ¡

– Directly ¡op(mize ¡rota(on ¡and ¡focal ¡length ¡ – Advantages: ¡

  • ability ¡to ¡build ¡full-­‑view ¡ ¡

panoramas ¡

  • easier ¡to ¡control ¡interac(vely ¡
  • more ¡stable ¡and ¡accurate ¡ ¡

es(mates ¡

slide-56
SLIDE 56

Richard ¡Szeliski ¡ Image ¡S(tching ¡ 56 ¡

Rota(onal ¡mosaic ¡

  • Projec(on ¡equa(ons ¡
  • 1. Project ¡from ¡image ¡to ¡3D ¡ray ¡
  • (x0,y0,z0) = (u0-uc,v0-vc,f)
  • 2. Rotate ¡the ¡ray ¡by ¡camera ¡mo(on ¡
  • (x1,y1,z1) = R01 (x0,y0,z0)
  • 3. Project ¡back ¡into ¡new ¡(source) ¡image ¡
  • (u1,v1) = (fx1/z1+uc,fy1/z1+vc)
slide-57
SLIDE 57

Compu(ng ¡homography ¡

  • Assume ¡we ¡have ¡four ¡matched ¡points: ¡How ¡do ¡we ¡compute ¡

homography ¡H? ¡ ¡ Normalized ¡DLT ¡

  • 1. Normalize ¡coordinates ¡for ¡each ¡image ¡

a) Translate ¡for ¡zero ¡mean ¡ b) Scale ¡so ¡that ¡average ¡distance ¡to ¡origin ¡is ¡~sqrt(2) ¡ – This ¡makes ¡problem ¡bener ¡behaved ¡numerically ¡ ¡

  • 2. Compute ¡ ¡ ¡ ¡ ¡using ¡DLT ¡in ¡normalized ¡coordinates ¡
  • 3. Unnormalize: ¡ ¡

Tx x = ~ x T x ʹ″ ʹ″ = ʹ″ ~

T H T H ~

1 −

ʹ″ =

i i

Hx x = ʹ″

H ~

slide-58
SLIDE 58

Compu(ng ¡homography ¡

  • Assume ¡we ¡have ¡matched ¡points ¡with ¡outliers: ¡How ¡do ¡

we ¡compute ¡homography ¡H? ¡ Automa(c ¡Homography ¡Es(ma(on ¡with ¡RANSAC ¡

  • 1. Choose ¡number ¡of ¡samples ¡N ¡
  • 2. Choose ¡4 ¡random ¡poten(al ¡matches ¡
  • 3. Compute ¡H ¡using ¡normalized ¡DLT ¡
  • 4. Project ¡points ¡from ¡x ¡to ¡x’ ¡for ¡each ¡poten(ally ¡

matching ¡pair: ¡

  • 5. Count ¡points ¡with ¡projected ¡distance ¡ ¡< ¡ ¡t ¡

– E.g., ¡t ¡= ¡3 ¡pixels ¡

  • 6. Repeat ¡steps ¡2-­‑5 ¡N ¡(mes ¡

– Choose ¡H ¡with ¡most ¡inliers ¡

¡ ¡ ¡

HZ Tutorial ‘99

i i

Hx x = ʹ″

slide-59
SLIDE 59

Automa(c ¡Image ¡S(tching ¡

  • 1. Compute ¡interest ¡points ¡on ¡each ¡image ¡
  • 2. Find ¡candidate ¡matches ¡
  • 3. Es(mate ¡homography ¡H ¡using ¡matched ¡points ¡

and ¡RANSAC ¡with ¡normalized ¡DLT ¡

  • 4. Project ¡each ¡image ¡onto ¡the ¡same ¡surface ¡and ¡

blend ¡ ¡

slide-60
SLIDE 60

RANSAC ¡for ¡Homography ¡

Initial Matched Points

slide-61
SLIDE 61

RANSAC ¡for ¡Homography ¡

Final Matched Points

slide-62
SLIDE 62

RANSAC ¡for ¡Homography ¡

slide-63
SLIDE 63

Image ¡Blending ¡

slide-64
SLIDE 64

Feathering ¡

0 ¡ 1 ¡ 0 ¡ 1 ¡

+ =

slide-65
SLIDE 65

Effect ¡of ¡window ¡(ramp-­‑width) ¡size ¡

0 ¡ 1 ¡

leQ ¡ right ¡

0 ¡ 1 ¡

slide-66
SLIDE 66

Effect ¡of ¡window ¡size ¡

0 ¡ 1 ¡ 0 ¡ 1 ¡

slide-67
SLIDE 67

Good ¡window ¡size ¡

0 ¡ 1 ¡

“Optimal” window: smooth but not ghosted

  • Doesn’t always work...
slide-68
SLIDE 68

Pyramid ¡blending ¡

Create a Laplacian pyramid, blend each level

  • Burt, P. J. and Adelson, E. H., A multiresolution spline with applications to image mosaics, ACM Transactions on

Graphics, 42(4), October 1983, 217-236.

slide-69
SLIDE 69

Gaussian Pyramid Laplacian Pyramid

The ¡Laplacian ¡Pyramid ¡

G

1

G

2

G

n

G

  • =

L

  • =

1

L

  • =

2

L

n n

G L =

) expand(

1 +

− =

i i i

G G L ) expand(

1 +

+ =

i i i

G L G

slide-70
SLIDE 70

Laplacian ¡ level ¡ 4 ¡ Laplacian ¡ level ¡ 2 ¡ Laplacian ¡ level ¡ 0 ¡ leQ ¡pyramid ¡ right ¡pyramid ¡ blended ¡pyramid ¡

slide-71
SLIDE 71

Laplacian ¡image ¡blend ¡

  • 1. Compute ¡Laplacian ¡pyramid ¡
  • 2. Compute ¡Gaussian ¡pyramid ¡on ¡weight ¡image ¡ ¡
  • 3. Blend ¡Laplacians ¡using ¡Gaussian ¡blurred ¡

weights ¡

  • 4. Reconstruct ¡the ¡final ¡image ¡
slide-72
SLIDE 72

Mul(band ¡Blending ¡with ¡Laplacian ¡ Pyramid ¡

1 1 1 LeQ ¡pyramid ¡ Right ¡pyramid ¡ blend ¡

  • At ¡low ¡frequencies, ¡blend ¡slowly ¡
  • At ¡high ¡frequencies, ¡blend ¡quickly ¡
slide-73
SLIDE 73

Mul(band ¡blending ¡

  • 1. Compute ¡Laplacian ¡

pyramid ¡of ¡images ¡and ¡ mask ¡

  • 2. Create ¡blended ¡image ¡

at ¡each ¡level ¡of ¡ pyramid ¡

  • 3. Reconstruct ¡complete ¡

image ¡

Laplacian ¡pyramids ¡

slide-74
SLIDE 74

Blending ¡comparison ¡(IJCV ¡2007) ¡

slide-75
SLIDE 75

Poisson ¡Image ¡Edi(ng ¡

  • For ¡more ¡info: ¡ ¡Perez ¡et ¡al, ¡SIGGRAPH ¡2003 ¡

– hnp://research.microsoQ.com/vision/cambridge/papers/perez_siggraph03.pdf ¡ ¡

slide-76
SLIDE 76

Encoding blend weights: I(x,y) = (αR, αG, αB, α) color at p = Implement this in two steps:

  • 1. accumulate: add up the (α premultiplied) RGBα values at each pixel
  • 2. normalize: divide each pixel’s accumulated RGB by its α value

Alpha ¡Blending ¡

Optional: see Blinn (CGA, 1994) for details:

http://ieeexplore.ieee.org/iel1/38/7531/00310740.pdf? isNumber=7531&prod=JNL&arnumber=310740&arSt=83&ared =87&arAuthor=Blinn%2C+J.F.

I1 I2 I3 p

slide-77
SLIDE 77

Choosing ¡seams ¡

Image ¡1 ¡ Image ¡2 ¡ x ¡ x ¡ im1 ¡ im2 ¡

  • Easy ¡method ¡

– Assign ¡each ¡pixel ¡to ¡image ¡with ¡nearest ¡center ¡

slide-78
SLIDE 78

Choosing ¡seams ¡

  • Easy ¡method ¡

– Assign ¡each ¡pixel ¡to ¡image ¡with ¡nearest ¡center ¡ – Create ¡a ¡mask: ¡ ¡ – Smooth ¡boundaries ¡( ¡“feathering”): ¡ – Composite ¡

Image ¡1 ¡ Image ¡2 ¡ x ¡ x ¡ im1 ¡ im2 ¡

slide-79
SLIDE 79

Choosing ¡seams ¡

  • Bener ¡method: ¡dynamic ¡program ¡to ¡find ¡seam ¡

along ¡well-­‑matched ¡regions ¡

Illustra(on: ¡hnp://en.wikipedia.org/wiki/File:Rochester_NY.jpg ¡

slide-80
SLIDE 80

Gain ¡compensa(on ¡

  • Simple ¡gain ¡adjustment ¡

– Compute ¡average ¡RGB ¡intensity ¡of ¡each ¡image ¡in ¡

  • verlapping ¡region ¡

– Normalize ¡intensi(es ¡by ¡ra(o ¡of ¡averages ¡

slide-81
SLIDE 81

Blending ¡Comparison ¡

slide-82
SLIDE 82

Recognizing ¡Panoramas ¡

Brown and Lowe 2003, 2007

Some of following material from Brown and Lowe 2003 talk

slide-83
SLIDE 83

Recognizing ¡Panoramas ¡

Input: ¡N ¡images ¡

  • 1. Extract ¡SIFT ¡points, ¡descriptors ¡from ¡all ¡

images ¡

  • 2. Find ¡K-­‑nearest ¡neighbors ¡for ¡each ¡point ¡(K=4) ¡
  • 3. For ¡each ¡image ¡

a) Select ¡M ¡candidate ¡matching ¡images ¡by ¡coun(ng ¡ matched ¡keypoints ¡(m=6) ¡ b) Solve ¡homography ¡Hij ¡for ¡each ¡matched ¡image ¡

slide-84
SLIDE 84

Recognizing ¡Panoramas ¡

Input: ¡N ¡images ¡

  • 1. Extract ¡SIFT ¡points, ¡descriptors ¡from ¡all ¡

images ¡

  • 2. Find ¡K-­‑nearest ¡neighbors ¡for ¡each ¡point ¡(K=4) ¡
  • 3. For ¡each ¡image ¡

a) Select ¡M ¡candidate ¡matching ¡images ¡by ¡coun(ng ¡ matched ¡keypoints ¡(m=6) ¡ b) Solve ¡homography ¡Hij ¡for ¡each ¡matched ¡image ¡ c) Decide ¡if ¡match ¡is ¡valid ¡(ni ¡ ¡> ¡ ¡8 ¡ ¡+ ¡ ¡ ¡0.3 ¡ ¡nf ¡) ¡

# inliers # keypoints in

  • verlapping area
slide-85
SLIDE 85

Recognizing ¡Panoramas ¡(cont.) ¡

(now ¡we ¡have ¡matched ¡pairs ¡of ¡images) ¡

  • 4. Find ¡connected ¡components ¡
slide-86
SLIDE 86

Finding ¡the ¡panoramas ¡

slide-87
SLIDE 87

Finding ¡the ¡panoramas ¡

slide-88
SLIDE 88

Finding ¡the ¡panoramas ¡

slide-89
SLIDE 89

Recognizing ¡Panoramas ¡(cont.) ¡

(now ¡we ¡have ¡matched ¡pairs ¡of ¡images) ¡

  • 4. Find ¡connected ¡components ¡
  • 5. For ¡each ¡connected ¡component ¡

a) Solve ¡for ¡rota(on ¡and ¡f ¡ b) Project ¡to ¡a ¡surface ¡(plane, ¡cylinder, ¡or ¡sphere) ¡ c) Render ¡with ¡mul(band ¡blending ¡