Date post: | 12-Dec-2014 |
Category: |
Technology |
Upload: | ankur-sakhuja |
View: | 1,051 times |
Download: | 1 times |
Ankur Sakhuja
DIGITAL IMAGE MORPHING THROUGH “FIELD MORPHING”
Example
Block Diagram for Algorithm WorkflowGenerating an intermediate frame
Image IS
Feature Spec Fs
Image I2
Feature Spec F
Fs → F warp
FT → F warp
Image I1
Feature Spec F
Image IT
Feature Spec FT
MorphImage
Color interpolate
Algorithm overview
Basic motivation: specification of feature points as lines – more expressive and intuitive
Line features specified in both source and target images and correspondence established
For every intermediate position in morph sequence, a line feature set is generated by interpolating the two sets
Between source and intermediate line feature sets:- Every pair of line features represents a coordinate transformation
for a point from source to target image – results in some spatial displacement
A weighted sum of displacements due to all line pairs gives net displacement of a point – the total warp function
Warp both source and target images to get two intermediate images
Color interpolate to obtain the morph image Repeat for every position in the sequence to obtain the morph
sequence
The Math: Pixel transformation specified by single pair of line segments
The Math (contd):Pixel transformation specified by two pairs of line segments
The Math (contd):weighting factor for combining transformations of multiple line segment pairs
Weighting factor for combining displacements:bp
dista
lengthWeight
Algorithm Pseudocode
• For each pixel X in the 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' - Xi for this line• dist = shortest distance from X to Pi Qi • weight = (lengthp / (a + dist))b• DSUM += Di * weight • weightsum += weight • X' = X + DSUM / weightsum• destinationImage(X) = sourceImage(X')
MATLAB Implementation and Results
Reference
1. Beier, T. and Neely, S. 1992. Feature-based image metamorphosis. In Proceedings of the 19th Annual Conference on Computer Graphics and interactive Techniques