Aliasing and Antialiasing ITCS 4120/5120 1 Aliasing and Antialiasing
What is Aliasing? Errors and Artifacts arising during rendering, due to the conversion from a continuously defined illumination field to a discrete raster grid of pixels ITCS 4120/5120 2 Aliasing and Antialiasing
What is Aliasing? ITCS 4120/5120 3 Aliasing and Antialiasing
What is Aliasing? ITCS 4120/5120 4 Aliasing and Antialiasing
What is Aliasing? ITCS 4120/5120 5 Aliasing and Antialiasing
Effects of Aliasing ITCS 4120/5120 6 Aliasing and Antialiasing
Effects of Aliasing ITCS 4120/5120 7 Aliasing and Antialiasing
Effects of Aliasing ITCS 4120/5120 8 Aliasing and Antialiasing
Effects of Aliasing ITCS 4120/5120 9 Aliasing and Antialiasing
Anti-aliasing ITCS 4120/5120 10 Aliasing and Antialiasing
Anti-aliasing Techniques Prefiltering (unweighted/weighted area sampling) Postfiltering (supersampling, jittering) ITCS 4120/5120 11 Aliasing and Antialiasing
Area Sampling Techniques ITCS 4120/5120 12 Aliasing and Antialiasing
Area Sampling Techniques ITCS 4120/5120 13 Aliasing and Antialiasing
Area Sampling Techniques ITCS 4120/5120 14 Aliasing and Antialiasing
Area Sampling Techniques ITCS 4120/5120 15 Aliasing and Antialiasing
Area Sampling Techniques ITCS 4120/5120 16 Aliasing and Antialiasing
Unweighted Area Sampling Pixel intensity is varied in proportion to the area of the pixel intercepted by the primitive. Unweighted equivalent to a box filter of unit height over pixel. Properties Intensity of pixel decreases as the distance between the pixel center and primitive increases. A primitive cannot influence a pixel s intensity if it does not intersect it. Equal areas (intersected) contribute equal intensity not a desirable property. ITCS 4120/5120 17 Aliasing and Antialiasing
Weighted Area Sampling Equal areas can contribute unequally in terms of pixel intensity. Areas closer to the pixel center contribute more. Essentially results in filtering with a mask that is centered over the pixel with decreasing radial influence. Cone filters are a compromise between computational expense and optimality. ITCS 4120/5120 18 Aliasing and Antialiasing
Postfiltering Techniques ITCS 4120/5120 19 Aliasing and Antialiasing
Supersampling (Regular Sampling) Very expensive. Not very satisfactory. ITCS 4120/5120 20 Aliasing and Antialiasing
Regular vs. Jittered Sampling ITCS 4120/5120 21 Aliasing and Antialiasing
Filtering ITCS 4120/5120 22 Aliasing and Antialiasing
Filtering ITCS 4120/5120 23 Aliasing and Antialiasing
Filtering Example ITCS 4120/5120 24 Aliasing and Antialiasing
Filtering Example ITCS 4120/5120 25 Aliasing and Antialiasing
Filtering Example ITCS 4120/5120 26 Aliasing and Antialiasing
Filtering Example ITCS 4120/5120 27 Aliasing and Antialiasing
Aliasing from a Sampling Theory Viewpoint Sampling(Spatial Domain) ITCS 4120/5120 28 Aliasing and Antialiasing
Sampling(Spatial Domain) Image is a spatial signal ITCS 4120/5120 29 Aliasing and Antialiasing
Frequency Domain X axis (position): frequency Y axis (height): strength of each frequency Examples: sine wave: impulse, square wave: infinite train of impulses ITCS 4120/5120 30 Aliasing and Antialiasing
How do we get to the Frequency Domain? Use the Fourier Transform Let φ(x) be a continuous function of a real variable x. Then I{φ(x)} = φ(ω) = φ(x)e j2πωx dx is the Fourier Transform of φ(x), with j = 1 and, I 1 {φ(ω)} = φ(x) = is the Inverse Fourier Transform. φ(x) is continuous and integrable φ(ω) is integrable x (spatial domain), ω (frequency domain) φ(ω)e j2πωx dω ITCS 4120/5120 31 Aliasing and Antialiasing
What does the Fourier Transform Do to A Spatial Signal? ITCS 4120/5120 Signal in frequency domain is an 32 integration of individual Aliasingsinusoids. and Antialiasing
How does this related to Graphics? Images are just a 2D signal and jagged edges are due to the pixel sampling rate not being high enough to capture the real signal. ITCS 4120/5120 33 Aliasing and Antialiasing
Sampling Theorem Continuous-time signal can be completely recovered from its samples iff the sampling rate is greater than twice the maximum frequency present in the signal. Claude Shannon Also known as the Nyquist rate ITCS 4120/5120 34 Aliasing and Antialiasing
Nyquist Rate ITCS 4120/5120 35 Aliasing and Antialiasing
Nyquist Rate:Undersampling The lower signal is undersampled and results in an aliased wave (dotted curve). ITCS 4120/5120 36 Aliasing and Antialiasing
Comb Function Application: Used to digitize continuous functions. Series of impulses (delta functions) Identity element of convolution: reproduces an indentical copy of the function f(x) FT of a comb function is another comb function ITCS 4120/5120 37 Aliasing and Antialiasing
Comb Function(contd) Multiplying f(x) with a comb in image space convolving their Fourier transforms, resulting in multiple identical copies of I{f(x)} Can result in aliasing if copies overlap Maximum allowable frequency is the Nyquist Frequency, which is half the sampling frequency. ITCS 4120/5120 38 Aliasing and Antialiasing
Reconstruction Example(Adequate Sampling) ITCS 4120/5120 39 Aliasing and Antialiasing
Reconstruction Example(Inadequate Sampling) ITCS 4120/5120 40 Aliasing and Antialiasing
Box Filter Reconstruction filter for nearest neighbor interpolation. Resampling images/volumes to a higher resolution using nearest neighbor values. FT of a box filter is the Sinc function ( sinπx πx ) Large side lobes continuing at regular intervals will cause aliasing. Aliasing in images manifests itself as jaggies ITCS 4120/5120 41 Aliasing and Antialiasing
Pyramid Filter Reconstruction filter used in linear interpolation Computationally more expensive, but more accurate FT is much better behaved (side lobes much smaller) Less tendency to produce aliasing ITCS 4120/5120 42 Aliasing and Antialiasing
Gaussian Filter The optimal filter in terms of avodiding side lobes FT of a Gaussian is another Gaussian Widely used to blur images and the basis for scale space ITCS 4120/5120 43 Aliasing and Antialiasing
ITCS 4120/5120 44 Aliasing and Antialiasing