Académique Documents
Professionnel Documents
Culture Documents
Deduce the image that would have been taken by a wide angle lens
Jaunt NEO
Google Jump
Samsung
Beyond
Nokia OZO
Panorama:
virtual wide
Panorama:
Virtualangle
Wide Angle
Two lectures:
Part 1: Monoscopic Panoramas
(todays lecture)
Part 2: Stereoscopic Panoramas
(next lecture)
http://people.csail.mit.edu/fredo/Panos/
Warping
Blending
1. Detect keypoints
2. Find out which keypoints in im1
match which keypoints in im2
Warping
Blending
3. Compute transformation
between im2 and im1
Warping
Blending
3. Compute transformation
between im2 and im1
Images: Levoy
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 9
How to Warp?
Slide: Levoy
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 10
T
x
T
x
x
Slide: Efros
T
Slide: Efros
p = (u, v)
Generic model
p' = T ( p)
Can we model the transformation as a matrix?
2D Transformations
Rotation
Scaling
! u' $ ! a 0 $! u $
#
&=#
&#
&
" v' % " 0 b %" v %
! u' $ ! cos
#
&=#
" v' % " sin
u' = u + tu
v' = v + tv
sin $! u $
&#
&
cos %" v %
Homogeneous Coordinates
Notation trick
u' = u + tu
v' = v + tv
! u' $ ! 1 0 tu $! u $
&#
#
& #
&
# v' & = # 0 1 tv &# v &
# 1 & # 0 0 1 &# 1 &
"
% #"
%
&%"
P(x,y,z)
p(u,v)
y
v
u = f .x / z
v = f .y / z
Viewpoint
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 16
! u $ ! U $ ! f
& #
#
& #
# v &~# V &=# 0
# 1 & # W & # 0
"
% "
% "
Image
coordinates
0 $! x
&#
f 0 &# y
0 1 &%#" z
0
Homogeneous
coordinates
$
&
&
&
%
(u, v)
(u', v')
O
Viewpoint
im1 im2
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 17
O
Viewpoint
im1 im2
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 18
p = (u, v,1)
p' = H. p
! wu' $ ! a b
#
& #
# wv' & = # d e
# w & # g h
"
% "
O
Viewpoint
im1 im2
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 19
$!
$
u
&#
&
&# v &
i &%#" 1 &%
c
f
Valid up to scale
So can set i = 1
Estimating Homography
a.uk + b.vk + c
u'k =
uk a + vk b + c uk u'k g vk v'k h = u'k
g.uk + h.vk +1
d.uk + e.vk + f
v'k =
uk d + vk e + f uk u'k g vk v'k h = v'k
g.uk + h.vk +1
Ax = b
x = [a, b, c, d, e, f , g, h]T
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 20
2D Image Transformations
Warping
Blending
3. Compute transformation
between im2 and im1
mosaic
p'
im2
im1
p' = H. p p = H 1 p'
im1 im2
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 24
Building a Mosaic
im1
im1
Bounding Box
mosaic
mosaic
im2
im1
Bounding Box
im2
im1
im1
http://www.julianbeever.net/
Warping
Blending
3. Compute transformation
between im2 and im1
Image: Durand
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 29
R1
im2
im1
im1
Set weight=1 if
only one im available
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 30
Smooth blending:
problem
Potential Artifacts
Smooth blending
Ghosting
Blurring
Basic reprojection
Image: Durand
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 31
Two-scale Blending
Idea: Combine smooth and abrupt transition
Split image into low and high frequency
Smooth blending for low frequencies: corrects exposure differences
Abrupt blending for high frequencies: avoids ghosting, preserves sharpness
Two-scale
Blending Result
Smooth
blending
Other methods:
Pyramid based
Gradient domain
Image: Durand
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 33
Warping
Blending
3. Compute transformation
between im2 and im1
Image: Levoy
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 35
How to avoid
this stretching?
Dont restrict
image surface
to a plane
Image: Levoy
Digital Image Processing 2015 Stanford University -- Panoramic Imaging 36
Cylindrical Panorama
Assume cylinder of unit radius
Y
P(x, y, z)
Unwraped Cylinder
p( , h)
= tan 1 (x / z)
h = y / x2 + z2
Spherical Panorama
Assume sphere of unit radius
Y
P(x, y, z)
Unwraped Sphere
p( , )
= tan 1 (x / z)
= tan 1 (y / x 2 + z 2 )
Sphere-to-plane mapping
Popular Mappings:
Equirectangular
Equal-area projection
Mercator
Cube maps
Professional panoramic photographers sometimes also use a pan-tilt head that makes it easy
Demo
https://graphics.stanford.edu/courses/cs178/applets/projection.html
youtube.com/360