Escolar Documentos
Profissional Documentos
Cultura Documentos
1
Image Warping
Source
Source
Image
1 Warped Image
Image warping
Re-position all pixels in the source images to avoid the
“double-image” effect as much as possible
Image Morphing
A combination of generalized image warping with a cross-
dissolve between pixels
2
Warping Between Two Images
Goal:
Define a warp that moves every pixel in Image 1
to its “corresponding” pixel in Image 2
Source 1 Source 2
Image Morphing
Both morphing steps specified by same parameter t
• Warp the two images according to t
• Cross-dissolve their colors according to t
3
Morphing Example
Image 1 Intermediate Images
Image 2
4
Morphing w/ Backward Mapping
To completely determine the morph we need to define the
functions U(r,c,t), V(r,c,t)
(u,v)
Source Backward mapping algorithm:
Image 1
Intermediate Morphs
• A single parameter t defines two warps, one applied to
image 1 and one to image 2
Image 1 Warp 1
(r,c)
Warp 2 Image 2
pixel (r,c) in Warp 1 and pixel
(r,c) in Warp 2 are in exact
correspondence
(r,c)
5
Beier-Neely Field Morphing Algorithm (1992)
• Warped image computed using backward mapping
algorithm
6
Coordinate Maps in Field Morphing
Coordinate Map:
A function that takes pixel (r,c) in Image 2 & moves
it to pixel (r’,c’) in Image 1
Two cases:
1. Coordinate map defined by a single line pair
2. Coordinate map defined by multiple line pairs
7
Computing Pixel Positions Relative to a Line
Position of pixel X in Image 2 relative to destination line
(r,c) → (u,v)
given by
( r − rP )(rQ − rP ) + (c − c P )(c Q − c P )
(rQ,cP)
(X − P).(Q − P)
u= (r,c)
Q−P
2 ( rQ − rP ) 2 + (c Q − c P ) 2
(c Q − c P , −rQ + rP )
(rP,cP)
( X − P).Perpendicular (Q − P)
v=
Q−P
8
Coordinate Maps from One Line Pair
Field warping algorithm (single-line case)
For each pixel (r,c) in the destination image
find the corresponding (u,v) coordinates of the pixel
find the (r’,r’) in source image for that (u,v)
color at destination pixel (r,c) = color at source pixel (r’,c’)
9
Weighted Combination Rule
( rQ − rP ) 2 + (c Q − c P ) 2
=
b
length p
(r,c)
weight =
a + dist
10
Warping Example
Morphing Example
11
Morphing Dynamic Scenes
12