02-04-2011, 03:02 PM
ckmorph.ppt (Size: 708.5 KB / Downloads: 119)
2-D IMAGE MORPHING
What is image morphing?
Use of morphing in movies
Techniques for image morphing
Cross-dissolve
Field morphing
Mesh morphing
Cross-Dissolve
Field Morphing
Field Morphing - Transformation with One Pair of Lines
Transformation with
One Pair of Lines
Transformation with
One Pair of Lines
Original image (UL), rotated image (UR), translated image(LL), scaled image (LR)
Transformation with
Multiple Pairs of Lines
Weighted average of single pair version
a – smoothness of warping
b – falloff of strength with distance
p – rewarding longer lines
Transformation with
Multiple Pairs of Lines
For each pixel X in destination
DSUM=(0,0)
weightsum=0
For each line Pi Qi
Calculate u,v based on Pi Qi
Calculate X’I based on u,v and Pi’ Qi’
Calculate displacement Di=Xi’-X
Calculate weight
DSUM+=Di*weight; weightsum+=weight
X’ = X+ DSUM/weightsum
destinationImage(X) = SourceImage(X’)
Transformation with
Multiple Pairs of Lines
“Lines” are actually line segments
Distance from a pixel to a line is
abs(v) if 0<u<1
Distance from P if u<0
Distance from Q if u>0
Transformation with
Multiple Pairs of Lines
Not possible to do uniform scaling or shear
Transformation with
Multiple Pairs of Lines
Advantages
Expressive
Adding control points is easy
Disadvantages
All line segments need to be referenced for each pixel
Line segments have global impact
Mesh Warping
Source and target images are meshed
The meshes for both images are interpolated
The intermediate images are cross-dissolved
Mesh Warping
for each frame f do
Linearly interpolate mesh M, between Ms and Mt
warp Images to I1, using meshes Ms and M
warp Imaget to I2, using meshes Mt and M
Linearly interpolate image I1 and I2
end
Mesh Warping
Mesh Warping
Hard to fit the mesh in images
All control points affect the warping equally
Not enough control in certain areas when needed
Transition Control –
Uniform Metamorphosis
Transition Control –
Non-uniform Metamorphosis
Polymorph