Computer Measurement of Images Chapter 10

advertisement

Chapter 10

Computer Measurement of Images

The preceding chapter discussed the display of microscope images on a computer screen along with the superposition of grids and overlays. Interactive marking by a human able to recognize the various features present provides the input for the computer to tally the different counts, from which calculation of stereologically useful data can be carried out. The calculations are straightforward, usually requiring no more than a simple spreadsheet and often performed manually.

Some computer-based image processing operations may be useful in preparing the image for display, to aid the operator in recognizing the structures of interest, but these are primarily limited to correcting image acquisition defects such as poor contrast, nonuniform illumination, non-normal viewing angles, etc. Some of the methods used to perform those processes, such as neighborhood operations that combine or rank pixel values in each small region of the image to produce new values that form a new image, can also be used to carry out the more aggressive image processing operations discussed in this chapter.

The intent of this chapter is to consider ways that the computer can directly perform measurements on the images to obtain data that can be used to characterize the structure. This is not really automatic computer-based measurement since there is still a considerable amount of user interaction needed to specify the operations based on visual recognition of structure. Selection of the appropriate processing and measurement steps requires more, not less human involvement and knowledge than the simple grid counting methods. However, it becomes possible to measure things that are not otherwise available. For example, humans can count events such as the intersections of grid lines with features, but are not good at measuring lengths or angles.

Measurement Using Grids

The grids of points and lines used in the preceding chapter served only as visual guides to mark points of interest on the image. Sometimes the counting process can be automated, or direct measurements obtained by combining the grid with the image. These methods usually rely on first converting the grey scale or color image to a binary or black and white image. The convention used here is that black pixels are part of the features of interest and white represents the background

(about half of the systems on the market use this convention, and the other half the opposite convention that black is background and white represents features; the latter is a hangover from screen displays that used bright characters on a dark background).

223

224 Chapter 10

Reducing a grey scale image to black and white is most directly accomplished by thresholding, selecting a range of grey (or color) values by setting markers on the histogram and treating any pixel whose value lies within that range as foreground, and vice versa. In fact, there are not too many real images in which such a simple procedure actually works, and several methods will be described later in this chapter for processing images so that thresholding can be used. But to illustrate the use of grids for direct counting we will use the illustrative image in Figure 10.1, which can be thresholded to delineate the pink-colored “phase.” This is a generic name used in stereology for any structure of interest, and in many cases does not correspond to a phase in the chemical or physical sense (a region homogeneous in chemical composition and atomic or crystallographic structure).

To determine the area fraction of the selected phase by manual grid counting, the grid would be overlaid on the image, the user would mark those points that fall on the foreground regions, these would be counted by the computer (either by counting mouse clicks, for example, or by counting the marks made on the image in some unique color). Then the number of points marked divided by the number of points in the grid is P

P

, whose expected value is equal to the volume fraction of the phase. If the image is a binary image, and the grid is considered to be another binary image, then the two can be combined using a Boolean AND operation. This examines the individual pixels in the two images and creates a new image in which a pixel is made black only if both of the two original pixels at that location are black.

The grid points that fall onto the black phase are kept, the others are erased.

Counting the number of points that remain is a simple operation, which can be performed directly from the image histogram. Even if the points in the grid are marked by more complex shapes (to aid in visual recognition), counting the marks is the same process as discussed in the previous chapter. As shown in Figure 10.2, ANDing a point grid (which can be regular or random as appropriate to the sample) with the binary image gives an immediate estimated result for P

P

.

If a line grid is used to determine the number of points P

L at which the lines cross the phase boundary, this requires a single additional step. The binary image of the phase of interest is converted to its outline form. This is another example of a neighborhood operator, but one of a class of operators often used with binary images called morphological operators. They examine the pattern of neighboring pixels and turn the central pixel on or off depending on that pattern. Typical criteria are the number of touching neighbors (used in erosion and dilation) and whether or not the neighbors that are foreground points themselves are all touching each other (used in skeletonization).

In this particular case, we want to keep the outline of the phase regions, so we keep every pixel that is black (foreground) that touches at least one white (background) pixel, testing the four closest neighbors to the left, right, top and bottom.

The result, shown in Figure 10.3, erases all internal pixels within the regions and keeps just the outlines. ANDing this image with that of a grid of lines keeps just those points where the lines cross the edges. Counting these points and dividing by the length of lines in the grid (a known constant) gives P

L

. Note that the points are not necessarily single pixels, since the lines may be tangent to the boundaries so that

Computer Measurement of Images 225

the points of intersection cover more than one pixel; counting all of the marks

(groups of touching pixels) gives the correct answer.

There is another seemingly more efficient way to perform this same measurement without first getting the outlines, by just ANDing the grid lines with the original features and counting the number of line segments. Since each line segment has two ends, the number of points must be twice the number of segments. But there is a b

Figure 10.1. Example of an image (a) in which a structure can be thresholded by brightness or color to delineate it as a phase for measurement, represented as a binary image

(b). (For color representation see the attached CD-ROM.)

226 Chapter 10

a b

Figure 10.2. Combining the binary phase from Figure 10.1b with a grid of points (a) using a Boolean AND operation (b). This allows automatic counting of the point fraction to estimate the volume fraction.

a problem with this method because some line segments may end at the edge of the image inside the foreground region, which would produce an erroneous extra count.

Dealing with the edges of images is always a problem, and although it can be solved

(in this example by testing the ends of the lines to see whether they lie on black or white pixels and adjusting the count accordingly) it requires additional logic.

Measurement of structure dimensions, rather than just counting, can also be performed using a grid of lines. Figure 10.4 shows one simple example. The image

Computer Measurement of Images 227

a b

Figure 10.3. Processing the binary image from Figure 10.1b to get just the outline of the phase boundaries (a). Combining these with a grid of lines with known total length

(b) using a Boolean AND (c) allows counting of the points to estimate the surface area per unit volume of the phase. (For color representation see the attached CD-ROM.) shows a cross section of a coating on a metal. Thresholding the image to delineate just the coating is possible, so no additional image processing is required. This fortunate circumstance is often possible in metallography by the judicious use of chemical etchants to darken one phase and not the other. The same approach is used with chemical staining of biological tissues, but as these tend to be more complex in structure the selectivity of the stains is not as great.

228 Chapter 10

c

Figure 10.3.

Continued

Once the coating is isolated as the foreground, ANDing a grid of lines oriented in the direction normal to the metal surface produces a set of line segments that can be measured. The number of pixels in each line, converted to a distance based on the image magnification, is a measure of the thickness of the coating at that point. The distribution of line lengths can be analyzed statistically to determine the mean coating thickness and its variation. Of course, creating other templates of lines to measure in various orientations, including radial dimensions, is straightforward.

The use of a random set of lines to measure the thickness of layers that are not sectioned perpendicular to their surfaces (so that the thickness direction of the layer is not directly measurable) is also useful. In this method, the section plane intersects different layers or portions of layers at various angles. The random lines constitute IUR (isotropic, uniform, random) probes of the structure. The length distribution of straight lines through a layer of thickness T can range from exactly T up to infinity, depending on the line orientation. But a plot of frequency vs. 1/Length

