Title: Half Toning
1Half Toning
2Continuous Half Toning
3Color Half Toning
4Half toning and Colors
5Digital Half Toning
6(No Transcript)
7Half Toning
Emulating 5 different levels
8Half Toning
10 levels
9Original
10Half Toning
11Original
12Dithering
13Dithering and Halftoning
- Trade spatial for intensity resolution
- (works well for printing where dot printing is
very high) - Thresholding.
- Random dither Roberts algorithm
- Ordered dither
- Error diffusion
- Your eye will average over an area
- - Spatial Integration
14Thresholding
- Assume we want to quantize a gray-level image to
a binary colormap. - Map the upper half of the gray-level scale to
white, and the lower half to black a simple
threshold operation, preformed independently at
each pixel.
15Thresholding
Original image.
Simple threshold.
n 0.5
Errors are low spatial frequencies.
16Roberts Algorithm
- First add noise
- Then quantize
i
r 1
1
Quantized to 1
Quantized to 0
r
0
x
Moves errors to higher spatial frequencies. -gt
eye averages over an area.
17Threshold
18Threshold Noise
19Roberts Algorithm
Pink
Blue
20Roberts Algorithm
- Moves low frequency (average error) to high
frequency - Pink(low), Blue (high), White(all) frequency noise
Pink
Blue
21The trouble with noise
- Difficult to compute quickly.
- Not reproducible.
- Pre-compute pseudo-random function and store in
table. - Small tiled patterns sufficient
22Dithering
- It is possible to improve the quality of a
quantized image by distributing the quantized
error. - Lets have a closer look.
23Dithering
Thresholding
Dithering
24Dithering
Each pixel produces a quatization error The
quality of the result may be improved by
adjusting the threshold locally, so that adjacent
pixels in small areas are quantized with
different thresholds. This reduces the average
local quantization error. Matrices of these
threshold are called dither matrices.
25Threshold Noise
26Dithering
27Ordered Dithering
- Trade off spatial resolution for intensity
resolution. - Use dither patterns.
- Can be represented as a matrix.
28Bayer Ordered Dither Patterns
29Other possibilities
30The dithering matrix (3x3)
For all Xpixels For all Ypixels v
approximate(x,y) i x mod 3 j
y mod 3 if v gt Mi,j then
Set_Pixel(x,y, BLACK) else
Set_Pixel(x,y, WHITE)
31Dithering
5
7
3
6
1
2
Dithering mask
9
4
8
1
2
3
Image
2
2
3
8
4
4
Binary image
32Original
33Dithering
34Dithering
35Error Diffusion
36Floyd-Steinberg Error Diffusion
With this method, the average quatization error
is reduced by propagating the error from each
pixel to some of its neighbors in the scan order.
371D Error Diffusion
1
0
1
381D Error Diffusion
1
0
391D Error Diffusion
1
0
401D Error Diffusion
1
0
411D Error Diffusion
1
0
0
1
421D Error Diffusion
1
0
0
1
1
431D Error Diffusion
1
0
441D Error Diffusion
1
0
451D Error Diffusion
1
0
46Floyd-Steinberg Error Diffusion
With this method, the average quatization error
is reduced by propagating the error from each
pixel to some of its neighbors in the scan order.
Note that the error propagation weights must sum
to one
47Dither vs. Floyd-Steinberg
48(No Transcript)
49Original Picture
50Dithering result
Error diffusion result
51Examples Continue
52Dithering
Dithering Note that each square ring is of
different brightness
53Error Diffusion
Error Diffusion Note that the error is
distributed across the layers
54Examples Continue
Original
55Dithering
56Error Diffusion
57(No Transcript)
58(No Transcript)
59Error Diffusion
Set AccErr to zero For each pixel in the image
scanning from left to right value
Pixel_value(x,y) AccErrx,y if (value gt
WHITE/2) Set_pixel(x,y, WHITE) Error value
- WHITE else Set_pixel(x,y,
BLACK) Error value - BLACK
if scanning from left to right
AccErrx1, y 3/8 Error AccErrx,
y1 3/8 Error AccErrx1,y1
2/8 Error
60Space Filling Curves
61Space Filling Curves
Hilbert curve (1-4)
62Space Filling Curves
Hilbert curve (1-4)
63Space Filling Curves
Hilbert curve (1-4)
64Space Filling Curves
Hilbert curve (1-4)
65Space Filling Curves
Peano curve
66Context Based SFC
67Original Image
68Threshholding
69Bayers Ordered Dithering
70Error Diffusion
71Median Cut (4 levels)
72Median Cut (8 levels)
73(No Transcript)
74(No Transcript)
75(No Transcript)
76(No Transcript)
77(No Transcript)