Presentation is loading. Please wait.

Presentation is loading. Please wait.

Antialiasing CptS 548 Advanced Computer Graphics John C. Hart.

Similar presentations


Presentation on theme: "Antialiasing CptS 548 Advanced Computer Graphics John C. Hart."— Presentation transcript:

1 Antialiasing CptS 548 Advanced Computer Graphics John C. Hart

2 Aliasing Aliasing occurs when signals are poorly sampled, giving the illusion of a lower frequency signal

3 Images Analog image –2-D region of varying color –e.g. optical image, electrical monitor signal Symbolic image –Any function of two real variables –e.g. sin(x 2 + y 2 ) Digital image –2-D array of uniformly spaced color values –e.g. framebuffer

4 Image Transformations Symbolic Image Rendering Digital Image Analog Image Display System Analog Image Scanning Digital Image Analog Image Display System

5 Sampling and Reconstruction Symbolic Image Sampling Continuous Image Discrete Samples Reconstruction

6 1-D Fourier Transform Makes any signal I(x) out of sine waves Converts time domain into frequency domain Yields spectrum F(u) of frequencies F(0) = “DC term,” average of signal F(-u) = F(u) I x F u 0 p 1/p

7 Convolution Convolution of square wave with square wave yields triangle wave f*g  FG fg  F*G

8 Low Pass Filtering Fourier transform of a box function is a sinc function Convolution with a sinc function is an ideal low pass filter Multiplies high frequencies by zero

9 Sampling p 1/p I(x)I(x) s(x)s(x) (Is)(x) (Is’)(x) s’(x) F(u)F(u) S(u)S(u) (F*S)(u) S’(u) (F*S’)(u)

10 Shannon Sampling Theorem A signal whose spectrum has no energy above frequency f can be recovered with samples at a rate of 2f or more

11 2-D Fourier Transform fyfy fxfx I(x,y)

12 Perfect Sampling

13 Imperfect Sampling

14 Antialiasing Strategies Prefiltering –Decrease the image frequency –Remove image frequencies higher than one-half the sampling frequency –Blur the image before sampling Postfiltering –Increase the sampling frequency –Take more samples than pixels –Blur the image after sampling

15 Antialiased Ray Tracing Cast a fat ray Cast a ray into a blurred object Cast lots of rays

16 Cone Tracing Amanatides SIGGRAPH 84 Replace rays with cones Cone samples pixel area Intersect cone with objects Analytic solutions similar to ray tracing Expensive

17 Beam Tracing Heckbert & Hanrahan SIGGRAPH 84 Replace rays with pyramids Intersection with polygonal scenes –Plane-plane intersections easy, fast –Existing scan conversion antialiasing Can perform some recursive beam tracing –Scene transformed to new viewpoint –Result clipped to reflective polygon

18 Covers

19 Uniform Sampling Trace at higher resolution, average results Does not eliminate Moire patterns Pushed aliases into higher frequencies

20 Jitter Sampling Pick n random points in pixel Disguises aliases as noise Inhibits Moire patterns Distribution uneven, biased Reintroduces high frequencies Sampling function adds energy to spectum

21 Uniform Jitter Subdivide pixel into uniform regions Pick random location within region Sampling function adds little energy to spectrum Distribution retains some order Reintroduces some Moire effects

22 Poisson Random points a given distance (or farther) apart Inhibits Moire patterns Sampling function adds little energy to spectrum Works well for the monkeys Poisson disk – use dart throwing algorithm

23 Adaptive Stochastic Sampling Add more samples in high variance regions Add any number of jitter samples Uniform jitter a quadtree Uniform jitter a k-d tree (subdivide larger region) Add Poisson samples (slow) Precompute multiple-res Poisson patterns

24 Reconstruction g(x1)g(x1) g(x2)g(x2) g(x3)g(x3) g(x4)g(x4) k Sampled image product of sampling function and image function Convolve a kernel function with the sampled image


Download ppt "Antialiasing CptS 548 Advanced Computer Graphics John C. Hart."

Similar presentations


Ads by Google