(Figure 10.5) is a simple triangular function, whose mean value is 2/3 the maximum.

Since this maximum is 1/ T , the true layer thickness is just 1.5 times the mean value of the (1/Length) values from the line probes. The process is thus to generate the random line probes, AND them with the image, measure the lengths and calculate the mean value of 1/Length, multiply this by 1.5 and take the inverse, which is the mean layer thickness. Many structures in materials (e.g., composites), biology (e.g., membranes) and other applications can be measured in this way. This is an example of the power of the stereological approach.

Consideration of the geometry of the structure of interest (a layer) leads to the design of a probe (random lines) and a measurement procedure (1/Length of

Computer Measurement of Images 229

a b

Figure 10.4. Metallographic cross section of a coating applied to a metal substrate (a).

Superimposing a grid of lines normal to the nominal surface (b) using a Boolean AND produces a set of lines whose lengths can be used to measure the mean value and variation of the coating thickness (d). (For color representation see the attached CD-

ROM.) the intersections) that yields the desired result straightforwardly. Measurement of line lengths in the computer can be done in several ways. For straight lines at any angle the Pythagorean distance between the end points can be calculated. For lines that may not be straight, measurement methods (and their errors) will be discussed below.

Measuring Areas with Pixels

Probably the measurement that seems most straightforward with a digitized image consists of counting pixels. For an array of square pixels that are either black

(features) or white (background) the procedure is to count the pixels and use that as a measurement of area. The basic stereological rule that

V

V

V

V

= P

P also states that

= A

A

. The fraction of all the pixels in the image that are black must measure the area fraction of the selected phase.

230 c d

Figure 10.4.

Continued

Chapter 10

Figure 10.5. Distribution of 1/Intercept Length for random lines through a layer of thickness T.

Computer Measurement of Images 231

While this is true, it does not allow easy estimation of the accuracy or precision of the measurement. The problem is that pixels are not points (they have finite area, and in most image capture processes represent an average across that area), and the points are too close together to be independent samples of the structure, so that the ÷ N cannot be used as a measure of counting precision as it could for counting a sparse grid of points.

For the area fraction of the image as a whole, it isn’t even necessary to perform thresholding or look at the pixels in the image. The histogram contains all of the data. Wherever the threshold levels are set to perform the separation of features from background, the fraction of the total histogram between the thresholds is directly the area fraction. For the image in Figure 10.1, this gives an area fraction of 30.51% (19995 of 65536 pixels).

For measurement of the individual features present, we do need to count the actual pixels. Most computer measurement systems do this by treating features

(sometimes called blobs) as all pixels that are in contact, defining contact as either sharing an edge or sharing an edge or corner (called four-neighbor and eightneighbor logic). Except for measuring lines, either definition is usually adequate for measurement purposes since we prefer to avoid situations in which features have dimensions as small as a single pixel. The difference between four- and eightneighbor rules has to do principally with the topological property of connectivity. Whichever rule is used to define pixels in features, the opposite rule will apply to the background pixels.

There are several sources of error when pixel counting is used to measure areas in binary images. The finite area of each pixel means that pixels around the periphery of the feature may be included in the binary image or not depending on the fraction of each pixel that is actually covered. The same feature placed on the pixel grid in different positions and rotations will cover a different number of pixels and thus generate different measurement results. In addition, the thresholding operation to select which pixels to include in the feature is sensitive to noise, which produces grey scale variations in the pixel values. This can particularly affect the edge pixels and result in their being included or excluded. Capturing and thresholding repeated images of the same feature will not produce perfectly reproducible results.

Notice that these sources of error are related to the edge pixels (the perimeter of the feature) and not to the total number of pixels (the area of the feature).

This means that unlike the grid point count method where the number of points can be used to determine the estimated precision, pixel counting produces results with a precision that depends on the feature shape. Two features with the same area will be measured with different precision depending on the amount of perimeter each has.

Figure 10.6 illustrates the variability from placing a small circular feature at random on a pixel grid. Each circle has an actual diameter of 10 units (10 pixel widths, for an ideal geometrical area of 78.54 units), but depending on placement the number of pixels that are at least 50% covered (and hence included in the feature) will vary. The graph shows that the results are skewed to smaller measurement values. This effect becomes less important as the feature size increases,

232 Chapter 10

Figure 10.6. Results of 100 measurements of the area of a 10 unit diameter circle placed at random on a square pixel grid. True area is 10 Ÿ 2 · ( p /4) = 78.54. Mean value of distribution above is 77.86, with standard deviation = 1.639, skew = 1.143, kurtosis = 1.910. This variation demonstrates the effects of the finite size of pixels for the case of many edge orientations.

and sets an effective lower limit to the size of objects that can be measured in an image.

Adding noise to the image complicates the thresholding process and hence the measurement. Figure 10.7 shows a series of identical circles 10 units in radius with superimposed random noise. Thresholding the image at the ideal midpoint in the histogram (which is known in this case but would not be in general) and applying a morphological opening (discussed later in the chapter) produces features with some pixel errors. The area results obtained by counting pixels are low on the average because of missing internal pixels and indentations along the sides.

Instead of just counting the pixels to obtain the area, a more robust measure is the convex area obtained by fitting a 32-sided polygon around the feature (sometimes called a taut-string perimeter or convex hull). We will see shortly that there are a variety of ways to define feature measurements that the computer can make which can be selected to overcome some of the limitations of the pixels in the original image.

A circle includes pixels along edges that have all possible orientations with respect to the pixel grid. Some directions are more sensitive to placement than others. For instance a feature consisting of a hollow square (external width of 11 units, internal hole with a width of 7 units so all of the sides are 2 units wide) that is aligned with its sides parallel to the pixel grid has no variability with placement at all. When it is rotated by 45° so that the edges all cut diagonally across the pixels, the variability is shown in Figure 10.8. Notice that the mean value is close to the actual value (good accuracy) but the variation is quite large (poor precision).

We can investigate this orientation sensitivity by placing the same hollow square feature on the grid and rotating it in 1° steps (Figure 10.9a). Since the feature

Computer Measurement of Images 233

a b c

Figure 10.7. Measurement of circles on a noisy background showing thresholding variability. The geometrical area of the circles is 314.16 units. The original image (a) with added Gaussian noise ( s = 32 grey levels) (b), was thresholded at a middle grey value of 128 (b), and was processed with a morphological opening (c) to remove isolated pixels (d) before measuring the area (e) and convex area (f). The results are summarized in the table (g).

234 d e f g

Mean

Std.Dev

Skew

Kurtosis

Median

Area

307.23

17.35

.96

4.17

309

Figure 10.7.

Continued

ConvexArea

321.404

14.20

1.02

4.08

324

Chapter 10

Computer Measurement of Images 235

Figure 10.8. Results of 100 measurements of the area of a randomly placed feature shaped like a hollow diamond with outer and inner sides of 11 and 7 units (actual geometrical area = 72). Mean value of the distribution is 71.93, standard deviation = 4.39, skew = 4.674, kurtosis = 2.518. When the same figure is rotated 45 degrees to align with the pixel grid the measured answer is always 72.0 exactly. This demonstrates the effect of edge orientation on measurement precision.

