Download presentation
Presentation is loading. Please wait.
Published byRegina Wilson Modified over 9 years ago
1
Project Image Morphing Presented By Sharmila Gupta
2
Digital Image Manipulation uCompositing uConvolution uDithering uWarping uInterpolation/ Extrapolation uMorphing uSimple pixel Modification
3
Simple Pixel Modification uConvert to Gray f(r,g,b) =.3r +.52g + 10b uInvert f(v) = 1-v uBrighten/darken f(v) = ßv for ß >= 0 uThreshold if v > threshold then f(v) = 1 else f(v) = 0 uApplying same degree of change in every pixel
4
Image Interpolation/Extrapolation uChange Contrast uChange Saturation OriginalMore ContrastLess Contrast uOffers a general, unifying approach to many common point and area image processing operations. uBrightness, contrast, saturation, tint, and sharpness can all be controlled with one formula, separately or simultaneously. OriginalMore SaturatedLess Saturated
5
Image Interpolation/Extrapolation uBrighten/darken uNoise removal OriginalMore BrightLess Bright median filtered image Image with “impulse” noise
6
Compositing u Compisiting images involves combining separate image layers into one u Layers may be moved and arranged. Composite Original
7
Convolution uEdge Enhancement uBlur-ness OriginalEdge Defined De-blurredBlurred uUsed for different image processing, removing blur-ness, defining edge, restore special effect by filtering, masking or other technique.
8
Dithering uMonitors and image files limited to 256 colors can create the illusion of more colors by Dithering the available colors in a scattered pattern, approximating the desired color. uImage editors often use dithering to convert true color images to indexed color images. True-color Image Dithered Image
9
What is Image Morphing?
10
uIt comes from the word Metamorphosis uMetamorphosis: Change shape, size, form or appearance Image Morphing
11
uTransition from one object to another What is Image Morphing ? uMorphing can be defined as: uProcess of transforming one image into another. An animation technique that allows you to blend two still images, creating a sequence of in – between pictures that when played in Quick Time, metamorphoses the first image into the second.
12
uA process of transforming two images where it seems like the first melts, dissolves and re-arranges itself to become the second one What is Image Morphing ?contd..
13
How is Morphing done?
14
uFirst image is gradually distorted and is faded out General View uThe second image starts out totally distorted toward the first and is faded in. uIt is broadly two-step process:
15
Classification of Morphing uMorphing classified into three types uImage-based Method uVolume-based approaches uBoundary representations (B-rep) -based approaches
16
uWarping uWarping two images to make them having the same shape Image-based Morphing uCross dissolving uCross dissolving the resulting images uTwo steps are:
17
Image-based Morphing WARPING ?
18
Image-Based Morphing - Warping uWarping an image means apply a given deformation to it uTwo ways to warp an image: uA warp is a 2-D geometric transformation and generates a distorted image when it is applied to an image uForward Mapping uReverse Mapping
19
Forward Mapping uEach pixel in the source image is mapped to an appropriate pixel in the destination image. uSome pixels in the destination image may not be mapped Source Image Destination Image
20
Reverse Mapping uThis method goes through each pixel in the destination image and samples an appropriate source image pixel uAll destination image pixels are mapped to some source image pixel. uThis mapping used in the Beier/Neely line morphing method.
21
Cross Dissolving A cross-dissolve is a sequence of images which implements a gradual fade from one to the other. Very primitive No smooth transition
22
Image-based Morphing - Example
23
Do Morphing Source ImageDestination Image
24
Image-based Morphing - Example Baby to Grandpa Morphing Groom to Bride Compositing Warping
25
Image-Based Morphing - Other option ! Better option than Cross - Dissolving: uField/Line Morphing uMesh Mapping uMultilevel Free-form Deformation (MFFD)
26
Field/Line Morphing uWhat pixel coordinate in the source image do we sample for each pixel in destination image ? uCorrespondence achieved using feature line(s) in source and destination images Source ImageDestination Image
27
Field/Line Morphing uTwo step process u Step I : Interpolating the lines: Interpolate the coordinates of the end points of every pair of lines. uStep II : Warping the Images: Each of the source images has to be deformed towards the needed frame. The deformation works pixel by pixel is based on the reverse mapping. This algorithm is called Beier-Neely Algorithm.
28
BEIER-NEELY ALGORITHM uDivide the two image to be morphed into lines
29
uCreate Intermediate Morph for both images BEIER-NEELY ALGORITHM (contd.) uIntermediate Morph ? uUse corresponding lines in both the images to redefine a new position for each pixel according to a parameter t uIf t = 0 for First image and t = 1 for Second Image then Intermediate Morph: 0<t<1
30
BEIER-NEELY ALGORITHM (contd.) uCompute line endpoints in the intermediate morph uA = endpoint of a line in First image uB = endpoint of a line in Second image uAB = endpoint of the line in Intermediate image = (1-t)*A+t*B uUse Field Morphing to warp First Image according to intermediate line endpoints uUse Field Morphing to warp Second Image according to intermediate line endpoints uCross-Dissolve the warped images using t to define weighted pixel average
31
BEIER-NEELY ALGORITHM (contd.) uCross Dissolve the intermediate warped images Warped First Image Warped Second Image
32
BEIER-NEELY ALGORITHM - PIXEL POSITION 1)Compute position of pixel X in destination image relative to the line drawn in destination image. (x,y) (u,v) X P Q P’ Q’ u v Destination Image Source Image
33
uCompute coordinates of pixel in source image whose position relative to the line drawn in source image is (u,v). (u,v) (x’,y’) X P Q P’ Q’ u v u v Destination Image Source Image BEIER-NEELY ALGORITHM - PIXEL POSITION
34
uComputation of pixel X with respect to Line X (x,y) P (px,py) Q (qx,qy) u v Destination Image (x,y) (u,v) (x-px)(qx-px)+(y-py)(qy-py) (X-P).(Q-P) ||(Q-P)|| 2 (X-P).Perpendicular(Q-P) ||(Q-P)|| (qx-px)+(qy-py) (qy-py, -qx+px) BEIER-NEELY ALGORITHM - PIXEL POSITION
35
BEIER-NEELY ALGORITHM-WEIGHTED AVG. uComputation of weighted pixel average X (x,y) P (px,py) Q (qx,qy) u v Weight = length p a + dist b length = (qx-px) 2 + (qy-py) 2 dist = abs(v) if o<u<1 or dist = distance of (x,y) from P if u < 0 or dist = distance of (x,y) from Q if u > 1 dist = abs(v) if o<u<1 or dist = distance of (x,y) from P if u < 0 or dist = distance of (x,y) from Q if u > 1 (a,b) controls influence of line for points near it (a,b) controls influence of line for points near it
36
BEIER-NEELY ALGORITHM For each pixel X=(x,y) in the destination image DSUM=(0,0), weightsum=0 for each line(Pi, Qi) calculate(ui,vi) based on Pi, Qi calculate (xi’, yi’) based on u,v and Pi, Qi calculate displacement Di = Xi’ – X for this line compute weight for line(Pi,Qi) DSUM+=Di*weight weightsum+=weight (x’y’) = (x,y)+DSUM/weightsum color at destination pixel(x,y) = color at source pixel(x’y’)
37
Mesh Morphing uMesh is a rough presentation of an object Meshed Image uSource and Destination images are meshed uMeshes for both images are interpolated uHow it is done ? uIntermediate images are cross-dissolved
38
Mesh Morphing-Algorithm for each frame f do –Linearly interpolate mesh M, between M s and M t –warp Image s to I 1, using meshes M s and M –warp Image t to I 2, using meshes M t and M –Linearly interpolate image I 1 and I 2 end
39
Mesh Morphing
40
Mesh Morphing - Pros and Cons u Hard to fit the mesh in the image u All control points affects the warping equally. u Not enough control on certain points when needed. uPros uCons A Mesh A Rendered Image
41
Multilevel Free Form Deformation (MFFD) uMorphing two sequences of live action, rather than just two still images uMark all features in key frames uInterpolate the features between key frames uDo image metamorphosis on set of image pairs
42
Multilevel Free Form Deformation (MFFD)
43
Volume Based Approaches uTechnique: uThe objects are expressed as level sets of distance functions uTwo steps: uWarp: deform the 3D space in order to make the two objects to be morphed coincide as much as possible uInterpolation: linear interpolate distance fields deformed by the warp uInteraction: uThe user interface allows to select feature (or anchor) points in each voxelized object space and map the anchor points of the source object to the anchor points of the target object
44
Volume Based Approaches - Example
46
Volume Based Approaches uD. Cohen-Or, D. Levin, A. Solomovoci. Three-dimensional distance field metamorphosis. ACM Trans. Graphics 17:116-141, 1998 uhttp://www.math.tau.ac.il/~levin/
47
B-Rep Based Approaches uPolyhedral Morphing using Feature based surface decomposition uThe users only need to specify a few corresponding pairs of features on the two polyhedra. They can then specify the trajectories along which these features travel during the morph using Bezier curves, as shown in the next page. uThe algorithm not only provides the user with high- level control in terms of specifying the features and trajectories, it also allows for local refinement
48
B-Rep Based Approaches uDestination Image u Source Image
49
B-Rep Based Approaches
50
uA. Gregory, A. State, M. C. Lin, D. Manocha, and M. A. Livingston. Interactive surface decomposition for polyhedral morphing. The Visual Computer (1999) 15:453-470 uhttp://www.cs.unc.edu/~geom/3Dmorphing/
51
B-Rep Based Approaches - Examples http://www.cs.unc.edu/~gregory/morphs/jj.mpg uJack and Jill uCoffecup to Donut http://www.cs.unc.edu/~gregory/morphs/donut2cup.mpg
52
Project Image Morphing
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.