Panoramas
CSC606: Intro Computer Vision
These slides are taken from Cornell university
From last time: Projection matrix
0
=
(in homogeneous image coordinates)
Back to panoramas
Can we use homographies to create a 360 degree panorama?
Idea: project images onto a common plane
mosaic projection plane
each image is warped with a homography
We’ll see what this homography means next
Can’t create a 360 panorama this way… we’ll fix this shortly
“Mosaic”
Creating a panorama
Geometric interpretation of mosaics
Image 1
Image 2
Optical Center
Image reprojection
PP2
PP1
What is the transformation?
Image 1
Image 2
Optical Center
How do we map points in image 2 into image 1?
image 1
image 2
3x3 homography
Step 1: Convert pixels in image 2 to rays in camera 2’s coordinate system.
Step 2: Convert rays in camera 2’s coordinates to rays in camera 1’s coordinates.
Step 3: Convert rays in camera 1’s coordinates to pixels in image 1’s coordinates.
intrinsics
extrinsics
(rotation only)
Can we use homography to create a 360 panorama?
These rays never hit the projection plane
Projection plane
Camera D
Cameras A, B, C
Answer: No
Panoramas
mosaic Projection Sphere
Spherical projection
X
Y
Z
unit sphere
unwrapped sphere
Spherical image
Unwrapping a sphere
Credit: JHT’s Planetary Pixel Emporium
Spherical reprojection
f = 200 (pixels)
input
f = 800
f = 400
Aligning spherical images
Aligning spherical images
Assembling the panorama
Problem: Drift
Problem: Drift
(x1,y1)
copy of first image
(xn,yn)
Spherical panoramas
+
+
+
+
Different projections are possible
Cube-map
Blending
Blending
Image Blending
Feathering
0
1
0
1
+
=
Effect of window size
0
1
left
right
0
1
Effect of window size
0
1
0
1
Good window size
0
1
“Optimal” window: smooth but not ghosted
Alpha Blending
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
Q: what if α = 0?
see Blinn (CGA, 1994) for details:
I1
I2
I3
p
Poisson Image Editing
For more info: Perez et al, SIGGRAPH 2003
Some panorama examples
“Before SIGGRAPH Deadline” Photo credit: Doug Zongker
Some panorama examples
Magic: ghost removal
M. Uyttendaele, A. Eden, and R. Szeliski. �Eliminating ghosting and exposure artifacts in image mosaics. �ICCV 2001
Magic: ghost removal
M. Uyttendaele, A. Eden, and R. Szeliski. �Eliminating ghosting and exposure artifacts in image mosaics. �ICCV 2001
Other types of mosaics
https://www.nasa.gov/centers/wallops/news/frozen_sos.html
Science on a Sphere
Questions?