covers various fractions of pixels, a decision of which pixels to count must be made.

If the threshold is set at 50%, the results (Figures 10.9b and 10.9c) show that the typical measured value is low (60 instead of 72 pixels) except when the orientation is within 1° of the actual pixel grid. Setting the threshold to 25% coverage (Figures

10.10a and 10.10b) gives a result that is biased slightly greater than the actual area, but much closer to it. It is also interesting to look at the measured length of the perimeter (another feature measurement that is discussed below). For the 50% thresholding (Figure 10.11) the results are skewed slightly low and have some evidence of a trend with orientation angle. The trend is much more pronounced for the case of thresholding at 25% (Figure 10.12).

In most cases of real images, it is not clear where the threshold actually should be set. Figure 10.13 shows a portion of a grey scale metallographic microscope image of a three-phase alloy, with its histogram. This image actually has some vignetting and is systematically darker at the corners than in the center.

Leveling of the contrast using the automatic method described in the preceding chapter (by assuming that all of the light colored features should actually be the same) sharpens the peaks in the histogram. Measurement of the light colored phase

(dendrites) requires setting a threshold; varying its placement over a wide range makes little visual difference in the resulting binary image, even though the area fraction varies from about 30% to about 40%. Clearly, these different values cannot all be “correct.”

If there is some independent knowledge about the nature of the sample, automatic algorithms can be used to assist with the critical threshold setting operation. In this case, the dendritic nature of the light regions suggests that they were formed by nucleation and growth and therefore should have smooth boundaries.

236 Chapter 10 a b c

Figure 10.9. Effect of rotation on the area measurement of a hollow square, OD = 11,

ID = 7 (actual area = 72 units) rotated in 1 degree steps on a square pixel grid (a), by counting those pixels which are at least 50% covered. Note that the true value is only obtained for < 2 degree rotation, and a value of about 60 is more typical. (mean = 60.09, s = 3.42, skew = 1.83, kurtosis = 7.46, median = 60).

A thresholding operation that seeks the setting giving the smoothest boundaries selects the value shown in Figure 10.14. Smooth boundaries are one of the criteria that skilled operators also use to judge threshold settings when they are performed manually. Others are the elimination of small features (noise), or minimal variation in area with setting (Russ, 1995b). All of this reminds us that the so-called automatic measurement methods using a computer are only as good as the very human

Computer Measurement of Images 237

a b

Figure 10.10. Measurement results for the same rotated squares in Figure 10.9a, but changing the counting criterion to include all pixels that are at least 25% covered. Mean

= 74.20, s = 2.25, skew = 1.055, kurtosis = 3.864, median = 75.

input that selects methods on the basis of either prior knowledge or visual judgment.

Measurement Parameters: Size

The area, as defined by the number of foreground pixels that touch each other and constitute the digital binary image representation of an object, is one rather obvious measure of size. There are others that are accessible to measurement using a computer. Selecting the ones that are appropriate from those offered by each particular image analysis software package (and figuring out what the highly variable names used to describe them mean) is an important task for the user.

Area can be measured in three principal ways, as indicated in Figure 10.15.

A. The number of touching foreground pixels (it does matter in some cases whether touching is interpreted as 4- or 8-neighbor connectivity).

238 Chapter 10 a b

Figure 10.11. Results for measured perimeter from the rotated squares in Figure 10.9a, selecting pixels that are at least 50% covered. The geometrical answer is 72.0; mean

= 70.78, s = 1.459, skew = .70, kurtosis = 2.76, median = 71.

B. The same as A but with the inclusion of any internal holes in the feature.

C. The area inside a fitted geometrical shape. The two most common shapes are a fitted ellipse or a polygon; some more limited systems use a rectangle, either with sides parallel to the image edges or oriented to the feature’s major axis.

The polygon is typically drawn to vertices that are the minimum and maximum pixel addresses in the feature as the image axes are rotated in steps.

This produces the “taut string outline” or “convex hull” that bridges across indentations in the periphery. The ellipse may be established in several ways, including setting the major axis to the maximum projected length of the object and defining the minor axis to give the same area as A or B above, or by calculating the axes to give the same moments as the pixels within the feature.

Which (if any) of these measures makes sense depends strongly on what the image and sample preparation show. For sections through particles, the net area (A)

Computer Measurement of Images 239

a b

Figure 10.12. Results for measured perimeter from the rotated squares in Figure 10.9a, selecting pixels that are at least 25% covered. The mean = 71.25, s = 1.56, skew =

.312, kurtosis = 2.79, median = 71.3. Although the overall range of variation is not greatly affected, there is a definite trend of value with angle.

will correspond to the particle mass, the filled area (B) to the displaced volume, and the fitted shape (C) to results obtained from sieving methods.

Any of these area measurements can be converted to an “effective radius” or “effective diameter” by using the relationship Area = 4 p Radius 2 , but of course the underlying shape assumptions are very important. Classical stereology calculates a distribution of sizes for spherical particles in a volume based on the measured distribution of circle sizes on a section, and in that specific case the effective

(circular) diameter is an appropriate descriptor.

Figure 10.16 shows an example where this is meaningful. The image is a metallographic microscope view of a polished section through an enamel coating. The pores in this coating are spherical due to gas pressure and surface tension, and the sections are therefore circles. The image is easily thresholded, but the pores have bright internal spots due to light reflection. Filling holes in objects is accomplished by inverting the image (interchanging black and white pixel values), treating the

240 Chapter 10

a b c

Figure 10.13. Upper right corner portion of an original image of a metal alloy (a) showing corner to center shading and the brightness histograms before (b) and after

(c) leveling the image contrast.

holes and background as features, discarding the feature (the background) which touches the edges of the image, and then adding the remaining features (the holes) back into the original image. This last step is actually done with a Boolean OR that sets each pixel to black if it is black in either the original image or in the inverted copy. This is an example of the kinds of image processing that are performed on binary (thresholded) images, several of which are discussed later in this chapter.

Computer Measurement of Images 241

a b

