geometry.slides.printing.2 - CS 450 Introduction to Digital...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 450: Introduction to Digital Signal and Image Processing Geometric Operations Geometric Operations • • • • • Transformations (Shift, Rotation, etc.) Resizing Adding/Correcting a Warp Texture Mapping Morphing Example: Texture Mapping • Mapping an image onto the surface of a geometric object • Provides increased realism Example: Morphing • Warp a pair of images based on corresponding points • Combination of warp/cross-dissolve Transformations • It all starts with the transformation – What do you want to go where? • Kinds of transformations: – Simple: • Translation, Rotation, Scale (or combinations) – Affine (6 parameter) – Perspective (8 parameter) – Arbitrary meshes Forward Mapping • Let x’ = r(x,y) and y’ = s(x,y) be a mapping from location (x,y) to (x’,y’). B[ r( x, y ), s( x, y )] = A[ x, y ] † A B Forward Mapping - Problems • Doesn’t always map to pixel locations • Solution: spread out effect of each pixel A B Forward Mapping - Problems • May produce holes in the output ? A B Backward Mapping • Let x = r(x’,y’) and y = s(x’,y’) be the inverse of the mapping (x,y) to (x’,y’). B[ x ', y ' ] = A[ r( x ', y ' ), s( x ', y ' )] † A B Backward Mapping - Problems • Doesn’t always map from a pixel • Solution: Interpolate between pixels A B Interpolation (Revisited) • “Filling in” between the pixels • A function of the neighbors or a larger neighborhood • Methods: – Nearest neighbor – Bilinear – Bicubic or other higher-order Backward Mapping - Problems • May produce holes in the input Where did it go? A B Transformations - Revisited • Can be a general, closed form solution: all pixels undergo the same transformation – Rotation, translation, scaling – Affine, perspective • More general: use a deformation mesh Warping Quadrilaterals • Break source/destination images into meshes of quadrilaterals and map between corresponding “tiepoints” Applying Warp Meshes Source with tiepoints Destination Mesh Result Restoring from Warp Meshes Distorted Source Overlaying Source Mesh Restored Image Warping Quadrilaterals • Bilinear warping: r( x, y ) = c1 x + c 2 y + c 3 xy + c 4 s( x, y ) = c 5 x + c 6 y + c 7 xy + c 8 † • Can solve for coefficients by solving two systems of four equations, four unknowns † Higher-Order Warps • Instead of using just the four corners of each quadrilateral, use the 4 x 4 submesh to do a bicubic warp • Used in Photoshop’s Liquify tool ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online