lecture 6: image transformations and alignment cs6670: computer vision noah snavely
Post on 23-Jan-2016
240 views
TRANSCRIPT
![Page 1: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/1.jpg)
Lecture 6: Image transformations and alignment
CS6670: Computer VisionNoah Snavely
![Page 2: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/2.jpg)
Announcement
• New TA! Adarsh Kowdle
• Office hours: M 11-12, Ward Laboratory 112
![Page 3: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/3.jpg)
Announcements
• Project 1 out, due Thursday, 9/24, by 11:59pm
• Quiz on Thursday, first 10 minutes of class
• Next week: guest lecturer, Prof. Pedro Felzenszwalb, U. Chicago
![Page 4: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/4.jpg)
Announcements
• Project 2 will be released on Tuesday
• You can work in groups of two – Send me your groups by Friday evening
![Page 5: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/5.jpg)
Readings
• Szeliski Chapter 3.5 (image warping), 9.1 (motion models)
![Page 6: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/6.jpg)
Announcements
• A total of 3 late days will be allowed for projects
![Page 7: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/7.jpg)
Project 1 questions
![Page 8: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/8.jpg)
Last time: projection
![Page 9: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/9.jpg)
Perspective projection
Projection is a matrix multiply using homogeneous coordinates:
divide by third coordinate
Equivalent to:
![Page 10: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/10.jpg)
Perspective projection
(intrinsics)
in general,
: aspect ratio (1 unless pixels are not square)
: skew (0 unless pixels are shaped like rhombi/parallelograms)
: principal point ((0,0) unless optical axis doesn’t intersect projection plane at origin)
(upper triangular matrix)
(converts from 3D rays in camera coordinate system to pixel coordinates)
![Page 11: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/11.jpg)
Extrinsics• How do we get the camera to “canonical form”?
– (Center of projection at the origin, x-axis points right, y-axis points up, z-axis points backwards)
0
Step 1: Translate by -c
![Page 12: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/12.jpg)
Extrinsics• How do we get the camera to “canonical form”?
– (Center of projection at the origin, x-axis points right, y-axis points up, z-axis points backwards)
0
Step 1: Translate by -c
How do we represent translation as a matrix multiplication?
![Page 13: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/13.jpg)
Extrinsics• How do we get the camera to “canonical form”?
– (Center of projection at the origin, x-axis points right, y-axis points up, z-axis points backwards)
0
Step 1: Translate by -cStep 2: Rotate by R
3x3 rotation matrix
![Page 14: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/14.jpg)
Extrinsics• How do we get the camera to “canonical form”?
– (Center of projection at the origin, x-axis points right, y-axis points up, z-axis points backwards)
0
Step 1: Translate by -cStep 2: Rotate by R
![Page 15: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/15.jpg)
Projection matrix
(t in book’s notation)
translationrotationprojection
intrinsics
![Page 16: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/16.jpg)
Projection matrix
0
=
(in homogeneous image coordinates)
![Page 17: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/17.jpg)
Perspective distortion
• What does a sphere project to?
Image source: F. Durand
![Page 18: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/18.jpg)
Perspective distortion
• What does a sphere project to?
![Page 19: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/19.jpg)
Distortion
• Radial distortion of the image– Caused by imperfect lenses– Deviations are most noticeable for rays that
pass through the edge of the lens
No distortion Pin cushion Barrel
![Page 20: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/20.jpg)
Correcting radial distortion
from Helmut Dersch
![Page 21: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/21.jpg)
Modeling distortion
• To model lens distortion– Use above projection operation instead of standard
projection matrix multiplication
Apply radial distortion
Apply focal length translate image center
Project to “normalized”
image coordinates
![Page 22: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/22.jpg)
Other types of projection
• Lots of intriguing variants…• (I’ll just mention a few fun ones)
![Page 23: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/23.jpg)
360 degree field of view…
• Basic approach– Take a photo of a parabolic mirror with an orthographic lens (Nayar)– Or buy one a lens from a variety of omnicam manufacturers…
• See http://www.cis.upenn.edu/~kostas/omni.html
![Page 24: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/24.jpg)
Rollout Photographs © Justin Kerr
http://research.famsi.org/kerrmaya.html
Rotating sensor (or object)
Also known as “cyclographs”, “peripheral images”
![Page 25: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/25.jpg)
Photofinish
![Page 26: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/26.jpg)
Questions?
![Page 27: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/27.jpg)
Today: Image transformations and alignment
Full screen panoramas (cubic): http://www.panoramas.dk/ Mars: http://www.panoramas.dk/fullscreen3/f2_mars97.html
2003 New Years Eve: http://www.panoramas.dk/fullscreen3/f1.html
![Page 28: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/28.jpg)
Why Mosaic?
• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°
Slide from Brown & Lowe
![Page 29: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/29.jpg)
Why Mosaic?
• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°– Human FOV = 200 x 135°
Slide from Brown & Lowe
![Page 30: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/30.jpg)
Why Mosaic?
• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°– Human FOV = 200 x 135°– Panoramic Mosaic = 360 x 180°
Slide from Brown & Lowe
![Page 31: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/31.jpg)
Mosaics: stitching images together
![Page 32: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/32.jpg)
Readings
• Szeliski:– Chapter 3.5: Image warping– Chapter 5.1: Feature-based alignment– Chapter 8.1: Motion models
![Page 33: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/33.jpg)
Richard Szeliski Image Stitching 34
Image Warping
• image filtering: change range of image• g(x) = h(f(x))
• image warping: change domain of image• g(x) = f(h(x))
f
x
hg
x
f
x
hg
x
![Page 34: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/34.jpg)
Richard Szeliski Image Stitching 35
Image Warping
• image filtering: change range of image• g(x) = h(f(x))
• image warping: change domain of image• g(x) = f(h(x))
h
h
f
f g
g
![Page 35: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/35.jpg)
Richard Szeliski Image Stitching 36
Parametric (global) warping
• Examples of parametric warps:
translation rotation aspect
affineperspective
cylindrical
![Page 36: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/36.jpg)
Parametric (global) warping
• Transformation T is a coordinate-changing machine:p’ = T(p)
• What does it mean that T is global?– Is the same for any point p– can be described by just a few numbers (parameters)
• Let’s consider linear xforms (can be represented by a 2D matrix):
T
p = (x,y) p’ = (x’,y’)
![Page 37: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/37.jpg)
Common linear transformations
• Uniform scaling by s:
(0,0) (0,0)
What is the inverse?
![Page 38: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/38.jpg)
Common linear transformations
• Rotation by angle θ (about the origin)
(0,0) (0,0)
What is the inverse?For rotations:
![Page 39: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/39.jpg)
2x2 Matrices
• What types of transformations can be represented with a 2x2 matrix?2D mirror about Y axis?
2D mirror over (0,0)?
![Page 40: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/40.jpg)
• What types of transformations can be represented with a 2x2 matrix?2D Translation?
Translation is not a linear operation on 2D coordinates
NO!
2x2 Matrices
![Page 41: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/41.jpg)
All 2D Linear Transformations
• Linear transformations are combinations of …– Scale,– Rotation,– Shear, and– Mirror
• Properties of linear transformations:– Origin maps to origin– Lines map to lines– Parallel lines remain parallel– Ratios are preserved– Closed under composition
y
x
dc
ba
y
x
'
'
yx
lkji
hgfe
dcba
yx''
![Page 42: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/42.jpg)
Translation
• Solution: homogeneous coordinates to the rescue
![Page 43: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/43.jpg)
Affine transformations
any transformation with last row [ 0 0 1 ] we call an affine transformation
![Page 44: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/44.jpg)
Basic affine transformations
1100
0cossin
0sincos
1
'
'
y
x
y
x
1100
10
01
1
'
'
y
x
t
t
y
x
y
x
1100
01
01
1
'
'
y
x
sh
sh
y
x
y
x
Translate
2D in-plane rotation Shear
1100
00
00
1
'
'
y
x
s
s
y
x
y
x
Scale
intrinsics matrix
![Page 45: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/45.jpg)
Affine Transformations
• Affine transformations are combinations of …– Linear transformations, and– Translations
• Properties of affine transformations:– Origin does not necessarily map to origin– Lines map to lines– Parallel lines remain parallel– Ratios are preserved– Closed under composition
wyx
fedcba
wyx
100''
![Page 46: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/46.jpg)
Projective Transformations
• Projective transformations …– Affine transformations, and– Projective warps
• Properties of projective transformations:– Origin does not necessarily map to origin– Lines map to lines– Parallel lines do not necessarily remain parallel– Ratios are not preserved– Closed under composition
wyx
ihgfedcba
wyx
'''
![Page 47: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/47.jpg)
Projective Transformations
Called a homography (or planar perspective map)
![Page 48: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/48.jpg)
Image warping with homographies
image plane in front image plane belowblack areawhere no pixelmaps to
![Page 49: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/49.jpg)
2D image transformations
These transformations are a nested set of groups• Closed under composition and inverse is a member
![Page 50: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/50.jpg)
Image Warping
• Given a coordinate xform (x’,y’) = T(x,y) and a source image f(x,y), how do we compute an xformed image g(x’,y’) = f(T(x,y))?
f(x,y) g(x’,y’)x x’
T(x,y)y y’
![Page 51: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/51.jpg)
Forward Warping
• Send each pixel f(x) to its corresponding location (x’,y’) = T(x,y) in g(x’,y’)
f(x,y) g(x’,y’)x x’
T(x,y)
• What if pixel lands “between” two pixels?
y y’
![Page 52: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/52.jpg)
Forward Warping
• Send each pixel f(x,y) to its corresponding location x’ = h(x,y) in g(x’,y’)
f(x,y) g(x’,y’)x x’
T(x,y)
• What if pixel lands “between” two pixels?• Answer: add “contribution” to several pixels,
normalize later (splatting)• Can still result in holes
y y’
![Page 53: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/53.jpg)
Inverse Warping
• Get each pixel g(x’,y’) from its corresponding location (x,y) = T-1(x,y) in f(x,y)
f(x,y) g(x’,y’)x x’
T-1(x,y)
• Requires taking the inverse of the transform• What if pixel comes from “between” two pixels?
y y’
![Page 54: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/54.jpg)
Inverse Warping
• Get each pixel g(x’) from its corresponding location x’ = h(x) in f(x)
• What if pixel comes from “between” two pixels?• Answer: resample color value from interpolated
(prefiltered) source image
f(x,y) g(x’,y’)x x’
y y’T-1(x,y)
![Page 55: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/55.jpg)
Interpolation
• Possible interpolation filters:– nearest neighbor– bilinear– bicubic (interpolating)– sinc
• Needed to prevent “jaggies” and “texture crawl”
(with prefiltering)
![Page 56: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/56.jpg)
Questions?
• 3-minute break
![Page 57: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/57.jpg)
Back to mosaics
• How to we align the images?
![Page 58: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/58.jpg)
Creating a panorama
• Basic 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 59: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/59.jpg)
Geometric Interpretation of Mosaics
• If we capture all 360º of rays, we can create a 360º panorama• The basic operation is projecting an image from one plane to another• The projective transformation is scene-INDEPENDENT
• This depends on all the images having the same optical center
Image 1
Image 2
Optical Center
![Page 60: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/60.jpg)
Image reprojection
• Basic question– How to relate two images from the same camera center?
• how to map a pixel from PP1 to PP2 PP2
PP1
Answer• Cast a ray through each pixel in PP1• Draw the pixel where that ray intersects PP2
![Page 61: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/61.jpg)
What is the transformation?
Translations are not enough to align the images
left on top right on top
![Page 62: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/62.jpg)
What is the transformation?
Image 1
Image 2
Optical Center
3x3 homographyHow do we map image 2 onto image 1’s projection plane?
image 1 image 2
![Page 63: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/63.jpg)
Can we use homography to create a 360 panorama?
![Page 64: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/64.jpg)
Panoramas
• What if you want a 360 field of view?
mosaic Projection Sphere
![Page 65: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/65.jpg)
– Map 3D point (X,Y,Z) onto sphere
Spherical projection
XY
Z
unit sphere
unwrapped sphere
• Convert to spherical coordinates
Spherical image
• Convert to spherical image coordinates
– s defines size of the final image» often convenient to set s = camera focal length
![Page 66: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/66.jpg)
f = 200 (pixels)
Spherical reprojection
• Map image to spherical coordinates– need to know the focal length
input f = 800f = 400
![Page 67: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/67.jpg)
Aligning spherical images
• Suppose we rotate the camera by about the vertical axis– How does this change the spherical image?
![Page 68: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/68.jpg)
Aligning spherical images
• Suppose we rotate the camera by about the vertical axis– How does this change the spherical image?
– Translation by – This means that we can align spherical images by translation
![Page 69: Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649d545503460f94a304d4/html5/thumbnails/69.jpg)
Questions?