Figure 10.14. Section of the metallographic image from Figure 10.13 (after leveling) with the results of thresholding it at different grey levels: a) histogram with levels marked, and b) resulting binary images. (143 = 40%, 215 = 30%, 178 as selected by method discussed in text gives 37.7% area fraction. (For color representation see the attached CD-ROM.)

Measurement of the resulting circles produces a distribution that can be converted to the size distribution of the spheres that generated them by multiplication by a matrix of values. These are calculated as discussed in Chapter 11 on shape modeling and in texts such as Underwood, 1970; DeHoff & Rhines, 1968; and

Weibel, 1979; for a sphere the calculation can be done analytically. If a sphere of

242 Chapter 10

Figure 10.15. Measures of area for a feature: Net area, filled area and convex area.

Frequency Distribution for Area(mm 2 ) given radius is sectioned uniformly, the size distribution of the circular sections gives the probability that a circle of any particular size will result. Doing this for a series of sphere sizes produces a matrix of values that predicts the number of circles per unit area of image with radius in size class i, as a function of the number of spheres per unit volume with radius in size class j

N

Ai

=

Â

a ¢ ij

N

Vj

(10.1)

The inverse of this matrix, a , is then used to calculate the expected size distribution of spheres from the measured distribution of circles. The a and a ¢ matrices are published for various standard shapes such as ellipsoids (DeHoff, 1962), cylinders, disks, and many polyhedra. In most cases the size distributions of the planar sections through the solids for isotropic, uniform and random sectioning are not easily calculated by analytical geometry (the sphere of course presents the simplest case, which is why it is so tempting to treat objects as being spherical).

Monte-Carlo sampling methods can be employed in these instances to estimate the distribution, as discussed in the chapter on Geometric Modeling.

This classical approach is flawed in several ways. The underlying assumption is that all of the three-dimensional features have the same shape, which is rarely the case. In particular, a systematic change in shape with size will bias the results, and often occurs in real systems. In addition, the mathematics of this type of unfolding is ill-conditioned. Small errors in the distribution of circles (which are inevitable due to the statistics of sampling and counting) are greatly magnified in the inverse matrix multiplication. This is easy to see by realizing that large circles can only result from sections of large spheres, while small circles can be produced by either large or small spheres. Small errors in the number of large spheres calculated from the number of large circles will influence the number of small circles those large spheres produce, biasing the resulting calculation of the number of small spheres and increasing its uncertainty.

For more complicated shapes, the situation is much worse. The most likely size for a random section through a sphere is a large circle. For a cube or other polyhedron there is a significant possibility of cutting through a corner and getting a small feature. The distribution of the areas of sections cut by random planes varies substantially for objects of different shape. It would in principle be possible to make a better unfolding based on measuring the shape as well as the size of the sections,

Computer Measurement of Images 243

a b

Figure 10.16. Metallographic microscope image of pores in an enamel coating (a), thresholded and with holes filled (b). The measurement of circle sizes produces a distribution (c) and (d) that can be unfolded to produce an estimate of the size distribution of the spheres. (For color representation see the attached CD-ROM.) but in practice this is not done because there are the other fundamental problems with unfolding, and new stereological techniques have evolved to deal with measurement of the number and sizes of particles in a volume that do not depend on knowing their shapes.

There are many possible measures of size available besides area. The length and breadth of a feature can be defined and measured in quite a few different ways.

244

c

From ( ≥ )

0.0

30.0

60.0

90.0

120.0

150.0

180.0

210.0

240.0

270.0

300.0

330.0

360.0

390.0

420.0

To ( < )

30.0

60.0

90.0

120.0

150.0

180.0

210.0

240.0

270.0

300.0

330.0

360.0

390.0

420.0

450.0

Total

1

0

129

0

1

0

0

1

0

1

0

Count

116

4

0

3

2

N

V

(spheres)

5.082

0.141

0.102

0.221

0.0

0.067

0.0

0.084

0.0

0.0

0.9

0.

0.277

0.211

0

Chapter 10

d

Figure 10.16.

Continued

The major and minor axes of the ellipse fitted by one of the methods mentioned above can be used. Most common as a measure of length is the maximum projected length (or maximum Feret’s diameter, or maximum caliper diameter). Testing all of the points on the periphery of the feature to find the maximum and minimum values as the coordinate system is rotated through a series of angles, as was used above to determine the convex hull, also identifies the maximum projected length.

It is not necessary to use a large number of angles to find the maximum. If

8 steps of 22.5 degrees are used, the worst case error (when the actual maximum lies midway between two of the orientations tested) is only the cosine of 11.25

degrees, or 0.981, meaning that the measured value is 1.9% low. With 16 steps the worst case angular error is 5.625 degrees, the cosine is 0.995, and the error corresponds to 1 pixel on a feature 200 pixels wide, which is within the error variation due to edge definition, thresholding, and object placement on the pixel grid.

Computer Measurement of Images 245

It is more difficult to determine the breadth in this way. Instead of a cosine error, the maximum error depends on the sine of the angle and can be much larger.

For a very narrow and long feature, the minimum projected dimension can be hundreds of percent high even with a large number of projections. Other estimates of breadth are sometimes used, including the area divided by the length (which is appropriate for a rectangular feature), the projected dimension at right angles to the longest direction, the dimension across the center of the feature at right angles to the longest dimension, and others. It is easy to find specific shapes, even common ones such as a square, that make each of the estimates seem silly.

Neither the length nor breadth defined in these ways makes sense for features that are curved (fibers, cross sections of lamellae, etc.). A better measure of length is the distance along the midline of the feature, and this can be determined by reducing the feature to its skeleton as shown in Figure 10.17. The skeleton is produced by an erosion algorithm that removes pixels from the outside boundary of the feature (that is, any black pixel that touches a white one) except when the black pixel is part of the midline of the feature. This is determined by the touching black neighbors. It they do not all touch each other, then the central pixel is part of the skeleton and cannot be removed. The process continues to remove pixels sequentially until there are no further changes in the image (Pavlidis, 1980).

Skeletons are useful as a way to characterize shape of features, and the branching of the skeleton and counts of its end points, branch points and loops can give important topological information, but their use here is for length. The length of a line of pixels is difficult to measure accurately. Each individual pixel in the chain is connected to its neighbors in either the 90 degree (edge touching) or 45 degree

(corner touching) direction. The distance to the 90 degree neighbors is one pixel and

Figure 10.17. A feature and its skeleton (green midline). This provides a much more useful estimate of the length than the maximum caliper or projected length (red arrow).

(For color representation see the attached CD-ROM.)

246 Chapter 10

that to the 45 degree pixels is 2 = 1.414 pixels, so summing the distance along the line gives a straightforward estimate of the length.

But the real midline (or any other line in an image) is not well represented by the line of pixels. Only features that are many pixels wide are represented faithfully, as discussed before. A perfectly straight line oriented at different angles and mapped onto a pixel array will have different lengths by this method as a function of angle, with the sum of link lengths overestimating the value except in the case of exact 45 or 90 degree orientations. The length of a very rough line will be underestimated because it has irregularities that are smaller than the pixel dimensions. This problem also arises in the measurement of feature perimeters, which are usually done in the same way. The variations in measurement data in Figures 10.11 and

10.12 result from this source of error.

For features that have smooth boundaries that are not too highly curved, a fairly uniform width, and of course no branches, the skeleton length does offer a useful measurement of feature length. Another tool, the Euclidean Distance Map

(Danielsson, 1980), can be combined with the skeleton to measure width. The EDM assigns to each black pixel in the image a value that is its distance from the nearest white (background) pixel, using a very efficient and fast algorithm. For the pixels along the midline that are selected by the skeleton, these are the centers of a series of inscribed circles that fit within the feature. Averaging the value of the EDM along the skeleton gives a straightforward measure of the average width of features that are not perfectly straight or constant in width.

Other Feature Measurements: Shape and Position

There are four basic approaches to shape measurement, none entirely satisfactory. The most common approach uses ratios of size values that are formally dimensionless, such as

4 p · Area/Perimeter 2

Length/Breadth

Area/Convex Area etc.

These have the obvious advantage of being easy to calculate. Ideally they are independent of feature size, although in practice the better resolution with which pixels can delineate large features means that trends may appear in measured data that are not necessarily meaningful. This is particularly true for ratios that involve the perimeter which is difficult to measure accurately as discussed above.

The main difficulty with this class of parameters is that they are not unique

(many shapes that are recognized as quite different by a human observer can have the same parameter value) and do not correspond to what humans think of as shape.

This latter point is reinforced by the fact that the names given to these parameters are arbitrarily made up and vary widely from one system to another.

Computer Measurement of Images 247

A second approach to shape measurement was mentioned before. The skeleton of a feature captures the important topology in ways that can be easily abstracted (Russ & Russ, 1989). The difference that a human notices between the stars in the US, Israeli and Australian flags is the number of points. The number of end points in the skeleton (pixels which have exactly one neighbor) captures this value.

The remaining two methods for shape description concentrate on the irregularities of the feature boundary. Harmonic analysis unrolls the boundary and performs a Fourier analysis of it (Beddow et al., 1977). The first twenty or so coefficients in the Fourier series capture all of the details of the boundary to a precision as good as the pixels that represent the feature, and can be used for statistical classification schemes. This approach has enormous power to distinguish feature variations, and has been particularly widely used in geological applications for the analysis of sediments. The computation needed to extract the coefficients is significant and few image analysis packages offer it, but the primary barrier to the use of harmonic analysis is the difficulty that human observers have in recognizing the distinctions that the method finds. This is clearly an example of a case in which computer analysis takes a different direction from human vision, whereas most of the methods discussed here use the computer to duplicate human judgment but make the measurements more accurate or easier to obtain.

The fractal dimension of boundaries is also used as a shape descriptor. Many real-world objects have surfaces that are self-similar, exhibiting ever-increasing detail as magnification is increased (Russ, 1994b). There are important exceptions to this behavior, principally surfaces that have smooth Euclidean shapes arising from surface tension, membranes, or crystallographic effects. But when boundaries are rough they are frequently fractal and the measured dimension does correlate highly with human judgment of how “rough” the boundary appears.

The principal difficulty with all of these shape measures is that they properly apply only in the two-dimensional plane of the image, and may not be relevant to the three dimensionsal objects sampled by a section or viewed in projection. The shapes of sections through even simple solid objects such as a cube vary from threesided up to six-sided, and the number of sides is correlated with the size. Given such a set of data it is not easy to realize that all of the sections come from the same solid object, or what the object is. When variation in the shape and size of the threedimensional object is also present, the utility of measuring shape of the sections may be quite low.

Harmonic analysis and fractal dimension of sections does provide some information about the roughness of the surfaces of sectioned objects. For instance, in general for a random section through an object the surface fractal dimension is greater than the dimension of the intersection by 1.0, the same as the difference between the topological dimensions of the line and surface (1 and 2, respectively).

This is not true for outlines of projected images of particles, which are smoother than the section or actual surface because indentations tend to be hidden by surrounding peaks.

Measurement of the position of objects also provides stereologically useful information. Since measurements are not usually performed in systems that have

248 Chapter 10

meaningful absolute coordinate systems, these measurements tend to be relative. An example would be how far features are from each other, or from boundaries. The detection of preferred alignment of feature axes or of boundaries is a closely related task. In most cases the most robust measure of feature position is the coordinates of the centroid or center of mass of the feature. For a 2D object this is the point at which it would balance if cut along its boundaries from a stiff sheet of cardboard.

Of course, the centroid of a 2D section through a 3D object does not properly represent the centroid of the 3D object, but is still useful for characterizing some properties such as clustering.

Analysis of the distances and directions between pairs of object centers provides information on clustering, orientation, and so forth. The distribution of nearest neighbor distances in a 2D random section provides clustering information on 3D volumes directly; a Poisson distribution indicates a random distribution of objects, while a mean nearest neighbor distance that is less than or greater than that for the Poisson distribution indicates clustering of self-avoidance, respectively

(Schwarz & Exner, 1983). In making these measurements, it is necessary to stay far enough from the edges of the image so that the true nearest neighbor is always found.

The axis of orientation of a feature is typically calculated from the same ellipse axes mentioned above based either on the longest chord (greatest distance between any two points on the periphery) or on the axis about which the pixels have the smallest second moment. Unfortunately, it is not possible in general to use these measures on 2D planes to understand the 3D orientations. Of course, for some specimens such as surfaces (orientation of defects, etc.) the 2D image is quite appropriate and the measurements directly useful.

The precision of measurement of the centroid (first moment) and axis

(second moment) are very good, because they use all of the pixels within the feature and not just a few along the periphery. Determining locations with sub-pixel accuracy and orientations to better than 1 degree is routinely possible.

Measuring the location of features with respect to boundary lines is less precise. The boundaries are usually irregular so that they cannot be specified analytically. This means that mathematical calculation of the distance from the centroid point to the boundary is not practical. Instead, the distance from the feature to the boundary can be determined using the Euclidean distance map. As mentioned above, this procedure assigns to every pixel within features a value that is the distance to the nearest background pixel. Any pixel that is a local maximum (greater than or equal to all neighbors) is considered to be the feature center (in reality it is the center of an inscribed circle). If Euclidean distance map of the entire area, say the grain or cell in which the features reside, is then computed, the values of the pixels identified as “feature centers” in the first operation give the distances to the boundary.

Note that this method does not directly yield distance information for a 3D structure as the measurements are made in the plane of the image. Using the same stereological model introduced above for measuring the thickness of layers can solve this problem. This procedure uses averaging of 1/distance in order to estimate the mean value of the 3D distance from features to the boundary.

Computer Measurement of Images

Image Processing to Enable Thresholding and Measurement

249

There are some cases in which images can be directly thresholded and the resulting binary images measured. Examples include metals etched to show dark lines along the grain boundaries (Figure 10.9 in the preceding chapter), and fluorescence images from stained tissue. But in most cases the structures are too complex and there is no unique set of brightness values that represent the desired structure and only that structure. In addition to the procedures discussed in the preceding chapter to correct defects in the original image, a variety of tools are available to enhance the delineation of features to permit thresholding, and to process the thresholded images to permit measurement.

Figure 10.18 shows an example that looks initially much like the illustration in Figure 10.16. The sample is a slide with red blood cells. These are easily thresholded and the holes filled (the figure shows the step-by step procedure). Before measurement, those features that touch any edge must be discarded because their size cannot be determined. We also discard features smaller than an arbitrary cutoff area, because we know something about the sample and such small features cannot be the blood cells which are of interest.

Dealing with the finite size of images requires some care. Obviously, features that intersect the edge of the image cannot be measured because there is no way to measure their actual extent. But in general, larger features are more likely to intersect the edge and hence to be lost from the measurement process which would bias the results toward small features. There are two general approaches to correcting for this. The one most commonly used in manual stereology using photographs is to restrict the measurement to an inner region away from the edges, so that any feature that has its upper left corner (for example) in the inner region can be measured in its entirety. This is not usually practical for computer measurements as the limited size of the digitized image makes it unwelcome to discard a wide guard region around the edges.

Instead, it is equivalent to measure all of the features that do not intersect the edge but count them so as to compensate for the greater likelihood of losing large features. Each measured feature is counted as Wx · Wy /( Wx Fx ) · ( Wy

Fy ) where Wx and Wy are the image dimensions and Fx and Fy are the projected widths of the feature in the horizontal and vertical directions. For small features this is 1.0 but for large features the effective count becomes greater than

1.0 and corrects for the probable loss of similar size features that intersect a randomly placed image boundary. Of course, if the image is not random in placement this is not appropriate. Human operators must avoid selecting the placement of their measuring frame to reduce or eliminate having features touch edges (or for any other reason) as it inevitably introduces uncorrectable bias into the measurements.

Two of the features overlap in the image in Figure 10.18, and a watershed segmentation is used to separate them. This procedure first calculates the Euclidean distance map of the features in the thresholded binary image, and then by proceeding downhill from each local maximum finds the watershed lines between the features that mark presumed boundaries.

250 Chapter 10

a b

Figure 10.18. Microscope image (a) of red blood cells; (b) the result of thresholding;

(c) holes identified as features that do not touch the edges of the inverted image; (d)

OR combination of the holes with the original image to produce filled features (with those that are small or touch edges eliminated); (e) watershed segmentation to separate two overlapped features.

Measuring the area of each feature and using that to calculate an effective circular diameter, as was done for the pores in Figure 10.16, is not appropriate here. The overlap that is corrected by the watershed leaves each feature slightly too small. Instead, measuring the maximum external dimension and using that as a diameter gives a reasonably robust measure of size and can be used to determine the mean size and variance. In this case, the sample is not a section through a set

Computer Measurement of Images 251

c d

Figure 10.18.

Continued of spheres in a volume, but a projected image of disks that can be assumed to be lying flat on the slide. Hence no further processing of the size distribution is required.

Figure 10.19 shows an SEM image of a two-phase ceramic. The grains are distinguished in brightness by atomic number variations (the light phase is zirconia and the dark phase alumina), and the boundaries between the grains by relief produced by polishing and thermally etching the surface. It is not possible to directly threshold the grain boundaries to delineate the grains. The Laplacian edge sharpening procedure from the previous chapter does not solve this problem. In general

252 Chapter 10

e

Figure 10.18.

Continued second derivative operators are better at locating noise and points in the image, rather than linear edges. A first derivative is very good at locating steps or edges. A typical edge finding kernel is used in the figure. In order to find edges running in any orientation, two derivatives, one for vertical steps and the other for horizontal ones, are calculated. Then the magnitude of the gradient (regardless of direction) is calculated as the square root of the sum of squares of the two directional derivatives, for every pixel in the image. This operator is the Sobel, one of the most commonly used edge-finding procedures.

With the boundaries outlined, the same procedures for determing the “grain size” as discussed in the preceding chapter can be used. However, it is easier with the computer to measure slightly different parameters than would normally be determined using the same grid-based schemes used in manual measurement procedures. Instead of counting the number of intercepts that a line grid makes with the boundaries to determine P

L

, we can measure the total length of the boundaries after thresholding and skeletonizing, which gives the length of boundary per unit area of image L

A

. Both of these quantities are related to the surface area per unit volume S

V

.

S

V

= 2 P

L

= 4/ p · L

A

(10.2)

Counting grains per unit area, which is the other approach to estimating a

“grain size” parameter, gives a value that is not a measure of the grain size, but actually of the length of triple line where three grains meet in the sample volume. But counting the grains in the image automatically is often difficult because even a tiny break in one of the grain boundaries will cause the computer algorithm doing the counting to join the two grains and get a count that is biased low. It is usually dif-

Computer Measurement of Images 253

a b

Figure 10.19. SEM image (a) of an alumina-zirconia ceramic, and the grain boundaries delineated by a Sobel operator (b).

ficult to assure that all of the grain boundaries are uniformly etched or otherwise delineated and this results is a significant error. Watershed segmentation is a possible answer to this problem but is a relatively slow operation in the computer, and also tends to introduce bias because it will subdivide grains that are not convex in shape.

However, the triple points in the 2D image (where three grain boundaries join) are the intersections of the triple lines in the 3D volume with the plane of the image, and these can be counted and are usually well defined by etching. A triple point can be identified in the skeleton as any pixel with more than two adjacent

254 Chapter 10

black neighbors. The number per unit area N

A per unit volume as is related to the length of triple line

L

V

= 2N

A

(10.3)

It is possible using the same computer algorithm applied in preceding examples to count the touching pixels in each grain and convert this to an area. Plotting the distribution of areas seems at first like a measure of the size of the grains but in fact it is not. Just as for the spherical pores in Figure 10.16, the section areas do not represent the three dimensional sizes of the grains, and in fact do not even sample the grains in an unbiased way. It is much more likely that the random section plane will cut through a large grain than a small one. We dealt with this in the case of pores by using an a matrix to unfold the sphere size distribution from the circle size distribution. But we cannot do that for the grains because they do not have a simple spherical shape (indeed, they can not since spheres do not pack together to fill space).

There are shapes that have been proposed for grain and cell structures that fill space (such as the tetrakaidodecahedron) but this still implicitly makes the assumption that all of the grains have the same shape. This is clearly not true, and in fact in general the smaller grains will be quite different in shape that the larger ones, with a smaller number of contact faces and hence more acute angles at the corners. This has been demonstrated by experiments in which grain structures are literally taken apart to reveal the constituent grains. The dependence of shape upon size changes the distribution of the intersection areas dramatically and makes unfolding impractical. The parameters that do describe the grain structure ( S

V and

L

V

) in an unbiased way seem more limited than an actual distribution of the threedimensional sizes, but they are actually more useful since they really describe the structure and are not dependent on questionable assumptions.

Figure 10.20 shows another example of grain boundaries, this one a metallographic microscope image of etched aluminum. The boundaries are not delineated in this image. Instead, the grains have different grey values resulting from chance orientations of the crystallographic structure. It is necessary to use an edge-finding procedure to replace the brightness differences of the grains with dark lines at the boundaries. The operator shown is the variance. The brightness values of pixels within each placement of a small circular neighborhood are used to compute a variance (sum of squares of differences from the mean) and this value is used as the brightness of the central pixel in the neighborhood as a new image is formed. The result is a very small variance within each grain, regardless of the absolute grey value, and a large variance shown by the dark lines at the boundaries where a change in brightness occurs.

This image can be thresholded and the boundaries skeletonized as shown in the figure. It can then be measured either using by a grid overlay and counting intersections (either manually or automatically), or by measuring total boundary length to get S

V

, or counting grains or triple points to get L

V

. Both give values for ASTM grain size as discussed in the previous chapter. Note as mentioned above that the grain count would be biased low by breaks in the network of lines along the boundaries which allow grains to join in the computer count, but that these breaks have

Computer Measurement of Images 255

a b

Figure 10.20. Metallographic image of etched alumina (a), the application of a variance operator (b) and the skeletonized binary image of the boundaries (c). A manual counting operation to determine S

V using a grid as shown in (d) gives less precision than measuring the line length in (c). (For color representation see the attached CD-ROM.) a negligible effect on the determination of L

A triple points.

for the boundary lines, or N

A for the

Image Processing to Extract Measurable Information

Some information in the original image may be more easily accessed for measurement if processing steps are applied first to enhance and isolate the important data. An example of this is the use of a gradient or edge detector to isolate the edges, as discussed above. If the orientation of the edges is of interest, for example to determine the degree of preferred orientation present in a structure, then

256 Chapter 10

c d

Figure 10.20.

Continued some additional steps can be used. Figure 10.21 shows the major steps in the procedure.

The Sobel operator determines the magnitude of the gradient of brightness for each pixel in the image by combining two orthogonal first derivatives to get the square root of the sum of squares as a non-directional measure of gradient magnitude (Figure 10.21b). Combining the same two derivatives to get the angle whose tangent is their ratio gives the orientation of the gradient vector (Figure 10.21c).

The magnitude and direction of the gradient can be combined with the original grey scale image as shown in Figure 10.21d to illustrate the process.

Thresholding the Sobel magnitude values identifies the pixels that lie along the major edges in the structure (Figure 10.21e). Selecting only those pixels and forming a histogram of the angle values for them produces a distribution (Figure

Computer Measurement of Images 257

a b

Figure 10.21. SEM image of an integrated circuit (a). The Sobel operator gives the magnitude of the brightness gradient (b) and can also create an image of the direction of the gradient vector (c). These can be combined with the original image in color planes

(d). Thresholding the gradient magnitude (e) and forming a histogram of the pixel values from the direction direction image (f) provides a direct measure of the orientation of edges in the image. (For color representation see the attached CD-ROM.)

258 Chapter 10

c d

Figure 10.21.

Continued

Computer Measurement of Images 259

e f

Figure 10.21.

Continued

10.21f ) showing the orientation of edges (which are perpendicular to the maximum gradient). Because the angle values have been assigned to the 256 value grey scale or color values available for the image, this graph shows two peaks, 180 degrees (128 grey scale values) apart for each set of edges in the original image.

Processing is also useful as a precursor to thresholding structures for measurement when the original image does not have unique grey scale values for the structures or phases present. Figure 10.22 shows a typical example. The curds and whey protein are visually distinguishable because the former have a smooth appearance and the latter are highly textured, but both cover substantially the same range of grey scale values.

Once the human has recognized that the structures have texture as their defining difference, then the use of a texture operator to process the image is appropriate. There are a variety of texture extraction processes available, many developed originally for remote sensing (satellite and aerial photography) to distinguish crops, forest, bodies of water, etc. They generally operate by comparing the brightness differences between pixels as a function of their separation distance

260 Chapter 10

a b

Figure 10.22. Light micrograph of a thin section of curds and whey. The visually smooth areas (curds) have the same range of brightness values as the textured regions (whey protein). The application of a range operator (b) creates a new image that assigns different values to the pixel brightness based on the difference in values for the neighboring pixels. The derived image can be thresholded to delineate the structures for measurement.

Computer Measurement of Images 261

(Peleg et al., 1984). A very simple one is used in Figure 10.22b; the difference in grey scale value between the brightest and darkest pixel in each 5 pixel wide circular neighborhood. Since the visually smooth areas of the image have low pixel-to-pixel brightness variations while the highly textured regions have large differences, this range operator produces a new grey scale image in which the smooth areas are dark and the textured ones bright. Thresholding this gives a representation of the phase structure of the sample, which is then measured conventionally to determine volume fraction, boundary area, mean intercept length, and the other stereological parameters of interest.

More elaborate texture operators compare brightness differences over a range of distances. Plotting the maximum difference in brightness between pixels in circular neighborhoods centered around each pixel as a function of the diameter of the neighborhood produces a plot from which a local fractal dimension can be obtained. If this value is used to generate a new image, it often allows thresholding images in which subtle differences in texture are visually distinguishable. This is particularly suitable for images of surfaces, such as SEM images of fractures. Human vision seems to have evolved the ability to distinguish surface roughness by the magnitude of the fractal dimension produced by the roughness (and visible in the scattered light or secondary electron images).

Grey scale processing of the images is not the only way to segment images based on a local texture; sometimes it is possible to use the thresholded binary image. Figure 10.23 shows a light micrograph of etched steel. The lamellar pearlite structure contributes much of the strength of the material and the single phase bright ferrite regions give the metal ductility. The volume fraction of the two structures is directly related to the carbon content of the steel, but the size distribution of the pearlite regions (measured for instance by a mean lineal intercept) depends upon prior heat treatment.

Thresholding the dark etched iron carbide (Figure 10.23b) does not identify the structural constituents of interest. Applying dilation and erosion to the binary image first fills in the gaps between the lamellae and then erases the isolated spots in the pearlite (Figure 10.23c). Superimposing the outlines of these regions back onto the original image (Figure 10.23d) shows that the major structural components of the steel have been isolated and can be measured in the usual ways. This is an example of morphological operations (Serra, 1982; Coster & Chermant, 1985;

Dougherty & Astola, 1994) applied to binary images which add or remove pixels based on the presence of specified patterns of neighboring pixels.

Combining Multiple Images

In many cases, it is necessary to acquire several different images of the same area to fully represent the information needed to define the structure. A familiar example of this is X-ray maps acquired with the scanning electron microscope. Each map shows the spatial distribution of a single element, but it may require several to delineate the phase structures of interest. Figure 10.24 shows an example using a mineral specimen. The individual X-ray maps for iron and silicon (Figures 10.24a

and b) must be combined to define the phase of interest.

262 Chapter 10

a b

Figure 10.23. Metallographic microscope image of etched carbon steel (a), with the dark iron carbide particles and platelets thresholded (b). Application of a closing (dilation followed by erosion) to merge together the platelets, followed by an opening

(erosion followed by dilation) to remove the isolated carbide particles) produces a binary representation (c) of the pearlite (lamellar) regions. Superimposing the outline on the original (d) shows the regions selected for measurement. (For color representation see the attached CD-ROM.)

