digital visual effects yung-yu chuangcyy/courses/vfx/17spring/...image stitching digital visual...

84
Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac

Upload: others

Post on 08-Dec-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Image stitching

Digital Visual EffectsYung-Yu Chuang

with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac

Page 2: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Image stitching

• Stitching = alignment + blending

geometricalregistration

photometricregistration

Page 3: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Applications of image stitching

• Video stabilization• Video summarization• Video compression• Video matting• Panorama creation

Page 4: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Video summarization

Page 5: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Video compression

Page 6: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Object removal

input video

Page 7: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Object removal

remove foreground

Page 8: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Object removal

estimate background

Page 9: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Object removal

background estimation

Page 10: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Panorama creation

Page 11: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Why panorama?

• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°

Page 12: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Why panorama?

• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°– Human FOV = 200 x 135°

Page 13: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Why panorama?

• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°– Human FOV = 200 x 135°– Panoramic Mosaic = 360 x 180°

Page 14: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Panorama examples

• Similar to HDR, it is a topic of computational photography, seeking ways to build a better camera using either hardware or software.

• Most consumer cameras have a panorama mode• Mars:http://www.panoramas.dk/fullscreen3/f2_mars97.html

• Earth:http://www.panoramas.dk/new-year-2006/taipei.htmlhttp://www.360cities.net/http://maps.google.com.tw/

Page 15: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

What can be globally aligned?

• In image stitching, we seek for a matrix to globally warp one image into another. Are any two images of the same scene can be aligned this way?– Images captured with the same center of

projection– A planar scene or far-away scene

Page 16: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

A pencil of rays contains all views

realcamera

syntheticcamera

Can generate any synthetic camera viewas long as it has the same center of projection!

Page 17: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Mosaic as an image reprojection

mosaic projection plane

• The images are reprojected onto a common plane• The mosaic is formed on this plane• Mosaic is a synthetic wide-angle camera

Page 18: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Changing camera center

• Does it still work? synthetic PP

PP1

PP2

Page 19: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

What cannot • The scene with depth variations and the

camera has movement

Page 20: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Planar scene (or a faraway one)

• PP3 is a projection plane of both centers of projection, so we are OK!

• This is how big aerial photographs are made

PP1

PP3

PP2

Page 21: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Motion models

• Parametric models as the assumptions on the relation between two images.

Page 22: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

2D Motion models

Page 23: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Motion models

Translation

2 unknowns

Affine

6 unknowns

Perspective

8 unknowns

3D rotation

3 unknowns

Page 24: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

A case study: cylindrical panorama

• What if you want a 360 field of view?

mosaic projection cylinder

Page 25: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical panoramas

• Steps– Reproject each image onto a cylinder– Blend – Output the resulting mosaic

Page 26: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

applet• http://graphics.stanford.edu/courses/cs178/ap

plets/projection.html

Page 27: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical panorama

1. Take pictures on a tripod (or handheld)2. Warp to cylindrical coordinate3. Compute pairwise alignments4. Fix up the end-to-end alignment5. Blending6. Crop the result and import into a viewer

It is required to do radial distortion correction for better stitching results!

Page 28: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Taking pictures

Kaidan panoramic tripod head

Page 29: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Translation model

Page 30: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Where should the synthetic camera be

• The projection plane of some camera• Onto a cylinder

realcamera

syntheticcamera

Page 31: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical projection

Adopted from http://www.cambridgeincolour.com/tutorials/image-projections.htm

Page 32: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical projection

Page 33: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical projection

Adopted from http://www.cambridgeincolour.com/tutorials/image-projections.htm

Page 34: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical projection

unwrapped cylinderx

y

f

Page 35: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

z

Cylindrical projection

unwrapped cylinder

xy

θ

x

y

f

Page 36: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical projection

unwrapped cylinder

xy

z

x

y

fs=f gives less distortion

Page 37: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

f = 180 (pixels)

Cylindrical reprojection

f = 380f = 280Image 384x300

top-down view Focal length – the dirty secret…

Page 38: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

A simple method for estimating f

Or, you can use other software, such as AutoStich, to help.

df

w

p

Page 39: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Input images

Page 40: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical warping

Page 41: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Blending

• Why blending: parallax, lens distortion, scene motion, exposure difference

Page 42: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Blending

Page 43: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Blending

Page 44: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Blending

Page 45: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Gradient-domain stitching

Page 46: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Gradient-domain stitching

Page 47: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Panorama weaving

Page 48: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Assembling the panorama

• Stitch pairs together, blend, then crop

Page 49: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Problem: Drift

• Error accumulation– small errors accumulate over time

Page 50: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Problem: Drift

• Solution– add another copy of first image at the end– there are a bunch of ways to solve this problem

• add displacement of (y1 – yn)/(n -1) to each image after the first

• compute a global warp: y’ = y + ax• run a big optimization problem, incorporating this

constraint– best solution, but more complicated– known as “bundle adjustment”

(x1,y1)

• copy of first image

(xn,yn)

Page 51: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

End-to-end alignment and crop

