

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Title: Binary image rendering using halftoning. The following figure shows ten shades of gray approximated by dot patterns. Each gray level is represented by a 3 x 3 pattern of black and white dots. A 3 x 3 area full of black dots is the approximation to gray-level black , or 0. Similarly, a 3 x 3 area of white dots represents gray level 9, or white. The other dot patterns are approximations to gray levels in between these two extremes. A gray-level printing scheme based on dot patterns such as these is called "halftoning." (a) Write a halftoning function that converts a gray scale image with values 0-255 to a binary (two-valued) image using the dot patterns below. The input and output images should have the same size. Your function should also scale the gray levels of the input image to span the full halftoning range. The input and output images should be of datatype uint8. (b) Write a program to generate a test pattern image consisting of a gray scale wedge of size 256 x 256, whose first column is all 0's, the next column is all 1's, and so on, with the last column being 255's. Convert this image using your halftoning function. Print the original and halftone images. (c) Render and print book Figs. 2.22(a) through (c) using your halftoning function (no need to print the originals). Do your results agree with the conclusions arrived at in the text in pgs. 64-65 and Fig. 2.23? Explain. You can download the required figures from the book web site.
Notes: