Download presentation
Presentation is loading. Please wait.
Published byHarold Potter Modified over 9 years ago
1
Example: warping triangles Given two triangles: ABC and A’B’C’ in 2D (12 numbers) Need to find transform T to transfer all pixels from one to the other. What kind of transformation is T? How can we compute the transformation matrix: T(x,y) ? A B C A’A’ C’C’ B’B’ SourceDestination
2
warping triangles (Barycentric Coordinaes) Very useful in Graphics… A B C A’A’ C’C’ B’B’ SourceDestination (0,0)(1,0) (0,1) change of basis Inverse change of basis Don’t forget to move the origin too!
3
Warp by triangulation
4
Image morphing The goal is to synthesize a fluid transformation from one image to another. image #1 image #2 dissolving Cross dissolving is a common transition between cuts, but it is not good for morphing because of the ghosting effects.
5
Image morphing Why ghosting? Morphing = warping + cross-dissolving shape (geometric) color (photometric)
6
morphing cross-dissolving Image morphing image #1image #2 warp
7
Morphing sequence
8
Google Picasa Face Movie http://www.youtube.com/watch?v=fLQtssJDM Mc
9
Image warping Given a coordinate transform (x’,y’) = T(x,y) and a source image f(x,y), how do we compute a transformed image g(x’,y’) = f(T(x,y))? xx’x’ T(x,y) f(x,y)g(x’,y’) yy’y’
10
f(x,y)g(x’,y’) Forward warping Send each pixel f(x,y) to its corresponding location (x’,y’) = T(x,y) in the second image xx’x’ T(x,y) Q: what if pixel lands “between” two pixels? yy’y’
11
f(x,y)g(x’,y’) Forward warping Send each pixel f(x,y) to its corresponding location (x’,y’) = T(x,y) in the second image xx’x’ T(x,y) Q: what if pixel lands “between” two pixels? yy’y’ A: distribute color among neighboring pixels (x’,y’) –Known as “splatting”
12
f(x,y)g(x’,y’) x y Inverse warping Get each pixel g(x’,y’) from its corresponding location (x,y) = T -1 (x’,y’) in the first image xx’x’ Q: what if pixel comes from “between” two pixels? y’y’ T -1 (x,y)
13
f(x,y)g(x’,y’) x y Inverse warping Get each pixel g(x’,y’) from its corresponding location (x,y) = T -1 (x’,y’) in the first image xx’x’ T -1 (x,y) Q: what if pixel comes from “between” two pixels? y’y’ A: Interpolate color value from neighbors –nearest neighbor, bilinear, Gaussian, bicubic
14
Last 4 lectures Camera Structure HDR Image Filtering Image Transform
15
Next Camera Projection Camera Calibration
16
Pinhole camera
17
Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) The coordinate system –We will use the pin-hole model as an approximation –Put the optical center (Center Of Projection) at the origin –Put the image plane (Projection Plane) in front of the COP (Why?)
18
Pinhole camera model principal point
19
Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) x y
20
Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) x y
21
Intrinsic matrix non-square pixels (digital video) Is this form of K good enough?
22
Intrinsic matrix non-square pixels (digital video) skew Is this form of K good enough?
23
Intrinsic matrix non-square pixels (digital video) skew radial distortion Is this form of K good enough?
24
Distortion Radial distortion of the image –Caused by imperfect lenses –Deviations are most noticeable for rays that pass through the edge of the lens
25
Barrel Distortion No distortion Barrel Wide Angle Lens
26
Pin Cushion Distortion Pin cushion Telephoto lens No distortion
27
Modeling distortion To model lens distortion –Use above projection operation instead of standard projection matrix multiplication 2. Apply radial distortion 3. Apply focal length translate image center 1. Project (X, Y, Z) to “normalized” image coordinates Distortion-Free:With Distortion:
28
Camera rotation and translation extrinsic matrix
29
Two kinds of parameters internal or intrinsic parameters: focal length, optical center, skew external or extrinsic (pose): rotation and translation:
30
Other projection models
31
Orthographic projection Special case of perspective projection –Distance from the COP to the PP is infinite Image World –Also called “parallel projection”: (x, y, z) → (x, y)
32
Other types of projections Scaled orthographic –Also called “weak perspective” Affine projection –Also called “paraperspective”
33
Fun with perspective
34
Perspective cues
36
Fun with perspective Ames room
37
Forced perspective in LOTR Elijah Wood: 5' 6" (1.68 m)Ian McKellen 5' 11" (1.80 m)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.