Page 52: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Rectangling panoramas

video

Page 53: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Rectangling panoramas

Page 54: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Rectangling panoramas

Page 55: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Viewer: panorama

+

+

+

+

example: http://www.cs.washington.edu/education/courses/cse590ss/01wi/projects/project1/students/dougz/index.html

Page 56: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Viewer: texture mapped model

example: http://www.panoramas.dk/

Page 57: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Cylindrical panorama

1. Take pictures on a tripod (or handheld)2. Warp to cylindrical coordinate3. Compute pairwise alignments4. Fix up the end-to-end alignment5. Blending6. Crop the result and import into a viewer

Page 58: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Determine pairwise alignment?

• Feature-based methods: only use feature points to estimate parameters

• We will study the “Recognising panorama” paper published in ICCV 2003

• Run SIFT (or other feature algorithms) for each image, find feature matches.

Page 59: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Determine pairwise alignment

• p’=Mp, where M is a transformation matrix, p and p’ are feature matches

• It is possible to use more complicated models such as affine or perspective

• For example, assume M is a 2x2 matrix

• Find M with the least square error

n

ipMp

1

2'

yx

mmmm

yx

2221

1211

''

Page 60: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Determine pairwise alignment

• Overdetermined system

yx

mmmm

yx

2221

1211

''

'1221211

'1121111

ymymx

xmymx

'

'

'2

'1

'1

22

21

12

11

22

11

11

0000

0000

00

n

n

nn

nn

yx

xyx

mmmm

yxyx

yxyx

yx

Page 61: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Normal equation

Given an overdetermined system

bAx

bAAxA TT

the normal equation is that which minimizes the sum of the square differences between left and right sides

Why?

Page 62: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Normal equation

2)( bAxx E

n

m

nmn

m

b

b

x

x

aa

aa

:::

:

...::::::

... 1

1

1

111

nxm, n equations, m variables

Page 63: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Normal equation

n

m

jjnj

i

m

jjij

m

jjj

n

i

m

jjnj

m

jjij

m

jjj

bxa

bxa

bxa

b

b

b

xa

xa

xa

1

1

11

11

1

1

11

:

:

:

:

:

:

bAx

n

ii

m

jjij bxaE

1

2

1

2)( bAxx

Page 64: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Normal equation

n

ii

m

jjij bxaE

1

2

1

2)( bAxx

1

0xE

n

iii

n

ij

m

jiji baxaa

11

1 11 22

11 12 i

n

ii

m

jjij abxa

)(20 bAAxAx

TT

E bAAxA TT →

Page 65: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Normal equation

2bAx

Page 66: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Normal equation

bbxbAxbAAxAx

bbbAxAxbAxAxbAxbAxbAxbAx

bAxbAx

bAx

TTTTTTT

TTTTTT

TTT

TT

T

2

bAAxAx

TT 22 E

Page 67: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Determine pairwise alignment

• p’=Mp, where M is a transformation matrix, p and p’ are feature matches

• For translation model, it is easier.

• What if the match is false? Avoid impact of outliers.

n

iiiii yymxxmE

1

2'2

2'1

1

0mE

Page 68: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

RANSAC

• RANSAC = Random Sample Consensus• An algorithm for robust fitting of models in the

presence of many data outliers• Compare to robust statistics

• Given N data points xi, assume that majority of them are generated from a model with parameters , try to recover .

Page 69: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

RANSAC algorithm

Run k times:(1) draw n samples randomly(2) fit parameters with these n samples(3) for each of other N-n points, calculate

its distance to the fitted model, count the number of inlier points, c

Output with the largest c

How many times?How big? Smaller is better

How to define?Depends on the problem.

Page 70: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

How to determine k

p: probability of real inliersP: probability of success after k trials

knpP )1(1 n samples are all inliers

a failure

failure after k trials

)1log()1log(

npPk

n p k

3 0.5 35

6 0.6 97

6 0.5 293

for P=0.99

Page 71: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Example: line fitting

Page 72: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Example: line fitting

n=2

Page 73: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Model fitting

Page 74: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Measure distances

Page 75: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Count inliers

c=3

Page 76: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Another trial

c=3

Page 77: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

The best model

c=15

Page 78: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

RANSAC for Homography

Page 79: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

RANSAC for Homography

Page 80: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

RANSAC for Homography

Page 81: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Applications of panorama in VFX

• Background plates• Image-based lighting

Page 82: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Troy (image-based lighting)

http://www.cgnetworks.com/story_custom.php?story_id=2195&page=4

Page 83: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Spiderman 2 (background plate)

Page 84: Digital Visual Effects Yung-Yu Chuangcyy/courses/vfx/17spring/...Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and

Reference• Richard Szeliski, Image Alignment and Stitching: A Tutorial,

Foundations and Trends in Computer Graphics and Computer Vision, 2(1):1-104, December 2006.

• R. Szeliski and H.-Y. Shum. Creating full view panoramic image mosaics and texture-mapped models, SIGGRAPH 1997, pp251-258.

• M. Brown, D. G. Lowe, Recognising Panoramas, ICCV 2003.