Lect 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

CSO243:

FUNDAMENTALS OF MULTIMEDIA

Lecture 3: Image Dithering


What is image dithering
2

 dithering is used to represent high color depth in images with


a limited color palette.
 Colors not available in the palette are approximated.
 How to print 8 bit gray scale image in black and white printer
(1 bit)
Converting from color image to
3
grayscale image
Color quantization
4

 Color quantization reduces the number of colors


used in an image; this is important for displaying
images on devices that support a limited number of
colors and for efficiently compressing certain kinds
of images.
 Popular modern color quantization algorithms
include the nearest color algorithm (for fixed
palettes), the median cut algorithm,
Dithering techniques
5

 Random dithering
 Threshold dithering
 Error diffusion (Floyd-Steinberg) Dithering
 Ordered dithering
 Pattern dithering
Dithering techniques
6
Random dithering
7

 For each value in the image, simply generate a random number


1..256; if it is greater than the image value at that point, plot the
point white, otherwise plot it black.
 This generates a picture with a lot of "white noise", which looks like
TV picture "snow".

Original after the application of random dithering


Average Dithering
8

 The Average Dithering is a basic two-level algorithm for halftone


image. It consists in choosing a certain constant gray level, in
particular the average value of image pixels, and using it as a
global threshold in deciding whether a pixel should be quantized to
0 or to 1.
 All pixels whose intensity level lies above the average value (the
threshold) are quantized to 1; all others get a value of 0.
 This method is simple to implement but it has a disadvantage:
quantization contouring is quite perceptible.
Floyd-Steinberg Dithering
9

This technique generates the best results of any classical method


here, and is naturally the slowest.
Floyd-Steinberg Dithering
10

 Error diffusion distribution


Floyd-Steinberg Dithering
11

Example
Ordered dithering
12

 Break the image into small blocks (n x n)


 Define a threshold matrix (n x n):
 Use a different threshold for each pixel of the block
 Compare each pixel to its own threshold (if pixelo >=Thr →
pixeln=255 else pixeln=0)
Ordered dithering
13
Ordered dithering
14
Pattern Dithering
15
Pattern Dithering
16

You might also like