160 likes | 423 Views
Image Warping. CS 319 Advanced Topics in Computer Graphics John C. Hart. Viewing. Perspective Distortion. Window to Viewport. Image Based Rendering. Traditional CG Geometric modeling hard Global illumination slow
E N D
Image Warping CS 319 Advanced Topics in Computer Graphics John C. Hart
Viewing Perspective Distortion Window to Viewport Image Based Rendering • Traditional CG • Geometric modeling hard • Global illumination slow • If we have a picture of an object from one point of view, can we simulate the object from another point of view • Geometry and shading replaced by image(s) • Need to generalize images from specific points of view to support an arbitrary point of view
2-D Warping • Warp is a generalization of a transformation • non-affine • includes perspective • Difference between two views of a textured plane from a pinhole camera • Use a previous image to generate a new view • Avoid re-rendering • Difference between two views from a stationary camera rotating and zooming • Create panoramic images • Environment maps
Projective Maps • 2-D homogeneous transformation • Includes affine maps • scale (stretch, squash) • rotate • translate • shear • Non-affine projections • different lines converge to point • different perspectives affine projective
Two Views of a Plane x0,y0 xg,yg • Where is pixel x,y from image 0 located in image 1? • Assume image 0 a picture of the x-y coordinate plane at z = 0 • Plane can be placed arbitrarily, but setting z = 0 allows us to ignore z coordinate • Can find affine transformation that takes arbitrary plane to z = 0 • M0 = WPV, takes point on plane (xg,yg) to pixel (x0,y0) • Invertible • distorts, doesn’t project cam0 cam1 z = 0 x1,y1
Image Based Texturing • Take several pictures of an object • Variety of viewpoints • Covering entire object • Create a rough polygonal model of object • Planar sections • No need to model detail • Render final textured model • Warp photographs onto sections • Texture appears as model detail • Composite multiple textures • Fails at silhouettes, parallax Campanile Movie Debevic, Yu, et al., 1997
Debevec, 1991
Image Based Modeling • Take several pictures of a shape • Find features in each picture • Correlate features between pictures • Solve for world coord. camera position • Use features to create a crude model • Reproject photographs on crude model
Adding Depth x0,y0 ,z0 whathappenshere? • Math is easy • Implementation is hard • Interpolation of depth can lead to gaps in shape • Sampling for one image may be inadequate for warped images cam0 xg,yg,zg cam1 x1,y1 ,z1
View Interpolation • Williams & Chen, S93 • Computes images between two images • Used to animate walk-though • Linear interpolation of pixelpositions and depth values • Depth valuesdetermine occlusion • Holes filled with “local color” • Linear interpolation correct for plane if view direction perpendicular to plane • Correct if the camera trucks (and zooms) parallel to the plane • Higher order interpolation more accurate
View Morphing • Seitz & Dyer, S96 • Handles case of moving camera as well as moving scene • View interpolation works when “scene planes” are parallel for cam0 and cam1 • View interpolation incorrect if the scene plane has rotated for cam0 and cam1 • Solution: prewarp cam0 and cam1 to be parallel, then interpolate