Halftone Image Generation

Many image rendering technologies only have binary output. For example, printers can either “fire a dot” or not. Halftoning is a method for creating the illusion of continuous tone output with a binary device.. To each image sample (representing a luminance value) a random number (Halftone screen) is added and then the resulting signal is quantized by 1-bit Quantizer. Effective digital Halftoning can substantially improve the quality of rendered images at minimal cost.

Why Halftoning?

In screen printing and the general printing industry, the screen (or plate in lithography) is only capable of printing solid areas. Since a photograph has various tones ranging from solid black all the way to solid white, a method has to be used whereby you can reproduce the photograph in these “continuous tones” and still print a “solid” area of ink. This is where the halftone comes in.

A halftone is simply a group of large and small dots that when viewed at a distance, have the appearance of continuous shades of gray or color in an image. Images that have shading or tints of a color are made into a halftone as they are output to a printer.

The halftone process does not actually happen until you press the print button and the image is “rastorized” and a program called PostScript converts the gray areas into a series of dots. Since halftone dots are not actually dots, but small ellipses, they have a definite pattern.

We can use different halftone patterns. For example, consider each pixel being represented by a 3x3 pixels as shown below.

The above halftone patters are distributed according to their intensity values (0-255).

If we Zoom this image, we see just a black and white dot but not a gray scale image, as it appears.

Matlab Code:

clc

clear all

close all

input_image=imread('lena512.bmp');

figure,imshow(input_image)

title('Input Lena Image')

Min_Value = min(min(input_image));

Max_Value = max(max(input_image));

step = (Max_Value-Min_Value)/10;

mid_image=zeros(size(input_image));

for k = 0:9

lmin = Min_Value+step*k;

lmax = lmin+step;

[i,j] = ind2sub(size(input_image),find(input_image>=lmininput_image<=lmax));

for l=1:length(i)

mid_image(i(l),j(l)) = k;

end

end

w = 1;

b = 0;

gray0 = [b,b,b;b,b,b;b,b,b];

gray1 = [b,w,b;b,b,b;b,b,b];

gray2 = [b,w,b;b,b,b;b,b,w];

gray3 = [w,w,b;b,b,b;b,b,w];

gray4 = [w,w,b;b,b,b;w,b,w];

gray5 = [w,w,w;b,b,b;w,b,w];

gray6 = [w,w,w;b,b,w;w,b,w];

gray7 = [w,w,w;b,b,w;w,w,w];

gray8 = [w,w,w;w,b,w;w,w,w];

gray9 = [w,w,w;w,w,w;w,w,w];

output_image=zeros(size(mid_image)*3);

fori = 1:size(mid_image,1)

for j = 1:size(mid_image,2)

switchmid_image(i,j)

case 0

level = gray0;

case 1

level = gray1;

case 2

level = gray2;

case 3

level = gray3;

case 4

level = gray4;

case 5

level = gray5;

case 6

level = gray6;

case 7

level = gray7;

case 8

level = gray8;

case 9

level = gray9;

end

new_i = i + 2*(i-1);

new_j = j + 2*(j-1);

output_image(new_i:new_i+2,new_j:new_j+2) = level;

end

end

fori=1:size(output_image)

for j=1:size(output_image)

if(output_image(i,j)==1)

output_image(i,j)=255;

end

end

end

figure,imshow(uint8(output_image));

title('One Bit Quantized Image')

Rylander's recursive patterning

The above pattern can accommodate 17 different intensity levels.

The Gray level rendition in halftones is due to spatial averaging performed by the eye.

References:

1. Special issue in digital half toning, IEEE SP Magazine, vol. 20, July 2003.

2. S. I. Jeng et al, “A new image compression scheme using half toning and inverse half toning, IEEE Visual signal proc. and commun, pp. 21-22, Melbourne, Australia, Sept. 1993.

3. F.A. Bogai et al, “Digital color half toning’ IEEE SP Magazine, vol. 22, pp. 87-96, Jan. 2005.

4. Z. Sun, “Video half toning”, IEEE Trans. IP, VOL. 15, PP. 678-686, March 2006.

5. “A new class of black and white half toning algorithm, IEEE Trans. IP, pp. 499-509, Oct. 1993,

6.

7.

8. Fundamentals of Digital Image Processing by Anil K. Jain, Prentice Hall Publications.