Computer Measurement of Images 263

c

Figure 10.23.

Continued d

264 Chapter 10

a b c

Figure 10.24. SEM X-ray maps of a mineral specimen showing the spatial distribution of iron (a) and silicon (b). Smoothing operation using a Gaussian filter and thresholding produces binary maps of the areas with concentrations of the elements (c and d).

Boolean logic combines these to define the regions that contain silicon and not iron (e).

Computer Measurement of Images 265

d e

Figure 10.24.

Continued

Since the original images are not grey scale, but have been recorded as a series of discrete pulses, they are quite noisy in appearance. A smoothing operation using a Gaussian filter reduces the noise and produces smooth phase boundaries that can be thresholded (Figures 10.24c and d). The size of the smoothing operator should ideally be set to correspond to the range of the electrons in the sample, since this is the size of the region from which X-rays are emitted and hence represents the distance by which a recorded pulse may vary from the actual location of the atom that produced it. Boolean logic can then be employed to combine the two images, for example in Figure 10.24e to define the regions that contain silicon and not iron.

Once delineated, which in some cases may require many more elemental images, the phases can be measured stereologically.

Figure 10.25 shows a case in which combination of several grey scale images is performed. The images show a pile of small rocks. The situation is similar to many

SEM images of particulates. Because of the complex surface geometry of this sample, no single picture makes it possible to delineate the individual particles.

