Top Banner
Computational Photography: Image Mosaicing Jinxiang Chai
38

Computational Photography: Image Mosaicing Jinxiang Chai.

Dec 19, 2015

Download

Documents

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: Computational Photography: Image Mosaicing Jinxiang Chai.

Computational Photography: Image Mosaicing

Jinxiang Chai

Page 2: Computational Photography: Image Mosaicing Jinxiang Chai.

Outline

Image registration - feature-based registration

- pixel-based registration

Image mosaicing

Page 3: Computational Photography: Image Mosaicing Jinxiang Chai.

Required Readings

• Section 9.1, Szeliski book.

• Section 9.3.1

• recognizing panoramas [website]

Page 4: Computational Photography: Image Mosaicing Jinxiang Chai.

virtual wide-angle camera

Mosaics: Stitching Image Together

Page 5: Computational Photography: Image Mosaicing Jinxiang Chai.

Mosaic ProcedureBasic Procedure

– Take a sequence of images from the same position

• Rotate the camera about its optical center

– Compute transformation between second image and first

– Transform the second image to overlap with the first

– Blend the two together to create a mosaic– If there are more images, repeat

Page 6: Computational Photography: Image Mosaicing Jinxiang Chai.

Image Mosaic

realcamera

syntheticcamera

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

Is a pencil of rays contains all views

Page 7: Computational Photography: Image Mosaicing Jinxiang Chai.

Image Re-projection

mosaic PP

The mosaic has a natural interpretation in 3D– The images are reprojected onto a common plane– The mosaic is formed on this plane– Mosaic is a synthetic wide-angle camera

Page 8: Computational Photography: Image Mosaicing Jinxiang Chai.

Issues in Image Mosaic

mosaic PP

How to relate two images from the same camera center? - image registration

How to re-project images to a common plane? - image warping

?

?

Page 9: Computational Photography: Image Mosaicing Jinxiang Chai.

Image Mosaicing

Geometric relationship between images

Page 10: Computational Photography: Image Mosaicing Jinxiang Chai.

Image Mosaicing

Geometric relationship between images– Use 8-parameter projective transformation matrix

111

'

'

y

x

hg

fed

cba

y

x

Page 11: Computational Photography: Image Mosaicing Jinxiang Chai.

Image Mosaicing

Geometric relationship between images– Use 8-parameter projective transformation matrix

– Use a 3D rotation model (one R per image)

1

210

1

21

1

20

1201110

0200100

frf

fr

fr

rfrr

rfrr

111

'

'

y

x

hg

fed

cba

y

x

Derive it by yourself!

Page 12: Computational Photography: Image Mosaicing Jinxiang Chai.

Image MosaicingGeometric relationship between images

– Use 8-parameter projective transformation matrix– Use a 3D rotation model (one R per image)

Register all pairwise overlapping images– Feature-based registration– Pixel-based registration

Chain together inter-frame rotations

Page 13: Computational Photography: Image Mosaicing Jinxiang Chai.

Image Stitching

Stitch pairs together, blend, then crop

Page 14: Computational Photography: Image Mosaicing Jinxiang Chai.

Image Stitching

A big image stitched from 5 small images

Page 15: Computational Photography: Image Mosaicing Jinxiang Chai.

PanoramasWhat if you want a 360 field of view?

mosaic Projection Cylinder

Page 16: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Panoramas

Steps– Re-project each image onto a cylinder– Blend – Output the resulting mosaic

Page 17: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Projection– Map 3D point (X,Y,Z) onto cylinder

XY

Z

unit cylinder

Page 18: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Projection– Map 3D point (X,Y,Z) onto cylinder

XY

Z

unwrapped cylinder

– Convert to cylindrical coordinates

unit cylinder

Page 19: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Projection– Map 3D point (X,Y,Z) onto cylinder

XY

Z

unwrapped cylinder

– Convert to cylindrical coordinates

cylindrical image

– Convert to cylindrical image coordinates

• s defines size of the final image

unit cylinder

Page 20: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Panoramas

mosaic Projection Cylinder

A

B

Cannot map point A to Point B without knowing (X,Y,Z)

Page 21: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Panoramas

mosaic Projection Cylinder

BC

A

But we can map point C (images) to Point B.

Page 22: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical WarpingGiven focal length f

and image center (xc,yc)

X

YZ

(X,Y,Z)

(sin,h,cos)

Page 23: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Panoramas

f = 180 (pixels)

Map image to cylindrical or spherical coordinates– need known focal length

Image 384x300 f = 380f = 280

Page 24: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Panorama

3D rotation registration of four images taken with a handheld camera.

Page 25: Computational Photography: Image Mosaicing Jinxiang Chai.

Cylindrical Panorama

Page 26: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

• A fully automatic 2D image stitcher system

Input Images

Output panorama #1

Page 27: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

• A fully automatic 2D image stitcher system

Input Images

Output panorama #2

Page 28: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

• A fully automatic 2D image stitcher system

Input Images

Output panorama #3

Page 29: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

• A fully automatic 2D image stitcher system

Input Images

- How to recognize which images can be used for panoramas?- How to stitch them automatically?

Page 30: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

• A fully automatic 2D image stitcher system

Page 31: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

• A fully automatic 2D image stitcher system

- Image matching with SIFT features

- For every image, find the M best images with RANSAC

- Form a graph and find connected component in the graph

- Stitching and blending.

Page 32: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

Page 33: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

Page 34: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

Page 35: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

Page 36: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

Page 37: Computational Photography: Image Mosaicing Jinxiang Chai.

Recognizing Panoramas

Page 38: Computational Photography: Image Mosaicing Jinxiang Chai.

Outline

Image registration

Image mosaicing