43
Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Embed Size (px)

Citation preview

Page 1: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Digital Images

The fundamental properties of the digital photographic image.

 * Monochrome Images

* Color Images

* What is a halftone?

 

Page 2: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Display of Images

The phosphor dots are arranged into triangular groups of three ( R,G and B dots). See Figure 1. They are sufficiently small to be unresolvable by a human eye, instead , what we perceive at each point on the screen is a mixture of light from the red, green and blue phosphors of a triplet.

Images are normally viewed on a monitor employing cathode-ray tube ( CRT) technology .

Page 3: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Cathode-ray Tube (CRT) •Colors are represented using Red, Green, and Blue components.

•The CRT has a mechanism for displaying these three components – Figure 1.

•Grayscale .The Table list the specifications for intensity codes for a four –level grayscale system. With 3 bits per pixel, we can accommodate 8 gray levels.

 

Intensity Codes Stored Intensity Values in The Frame Buffer (Binary Code)

Display Grayscale

0.0 0 (00) Black

0.33 1 (01) Dark gray

0.67 2 (10) Light gray

1.0 3 (11)  

 

Intensity = 0.5[min(r,g,b) + max(r,g,b)]

Page 4: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

In the RGB color model, the frame buffer

stores the RGB components for every pixel

Figure 2

Page 5: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

In the indexed color model, the frame buffer

stores an index into a color-lookup table

Figure 3

Page 6: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Gamma

•Intensity output is not a linear function of voltage input

•The shape of the curve may be represented by a power function y = x1/

- x is the input voltage

- is the gamma parameter - typically 2.2

- y is the light intensity output

http://www.libpng.org/pub/png/spec/PNG-GammaAppendix.html

http://www.inforamp.net/%7Epoynton/index.html

Page 7: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Gamma Correction When we "compute" colors we generally assume that they are linear quanities.

Unfortunately, most display devices are nonlinear. The most common correction method is called gamma correction.

Page 8: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

High resolution 24-bit images display 16.7 million colors.

Each pixel in a 24-bit image has one of 256 brightness values for red, green and blue.

Page 9: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

How many bits do we need to store an image?

For number of bits b, we need to store an image of size N x N with 2m different grey levels is :

b=N x N x m

So for a typical 512 x 512 image with 256 grey levels (m=8) we need 2,097,152 bits. That is why we often try to reduce m and N without significant loss in the quality of the picture.

The resolution of an image expresses how much detail we can see in it and clearly depends on both N and m.

Keeping m constant and decreasing N results in the checkerboard effect.

Keeping N constant and reducing m results in false contouring.

Page 10: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Common Values Parameter Symbol Typical values

Rows N 256,512,525,625,1024,1035

Columns M 256,512,768,1024,1320

Gray Levels L 2,64,256,1024,4096,16384

Table 1: Common values of digital image parameters

Quite frequently we see cases of M=N=2K where {K = 8,9,10}. This can be motivated by digital circuitry or by the use of certain algorithms such as the (fast) Fourier transform .

The number of distinct gray levels is usually a power of 2, that is, L=2B where B is the number of bits in the binary representation of the brightness levels. When B>1 we speak of a gray-level image; when B=1 we speak of a binary image. In a binary image there are just two gray levels which can be referred to, for example, as "black" and "white" or "0" and "1".

Page 11: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

What resolution should I use for my images? This is a frustrating question because it all depends on your final print output, and more specifically, what line screen frequency, better known as lpi, your commercial printer uses. Since most people pick a printer after their project has been completed, this can be tricky. Use a resolution that is too low, and you end up with poor quality graphics. With a resolution that is too high, you end up with longer process time and little gain on the overall quality of the halftone. There are, however, some typical line screen frequencies that are used as general guidelines:

•Newspapers or publications printed on newspaper stock use a 65 or 85 lpi•Books printed on uncoated stock use a 120 or 133 lpi•Books and magazines printed on coated stock use a 133 or 150 lpi•High quality books with lots of graphics (art books), calendars, etc. on coated stock will use 150 or higher lpi

Page 12: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

What resolution should I use for my images?

When determining resolution, the basic rule is that final image resolution should be twice that of your intended commercial printer's lpi.

In general, a higher screen frequency produces a smoother, more detailed image. However, for certain types of paper a higher screen frequency is not better. Typically newsprint uses an LPI of 85. 133 is the norm for glossy paper such as in magazines. Check with your printer to determine the best LPI settings to use for their equipment and your paper.

So, for example, if you are creating a family history book with black and white images, you can't go wrong with an image resolution of 300 ppi. However, 267 ppi is the most popular ppi for most book projects with grayscale graphics.

Page 13: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

The limit to display 24-bit RGM images

There is a trade-off between spatial and color resolution . If spatial resolution is increased so that larger images can be displayed on-screen, then color resolution may need to be reduced.

Page 14: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