Shadows are different on the different sides of the particles, so using an edge-finding

266 Chapter 10

a b

Figure 10.25. Macroscopic image of a pile of rocks: a) montage showing portions of the same image area with the light source moved to north, east, south and west locations; b) montage showing image differences between opposite pairs; c) montage showing the brightest pixel value at each location from the difference images, and the result of applying a Sobel edge operator. (For color representation see the attached

CD-ROM.) process does not suffice. Recording a series of images with the camera and specimen in the same position but with the light source rotated to different positions produces the series of images shown in Figure 10.25a. Subtracting these in pairs to produce the “north minus south”, “east minus west”, etc., images accentuates the shadows on corresponding sides of the pictures (Figure 10.25b), but assures that each side of the particles is well illuminated in at least one pair. Combining these pictures to keep the brightest value at each pixel location eliminates the shadows and makes

Computer Measurement of Images 267

c

Figure 10.25.

Continued the edges uniformly bright around each particle (Figure 10.25c). Applying an edgeenhancement operator to this image delineates the particle boundaries.

Processing this image is actually not the major problem for characterization.

There is no robust stereological model that allows measurement for such a pile of rocks. When particulates are dispersed through a transparent volume and viewed in projection, so that some particles are partially or entirely hidden by others, a simple first order correction for the missing (invisible) particles can be made. Normally, the size distribution is shown as a histogram with number of particles in each size class per unit volume of sample, where the volume is the area of the image times the thickness of the viewed section. For each large particle, the hidden volume can be estimated as the area of the particle times half the section thickness (because on the average each particle will be half way through the section). Any smaller particles in this region would be missed, so the effect is to reduce the volume for all smaller particle classes. This increases the number per unit volume value and shifts upwards the histogram for smaller sizes. The process is repeated for each size class.

