Upload
frank-george
View
214
Download
0
Embed Size (px)
Citation preview
1
Aliasing & Anti-Aliasing
2
Aliasing & Anti-Aliasing
What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized line is an Alias of the ideal line
CS-321Dr. Mark L. Hornick
3
What is Aliasing? (DSP Viewpoint)
Low sampling frequency distorts signal
CS-321Dr. Mark L. Hornick
4
Aliasing Line Examples
Non-horizontal lines distorted (primarily) Vertical lines ok?
(dimmer? Both CRT & LCD?)
Oblique lines “jagged”
How can we compensate?
CS-321Dr. Mark L. Hornick
5
Aliasing in Graphic Displays
Sampling issue Not really “sampling” a line But generating “misplaced” points
What can we do? Increase screen resolution? Add extra information another way?
Manipulate pixel intensity?
CS-321Dr. Mark L. Hornick
6
Supersampling
CS-321Dr. Mark L. Hornick
7
A Better Algorithm
Assume that lines have normal thickness Superimpose the “wide” line on the subpixels
Intensity: ~3/9 ~8/9
CS-321Dr. Mark L. Hornick
8
Weighting Masks
1 1 1
1 1 1
1 1 1
1 2 1
2 4 2
1 2 1
Uniform Center weighted
CS-321Dr. Mark L. Hornick
9
ExampleComputer Graphics, Foley et al., Addison-Wesley, 1996, p. 134.
CS-321Dr. Mark L. Hornick
10
Line Intensity Effects
Pixels per unit length Fewer for diagonal lines anti-aliasing
compensates
Display device effects CRT’s
Vertical lines appear dimmer than horizontal Why?
How about LCDs?
CS-321Dr. Mark L. Hornick
11
Anti-alias example 1
Line drawn in PowerPoint
CS-321Dr. Mark L. Hornick
12
Another example
Line drawn in PowerPoint
CS-321Dr. Mark L. Hornick
13
Color Effects
Additional effects can be included Color
R,G, and B intensities Background and fill
Factor in their % of coverage Ex.
9-pixel grid (4 foreground/outline, 3 background, 2 fill) C = (4*Red_fore + 3*Wht_back + 2*Yel_fill)/9
“Clear Type” in Windows (font smoothing)