Keywords: front-page

# Image Dithering

[Laboratory]

It is possible to display a grey-level image in a bilevel device such as monochrome displays and many hardcopy printers by using a technique called image dithering. It consists of mapping the original grey image into a binary image. As our eyes perform a spatial integration, it is possible to achieve reasonable results by using a mapping strategy where the gray-intensity values are converted to density of black pixels.

In this experiment, we are going to see some of the mappings that can be applied for image dithering. The image used in this experiment is shown below. We included a grey-level ramp at the top of the image so that we can see response of the dither algorithms to a smooth gray-level change.

Original

The technique used in this experiment consists in using a grey-level pattern image to be compared to the original image. If the pixel is higher than the pixel on the pattern, the output pixel is white, otherwise it is black.

Below are shown four different ways to build the pattern image. In the first case, we use an uniform noise image. This technique is often called "random dither". For the second case, we generate small pyramids. Sinusoids were used in the third case below, and finally we use a pattern built from an ordered dither matrix.

a)uniform noise; b)result
a) | b)

a)pyramids; b)result
a) | b)

a)sinusoids; b)result
a) | b)

a)ordered dither; b)result
a) | b)

The dither matrix used in the last display technique was created from a replication of the pattern below. To see how one can replicate the pattern into a full image, see lesson under convolution applications.

     0 32  8 40  2 34 10 42
    48 16 56 24 50 18 58 26
    12 44  4 36 14 46  6 38
    60 28 52 20 62 30 54 22
     3 35 11 43  1 33  9 41
    51 19 59 27 49 17 57 25
    15 47  7 39 13 45  5 37
    63 31 55 23 61 29 53 21

For illustrative purpose, we show below another dithering technique, superior than the previous methods, called Floyd-Steinberg error diffusion algorithm. The idea is to diffuse the error between the output pixel value and the actual pixel value of image among their neighbors in an accumulative sequential operation. This operation cannot be implemented using standard cantata operators.

Floyd-Steinberg error diffusion

- Lab: Image Dithering