For a “pile of rocks” or other similar structures, the only suitable model is based on a “dead leaves” random generation of an image. This is done by placing features taken from a known distribution of size and shape using a random number generator, and gradually building up an image. This has been used for known shapes such as spheres and fibers. Special attention to the orientation with which individual features are added to the conglomerate is needed, because in real cases forces of gravity, surface tension, magnetic fields, etc. may or may not be important.

The generated image is then compared to the real one, and parameters such as the histogram of intercept lengths or the partial areas of features revealed on the surface determined and compared. If the simulation agrees with the actual images, it offers some evidence that the structure may be the same as the model used for the simulation. But since several quite different models may produce images that are very similar and difficult to distinguish statistically without a great deal of measured

268 Chapter 10

data, this is not a particularly robust analytical method. It is usually preferable to find other specimen preparation techniques, such as dispersal of the particulates over a surface so they are not superimposed, or dispersal through a volume which can be sectioned.

Multiple images also arise in other situations, such as polarized light images from a petrographic microscope and multiple wavelengths in fluorescence microscopy. It may also happen that the multiple images may all be derived from a single original color or grey scale image by different processing, for example to isolate regions that are bright and have a high texture.

Boolean logic used to combine multiple images is generally done on a pixelby-pixel basis. This allows defining pixels of interest depending on whether they are on or off in the various images using AND (both pixels are on), OR (either pixel is on), Exclusive-OR (one but not both pixels are on) and NOT (changing a criterion from on to off). These conditions can be combined in flexible ways, but do not address applications in which features in one image plane are marked by indicators in a second. Figure 10.26 shows an example. Two different stains have been used, one to mark cells and the other the chromatin in nuclei. Using the green nuclei as markers, the entire cells containing them can be selected for measurement. This method is called a feature-based AND rather than a pixel-based comparison (Russ,

1993). It keeps all connected pixels in a feature in one image if any of the pixels are matched by ones in the second.

