Sampling and aliasing ppt

aliasing and antialiasing in computer graphics ppt and aliasing effect in computer graphics
Dr.ShaneMatts Profile Pic
Dr.ShaneMatts,United States,Teacher
Published Date:23-07-2017
Your Website URL(Optional)
Comment
Sampling, Aliasing, & Mipmaps MIT EECS 6.837 Computer Graphics Wojciech Matusik, MIT EECS 1 Examples of Aliasing © Rosalee Nerheim-Wolfe, Toby Howard, Stephen Spencer. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 2 Examples of Aliasing © Rosalee Nerheim-Wolfe, Toby Howard, Stephen Spencer. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 3 Examples of Aliasing © Rosalee Nerheim-Wolfe, Toby Howard, Stephen Spencer. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 4 Examples of Aliasing Texture Errors point sampling 5 In photos too © source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. See also http://vimeo.com/26299355 6 Philosophical perspective • The physical world is continuous, inside the computer things need to be discrete • Lots of computer graphics is about translating continuous problems into discrete solutions – e.g. ODEs for physically-based animation, global illumination, meshes to represent smooth surfaces, rasterization, antialiasing • Careful mathematical understanding helps do the right thing 7 What is a Pixel? • A pixel is not: – a box – a disk – a teeny tiny little light • A pixel “looks different” on different display devices • A pixel is a sample – it has no dimension – it occupies no area – it cannot be seen – it has a coordinate – it has a value © source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 8 More on Samples • In signal processing, the process of mapping a continuous function to a discrete one is called sampling • The process of mapping a continuous variable to a discrete one is called quantization – Gamma helps quantization • To represent or render an image using a computer, we must both sample and quantize – Today we focus on the effects of sampling and how to fight them discrete value discrete position 9 Sampling & reconstruction The visual array of light is a continuous function 1/ we sample it – with a digital camera, or with our ray tracer – This gives us a finite set of numbers, not really something we can see – We are now inside the discrete computer world 2/ we need to get this back to the physical world: we reconstruct a continuous function – for example, the point spread of a pixel on a CRT or LCD • Both steps can create problems – pre-aliasing caused by sampling – post-aliasing caused by reconstruction – We focus on the former 10 Sampling & reconstruction The visual array of light is a continuous function 1/ we sample it – with a digital camera, or with our ray tracer – This gives us a finite set of numbers, not really something we can see – We are now inside the discrete computer world 2/ we need to get this back to the physical world: we reconstruct a continuous function – for example, the point spread of a pixel on a CRT or LCD • Both steps can create problems – pre-aliasing caused by sampling – post-aliasing caused by reconstruction – We focus on the former Questions? 11 Sampling Density • If we’re lucky, sampling density is enough Input Reconstructed 12 Sampling Density • If we insufficiently sample the signal, it may be mistaken for something simpler during reconstruction (that's aliasing) • This is why it’s called aliasing: the new low-frequency sine wave is an alias/ghost of the high-frequency one 13 Discussion • Types of aliasing – Edges • mostly directional aliasing (vertical and horizontal © Rosalee Nerheim-Wolfe, Toby Howard, Stephen Spencer. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. edges rather than actual slope) – Repetitive textures • Paradigm of aliasing • Harder to solve right • Motivates fun mathematics 14 Solution? • How do we avoid that high-frequency patterns mess up our image? 15 Solution? • How do we avoid that high-frequency patterns mess up our image? • We blur – In the case of audio, people first include an analog low- pass filter before sampling – For ray tracing/rasterization: compute at higher resolution, blur, resample at lower resolution – For textures, we can also blur the texture image before doing the lookup • To understand what really happens, we need serious math 16 Solution? Questions? • How do we avoid that high-frequency patterns mess up our image? • We blur – In the case of audio, people first include an analog low- pass filter before sampling – For ray tracing/rasterization: compute at higher resolution, blur, resample at lower resolution – For textures, we can also blur the texture image before doing the lookup • To understand what really happens, we need serious math 17 In practice: Supersampling • Your intuitive solution is to compute multiple color values per pixel and average them jaggies w/ antialiasing 18 Uniform supersampling • Compute image at resolution kwidth, kheight • Downsample using low-pass filter (e.g. Gaussian, sinc, bicubic) 19 Low pass / convolution • Each output (low-res) pixel is a weighted average of input subsamples • Weight depends on relative spatial position • For example: – Gaussian as a function of distance – 1 inside a square, zero outside (box) © 2003 R. Fisher, S. Perkins, A. Walker and E. Wolfart. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. http://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm 20

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.