13
1 Aliasing & Anti-Aliasing

1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

Embed Size (px)

Citation preview

Page 1: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

1

Aliasing & Anti-Aliasing

Page 2: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

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

Page 3: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

CS-321Dr. Mark L. Hornick

3

What is Aliasing? (DSP Viewpoint)

Low sampling frequency distorts signal

Page 4: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

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?

Page 5: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

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?

Page 6: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

CS-321Dr. Mark L. Hornick

6

Supersampling

Page 7: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

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

Page 8: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

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

Page 9: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

CS-321Dr. Mark L. Hornick

9

ExampleComputer Graphics, Foley et al., Addison-Wesley, 1996, p. 134.

Page 10: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

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?

Page 11: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

CS-321Dr. Mark L. Hornick

11

Anti-alias example 1

Line drawn in PowerPoint

Page 12: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

CS-321Dr. Mark L. Hornick

12

Another example

Line drawn in PowerPoint

Page 13: 1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized

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)