Summary

The kinds of image processing operations can be summarized as follows: a) Ones that operate on a single image based on the brightness values of neighborhood pixels. This includes arithmetic combinations such as multiplicative kernels as well as ones that rank the pixel values and keep the maximum, minimum or median value. They are used for smoothing, sharpening, edge enhancement and texture extraction.

b) Ones that operate in Fourier space to select specific frequencies and orientations in the image that correspond to wanted or unwanted information and allow the latter to be efficiently removed. Measurements of regular spacings can be made in the Fourier image more conveniently than in the spatial domain. There are also other alternate spaces, such as Hough space, that are convenient for identifying lines, circles or other specific shapes and alignments of features.

c) Ones that operate on two images to combine the grey scale pixel values. This includes arithmetic operations (add, subtract, etc.) as well as comparisons

(keep the brighter or darker value). They are used in leveling contrast, removing unwanted signals and combining multiple views.

d) Ones that operate on single binary images based on the local pattern of neighboring pixels. These are usually called morphological operators

(erosion, dilation, etc.). They add or remove pixels from features to smooth

Computer Measurement of Images 269

a b

Figure 10.26. Color fluorescence image showing two different stains (a), and only those the red-stained cells that contain a green-stained nucleus (b) as selected using a feature-based AND operation. (For color representation see the attached CD-ROM.) shapes, fill in gaps, etc. They can also be used to extract basic information about feature shape (outlines or skeleton) e) Ones that are based on the Euclidean distance map, in which each pixel within the features in a binary image is given a grey scale value equal to its distance from the nearest background pixel. These allow segmentation of

270 Chapter 10

touching convex features (or their rapid counting), and measuring of the distance of features from irregular boundaries.

f) Ones that combine two binary images using Boolean logic. These allow flexible criteria to be used to combine multiple representations of the same area, either at the pixel or feature level.

Many image analysis systems offer most of these capabilities. It remains a significant challenge for the user to employ them to best effect. This generally means that the user must first understand what is in the image and how she or he is able to visually recognize it. Depending on whether the discrimination is based on color, texture, relationship to neighbors, etc., the choice of appropriate processing must be made. Few real problems are solved by a single step operation; sequences of grey scale and binary image processes are often needed to isolate the desired structures for measurement.

This demands a considerable effort by the user to understand the available tools and what they can be used for. In most cases in which only a few measurements are to be made on complex images, it is more efficient to use the computerassisted manual stereology techniques discussed in the previous chapter. But when hundreds of measurements are needed to permit statistical analysis, and the data are to be accumulated over a long period of time so that human variability becomes a concern (for either one or multiple operators), the design of an appropriate image processing method to delineate the structures of interest for measurement becomes important and worthwhile.

Download