What is a halftone? Halftoning is the process of turning continuous tone grayscale or color images into a series of dots for printing that fool the eye.

Halftones are images made up of a series of dots in a specific pattern that simulates the look of a continuous tone image. Because printers cannot print continuous tones -- whether it's the many shades of gray in a grayscale image or the millions of colors in a color photograph -- images must be converted to halftones. Another term for halftoning is dithering

Page 15: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

White Paper, Black Ink

Some ideas can be conveyed effectively with only the most basic materials. For example, the theme of "Good vs. Evil" is easy to represent graphically using only white paper and black ink. Where we want to illustrate "good," we allow the white paper to remain pure and unblemished.  Where we want to illustrate evil, we smother the paper with black ink.

Page 16: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Halftone Screening  The solution to our dilemma is to use "halftone screening" a process that allows us to approximate shades of gray while using only black ink. If we want to see a light gray, we print a bunch of small black dots, evenly spaced. If we want to see a medium gray, we print larger black dots. If we want a dark gray, we print black dots that are large enough to overlap, covering most, but not all of the surface with black ink. If we want black, the spaces in between the dots disappear, and the ink covers the surface completely.

The dots are printed small enough to escape the individual attention of the human eye. The eye mixes the color of the ink and the color of the paper showing through together. We call the mixture a "tint" of the original ink, a term that comes down to us from the traditional practice of mixing colored paint with white to produce a lighter color

Page 17: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 18: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 19: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 20: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 21: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

PatterningThe previous arrangement uses cells of 4 pixels each, and yields 5 possible gray-levels.

The disadvantage of patterning is the loss of spatial resolution, making it acceptable only if the resolution of the image is lower than the resolution of the display.

The use of patterning with the previous cells, results in a new image, with doubled dimensions. To obtain 256x256 new images, we have to use 128x128 original images:

Left: original image 128x128, 5 gray levels; Right: resultant 256x256 binary image

Page 22: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Patterning

Left: original image 128x128, 5 gray levels; Right: resultant 256x256 binary image

Page 23: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

The most used halftoning techniques

The images we will work on are given below:

Left: 256 gray-levels bird's image; Right: some gray values

Page 24: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Thresholding

The simplest technique for improving visual resolution is to use a threshold pattern. We create this pattern and compare with the original image. If the pixel in the original image exceeds the correspondent pixel in the threshold pattern, it is replaced by 1(white), otherwise, it is replaced by 0 ( black).

Page 25: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Constant Threshold

In this case, the treshold pattern is a constant. For example, if T = 127, we have the following results:

Left: binary bird; Right: the levels are divided in 2: black or white

Page 26: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Gaussian Pattern In this step, we change the constant pattern by the gaussian pattern showed below:

Pattern for threshold: each cell in the image represents a gaussian curve

Page 27: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Gaussian Pattern

The results obtained with this pattern are showed below:

Left: binary bird; Right: the gray-levels, binarized by thresholding with the gaussian pattern

Page 28: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Noise pattern for thresholding

To better see the effect of the threshold's pattern in the resultant binary image, we can, for example, use a noise pattern:

The results, as can be seen below, are noisy binary images:

Left: binary bird; Right: the gray-levels, binarized by thresholding with the noise pattern

Page 29: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 30: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 31: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 32: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 33: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 34: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 35: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 36: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Order Dithering This technique attempts to introduce a random error into the image. This error is represented by a dither matrix, which is compared with the image in a repeating checkerboard pattern (actually, we do the threshold with the pattern given by the dither matrix).

The smallest ordered dither pattern is:

A n*n gray levels image can be reproduced from a dither pattern Dn.

Our examples are images of 256 gray levels; so, to use D8, we must reduce our number of gray levels to 64.

Page 37: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Order Dithering

The elements of the dither matrix are thresholds The matrix is laid like a tile over the entire image and each pixel value is compared with the corresponding threshold from the matrix.

The pixel becomes white if its value exceeds the threshold or black otherwise

Page 38: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Order Dithering

The pattern given by D8 is:

 The results, as can be seen below, are better than the results with the thresholding techniques.

Page 39: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 40: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 41: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?
Page 42: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

Which graphic file format is best for

halftones? Macintosh or PC, you can't go wrong with TIFF format, and it is the preferred and the most widely supported printing format. PICT files are sometimes used and have been known to cause problems in QuarkXPress. Avoid PICT; stick with TIFF. Even if you are able to place a JPEG image into a desktop publishing application like Quark or Pagemaker, convert it to TIFF first, and you'll save yourself some heartache later.

Page 43: Digital Images The fundamental properties of the digital photographic image. * Monochrome Images * Color Images * What is a halftone?

See:

http://www.markschulze.net/halftone/index.html

http://webdevfp.uwyo.edu/webdesign/graphics/04-tech/dithering13.html

http://www.webdesignref.com/examples/dither.htm

For color image see:

http://www.techcolor.com/help/separations.html