6 - Morphing and Wrapping Flashcards
Warping
The term warping refers to the geometric transformation of graphical objects (images, surfaces or volumes) from one coordinate system to another.
It does not affect the attributes (e.g. colour, texture maps and coordinates, normals) of the underlying graphical object.
morphing/Metamorphosing
one graphical object is gradually turned into another.
it can affect both the shape and attributes of the graphical objects.
refers to an animation technique where the aim is to find “an average” between the two objects .
To make the animation smooth over time, a weighted average is used over time t:
- at first, the original image carries more weight to what is displayed on screen.
This gradually changes to the destination image carrying more weight as time tends to t.
An algorithm is used to compute the average geometry and appearance.
Averaging Two Points Morphing
aP + bQ = aP+ (1-a)Q
To get the average of two points, P and Q, a new point aP + bQ is defined, valid only when a + b = 1.
Morphing By Linear Interpolation (Cross-Dissolve)
The simplest method of transforming one image into another is to cross-dissolve between them.
The colour of each pixel is interpolated over time from the first image value to the corresponding second image value.
t = time I1 = first image I2 = second image
I(t) = tI1 + (1-t)I2
not effective in suggesting the metamorphosis when images are different in structure.
How to improve the cross dissolve
morph process involves a warping stage before cross-dissolving so that the two images have the same shape (i.e. align using some transformation, then cross-dissolve).
Parametric Warping
to deform an image by applying a mathematical transformation to its coordinates.
Image Filtering vs. Warping
If considering an image as a function of x and y coordinates, image filtering involves changing the range of the image(sizes are the same changes the aspect), whereas image warping involves changing the domain of the image (attributes stay the same changes the size).
Parametric Warping: Transformations
⦁ Translations
⦁ Rotations
⦁ Aspect
⦁ Affine
⦁ Perspective
⦁ Cylindrical
Scaling
Scaling a coordinate means multiplying each of its components by a scalar.
Uniform scaling and non-uniform
this scalar is the same for all components;
there are different scalars per component (for example, multiplying the x component by 2 and the y by 1).
Image Warping methods:
Forward Warping
Inverse Warping
Forward Warping
each pixel in f(x, y) is sent to its corresponding location in (x’, y’) = T(x, y) in the second image.
If one of the pixels in the original image lands in-between pixels in the second image, then a contribution is added to several pixels, which is normalised (blended) later .
Forward Warping pro cons
Forward warping is computationally efficient, and is relatively easy to implement in a parallel manner (for efficient running on a GPU).
There may be holes in the second image, particularly with more convoluted warps.
Inverse warping may then be used.
Inverse Warping
each pixel from the second image – g(x’, y’) is gotten from its corresponding location in the first image f(x, y)
If a pixel in the second image comes between two pixels in the first image, a weighted average is taken of the pixels around the point in the source image, which is then carried over to the destination image.
Inverse warping is used more in practice, since there are no empty or overlapping regions, and it is capable of preserving more information from the input image.
Feature-Based Warping: Beier-Neely
technique used to warp images based on a set of feature points identified in the images .
Beier-Neely uses pairs of lines (feature line segments) to specify the warp;
The source image and destination image use 2 lines (u – fraction of segment v - lenth in pixels ) to find the corresponding points between the images