• No results found

4. IMAGE PROCESSING OF ELECTRON MICROGRAPHS

4.2 Overview of Digital Image Processing Techniques

4.2.1 Image Enhancement

Enhancement by point processing is among the simplest image enhancement tech-

niques. It is based on processing intensities of single pixels and includes image negatives, contrast stretching, compression of dynamic range, gray-level slicing, and histogram pro- cessing. Of particular interest for our study are histogram processing methods and they are briefly described in what follows.

The histogram of a digital image with gray levels in the range [0, L-1] is a discrete function , where is the kthgray level, is the number of pixels in the image with that gray level, n is the total number of pixels in the image, and k = 0, 1, ..., L-1. In other words, gives an estimate of the probability of occurrence of gray- level . A plot of this function for all values of k provides a global description of the appearance of an image. For example, Figure 4.1 shows a histogram of a relatively low- dose, digitized electron micrograph. The gray levels are concentrated towards the dark end of the gray-scale range. Thus, this histogram corresponds to an image with overall dark characteristics. The low dynamic range also indicates that the image has a relatively low contrast.

Histogram equalization transforms an image into another one that has a relatively

uniform histogram. Let r represent the normalized gray levels in an image (r=0 repre- sents black, r=1 represents white). We are looking for a transformation of the form s= T(r), for all such that: (a) T(r) is single-valued and monotonically increasing in the interval [0, 1], (b) for , and (c) ps(s) = 1 for , that

is, ps is a uniform density of the transformed variable s. The transformation function satisfies conditions (a), (b), and (c) above and can be used to p r k ( ) n k⁄n = r k nk p r k ( ) r k r∈[ , ]0 1 T r( )∈[ , ]0 1 r∈[ , ]0 1 s∈[ , ]0 1 s T r( ) p r( ) ww d 0 r

= =

modify the appearance of an image by producing a new image whose gray levels have a uniform density. The pseudo-code in Figure 4.2 gives the discrete formulation of the histo- gram equalization algorithm. The function closest(value,r) returns the index of the gray level in the array r of gray levels which is closest to value.

Figure 4.1 Histogram of a low-dose digitized electron micrograph (the num- bers on the left represent the indices of the gray levels present in the image)

Figure 4.3 shows the histogram of the same electron micrograph as the one used to pro- duce Figure 4.1, after histogram equalization.

Spatial and frequency domain filtering are image enhancement techniques which use

masks for processing. The masks themselves are called filters and they are of several types. Lowpass filters attenuate or eliminate high-frequency components in the Fourier domain while leaving low frequencies untouched. High-frequency components character- ize edges and other sharp transitions in an image, so the effect of lowpass filtering is image blurring. Highpass filters attenuate or eliminate low-frequency components. Because such components are responsible for the slowly varying characteristics of an image, such as overall contrast and image intensity, the result of highpass filtering is a reduction of these

features and a sharpening of edges and other details. A third type of filtering which com- bines the two previously mentioned is bandpass filtering. It removes selected frequency regions between the low and high frequencies and it is more suitable for image restoration than for image enhancement [GONZ93].

Figure 4.2 Pseudo-code for the histogram equalization algorithm

Figure 4.3 Histogram of the same electron micrograph as in Figure 4.1 after equalization for k = 0 to L - 1 do

p[k] = n[k] / n

s[k] =

endfor

for each pixel [i, j] in the image do gray_level = Image[i, j]

index = closest(s[gray_level], r) Image[i, j] = r[index]

endfor

Neighborhood averaging is a special case of spatial lowpass filtering with an

mask as shown in Figure 4.4.

Figure 4.4 Spatial lowpass filter of size

Basic highpass filters have positive coefficients near the center and negative coeffi- cients at the periphery. A classic highpass spatial filter is shown in Figure 4.5. Note that the sum of the coefficients is zero, so that when the mask is over an area of constant or slowly varying intensity, the effect is zero or very small. The intensity is boosted in areas where it varies rapidly.

Figure 4.5 A basic highpass spatial filter

A highpass filtered image may also be computed as the difference between the origi- nal image and a blurred version of it. If the original image is multiplied by an amplifica- tion factor A, the result is a high-boost filtered image:

= =

=

For A = 1, the highpass image is obtained. For A > 1, part of the original image is added to the highpass filtered image and some of the low-frequency components lost in the high- pass filtering operation are restored. The resulting high-boost image looks more like the n×n 1 ... 1 ... ... ... 1 ... 1 1 n2 --- × n n n×n -1 -1 -1 -1 8 -1 -1 -1 -1 1 9 ---×

Highboost ( ) OriginalA ( ) Lowpass– (A–1) Original( ) Original Lowpass+ – A–1

original image, with a relative degree of detail enhancement that depends on the value of A. Figure 4.6 shows a mask used for high-boost filtering. The value of the center weight is

w = , with .

Figure 4.6 Mask used for high-boost filtering

Related documents