Organization Part 1 Fundamentals of Texture Mapping Texture Mapping And Texture Synthesis Mapping Scanning algorithm Anti aliasing Part 2 Non Parametric Sampling Texture Synthesis Algorithm overview Details Limitation Spring CSE 291 Cindy Wang 02 20 03 UCSD 1 UCSD 2 Reference Introduction Paul S Heckbert Survey of Texture Mapping IEEE Computer Graphics and Applications Nov 1986 http www 2 cs cmu edu ph texsurv pdf Paul S Heckbert Fundamentals of Texture Mapping and Image Warping Master s Thesis University of California Berkeley 1989 http www2 cs cmu edu ph texfund texfund pdf Texture Mapping texture mapping is a successful technique to create high quality image synthesis without the tedium of modeling and rendering every details of a surface Results depend on some key elements UCSD 3 Mapping Filtering Sampling UCSD 4 1 Coordinate Systems Goal of Texture Mapping q Texture Space qDefinition 2 D space of surface textures the q Object Space 3 D coordinate system in which geometries are defined The q World Space mapping of a function onto a surface in 3 D q2 step mapping process A global coordinate system that is related to each object s local object space using 3d modeling transformations source image texture is mapped onto a surface in 3 D object space The surface is then mapped to the destination image by the viewing projection q Screen Space The coordinate system of display UCSD 5 Spaces mapping u v Screen Space 2D Screen Space 3D z buffer parameterization 6 Parameterization x y Texture Space 2D UCSD Object Space 3D projection World Space 3D Mapping a 2 D texture onto a 3 D surface requires surface parameterization Affine mapping Bilinear mapping Perspective mapping rendering UCSD 7 UCSD 8 2 Affine mapping Bilinear mapping q Mapping a square into quadrilateral q Preserve horizontal vertical lines q Diagonal lines are distorted q scales rotations translations shears qPreserve parallel lines and equispaced points along lines qTriangle keeps shape after mapping o vertices have Au Bv C form UCSD 9 Example of Bilinear mapping UCSD 10 Perspective Mapping A better parameterization choice for planar quadrilaterals Preserve lines at all orientations Sacrifice equal spacing UCSD 11 UCSD 12 3 Screen scanning Comparison of mappings Preserve lines Preserve parallel Preserve equidistance Invertibl e matrix Degree of freedom Affine Yes Yes Yes Yes 6 Bilinear Not diagonals No Not diagonals No 8 Perspective Yes No No Yes 8 UCSD most common mapping invertible random access texture 13 UCSD 14 Two pass Texture Scanning For v for u compute x u v copy TEX u v to Temp x v For x for v compute y x v copy Temp x v to SCR x y Work well for affine and perspective mapping For v texture row For u texture column Compute x u v and y u v SCR x y TEX u v simple invertible can result in holes and overlaps UCSD For y screen row For x screen column Compute u x y and v x y copy SCR x y TEX u v 15 UCSD 16 4 Aliasing Anti Aliasing Point sample at high frequency Aliasing is a result of high frequency signals Moir pattern near horizon High frequency black white alternate frequently UCSD Associate sample rate with local intensity variance Low pass filtering before sampling Preferable Input must be band limited can be solved by signal processing knowledge 17 UCSD 18 Space Variant Filtering Four steps of Anti Aliasing Reconstruct continuous signal Warp the signal Low pass filter the signal Resample the signal Shape varies with space location Pre image of pixels approximated as quadrilaterals or ellipses Cross sectional shape Ideal Filter sinc x Practical Filter box triangular cubic B spine Gaussian UCSD 19 UCSD 20 5 Direct Convolution EWA q EWA Elliptical Weighted Average filter Computes weighted average of texture maps Previous works EWA Elliptical Weighted Average Cost per screen pixel proportional to the number of texture pixels UCSD q Space variant filter q Pixels circular and overlapping q Weighted average from concentric ellipses q Computes average in texture space 21 UCSD EWA sample region EWA Space variant qArbitrarily oriented ellipse defined by two vectors Space variant sample areas qCircle in screen space maps to ellipse in texture space qGreater sample accuracy q qUsing a biquadric function as its radial index UCSD 22 23 UCSD 24 6 Pyramid Prefiltering A hierarchical data structure Building pyramid Purpose Speed up filtering process Divide texture as n n texture areas Build pyramid iteratively Two data structures Pyramid most commonly used Integrated array UCSD Space complexity 4 3 of original data 25 Pyramid UCSD 26 Result of anti aliasing Assume pre image texture area is squares Compute texture value by using trilinear interpolation method Each screen pixel requires at most 8 texture data UCSD 27 UCSD 28 7 Reference Part 2 Texture Synthesis by Non parametric Sampling UCSD Alexei A and Thomas K Leung Texture Synthesis by non parametric sampling IEEE International Conference on Computer Vision Corfu Greece September 1999 29 UCSD 30 Problem of texture synthesis Input Define texture as some visual pattern on an infinite 2D plane which at some scale has a stationary distribution synthesis Given a finite sample from some texture an image Assume the sample is large enough Goal to synthesize other samples from the UCSD Generated image Infinite texture same texture 31 UCSD 32 8 The challenge Problem of producing language Traditionally textures can be classified as Regular Stochastic Shannon proposed a way of generating English looking text using N grams Basic idea repeated In real life textures lie between these two extremes and need a single model So how to analyze and model textures stochastic Assume a generalized Markov chain Using a large sample language compute probability distributions of each letter given N 1 previous letter Repeatedly sample the Markov chain to produce new letters Both UCSD 33 Non parametric sampling Algorithm Motivated by the way of modeling language using Markov chain Texture is grown pixel by pixel outwards from an initial seed Model texture as a MRF conditional pdf of pixel given its neighbors synthesized thus far is computed directly from the sample image UCSD 35 UCSD 34 Synthesizing one pixel SAMPLE p Infinite sample image Generated image Assuming Markov property Compute conditional probability distribution of p given the neighborhood window Instead of constructing a model directly search the input image for all such neighborhoods to produce a histogram for p To synthesize p just randomly
View Full Document
Unlocking...