Chapter 13 Anisotropy and Gradients Much of the discussion of stereological measurement in other chapters has emphasized the importance of isotropic, uniform and random sampling of the structure. The techniques by which isotropic sampling can be accomplished using vertical sections and cycloids, for example, can be applied even to materials that are not themselves isotropic. In fact, there are very few real samples for which isotropy or uniformity can be assumed. Biological specimens usually have complex directional relationships between local structure and the organism, geological strata preserve orientation information even when tilted, folded or faulted, plants know which way gravity points and where the sun shines, and materials bear the marks of their solidification and processing history, and even (except for a few precious shuttlegrown crystals) gravity. One of the important ways to study such materials is to quantify the nonuniformity, preferred orientation, clustering and gradients that may be present. Non-uniformity means the variation in measures of structure such as volume fraction, specific surface area, and particle size, shape or spacing, with position. Anisotropy refers to variations with respect to orientation. There may also be more complex relationships in which the anisotropy varies with position, and so forth. Usually a very specific experimental design based on considerable a priori knowledge of the structure is needed to measure and to describe such combinations of variation. Grain Structures in Rolled Metals There are relatively straightforward techniques that can be used to measure the basic parameters that describe the individual variations. For example, a common measure of preferred orientation that has been applied to metal structures produced by rolling (in which the metal is reduced in thickness and elongated in the rolling direction) is to examine a vertical surface, and to measure the mean intercept length as a function of orientation. Overlaying a template of radial lines on the structure and manual counting of intersections of the lines with grain boundaries gives the basic PL data, which can then be plotted as a rose plot to show the degree of preferred orientation graphically. The ratio of maximum intercept length (in the rolling direction) to minimum intercept length (in the vertical direction) is simply taken from the inverse of PL. Figure 13.1 shows plots of PL obtained by this method. For a set of parallel lines, the distribution of lengths is simply a cosine function (Figure 13.1a). For a square grid of lines, the distribution becomes more equiaxed but is still not isotropic (Figure 13.1b). For a typical real structure with preferred orientation, the 313 314 Chapter 13 a b c Figure 13.1. Rose plots of PL as a function of direction for a) a set of horizontal parallel lines; b) a grid of orthogonal lines; c) a typical anisotropic structure. (For color representation see the attached CD-ROM.) Anisotropy and Gradients 315 distribution may be more complex (Figure 13.1c) but is always rotationally symmetric. The degree of anisotropy may be measured by the departure from a perfect circle. Of course, if the grain boundary structure is well delineated, manual counting may not be required. Thresholding the image to obtain the grains, combining that with the line templates to produce a series of line segments, and then measuring the length of the lines as a function of angle is one automatic method that can be used to determine the same information. This use of templates and Boolean combination with binary (thresholded) images has been discussed in several other chapters as a substitute for purely manual techniques. Figure 13.2 illustrates the a b c d Figure 13.2. Measurement using a template of lines: a) original micrograph of 50% cold rolled steel; b) processed image thresholded to delineate grains; c) grains ANDed with a set of uniform radial lines; d) rose plot of the average intercept line length (reciprocal of PL) as a function of angle. (For color representation see the attached CD-ROM.) 316 Chapter 13 Figure 13.3. Micrographs taken on three orthogonal planes in a rolled steel, showing the anisotropy of the grains. procedure: the original light micrograph (Figure 13.2a) of the structure (a low carbon steel whose thickness has been reduced 50% by cold rolling) is processed in the computer so that the grains and grain boundaries can be thresholded (Figure 13.2b). The image of the grains is then ANDed with a set of radial lines to produce line segments (Figure 13.2c). Plotting the average length of the lines as a function of orientation (Figure 13.2d) reveals the preferred orientation. Either the ratio of maximum to minimum dimension of the plot, or the deviation from a perfect isotropic circle, can be used to quantify the degree of anisotropy. For more complicated structures such as polymer composites containing many phases this automatic delineation is difficult to achieve and so manual recognition and counting may be more efficient. Particularly for biological specimens complex image processing is needed to isolate and define structures of interest, and so the manual methods are often preferred. As indicated in Figures 13.3 and 13.4, this approach of measuring intercept length or PL as a function of direction does not tell the whole story. The grains are also squashed in the lateral direction by rolling and the vertical section that lies in the rolling direction does not reveal this. It is unusual to sample the three orthogonal surfaces for measurement, but necessary if the full information on anisotropy is desired. Measurements in three orthogonal directions using linear probes and the simple determination of intercept length can still be used to calculate a measure of the degree of anisotropy. Anisotropy and Gradients 317 a b Figure 13.4. Longitudinal and transverse sections through muscle fiber, showing the anisotropy of the structure. At least two planes are necessary because no single plane, and sometimes not even two planes, can distinguish between the possible kinds of anisotropy. Figure 13.5 shows schematic examples of equiaxed, needle-like and plate-like structures. Each of the structures share some identical faces. In the relatively straightforward cases of rolled or drawn metals and fiber or laminar composites it is possible a priori to judge which directions are useful as natural axes to orient the data. In other 318 Chapter 13 b a c Figure 13.5. Examples of some simple kinds of preferred orientation: a) equiaxed; b) needles; c) plates. (For color representation see the attached CD-ROM.) applications such as biological tissue this is much more difficult and the axes may change from place to place or even from specimen to specimen. It is possible to learn much from measurements made in two directions, parallel and perpendicular to the axis of preferred orientation, if the preferred orientation in three dimensions is already known either from more complete studies and multiple sections, or from an understanding of the process by which the specimens are created. Even in a single plane, human vision is quite efficient at determining a principal orientation direction so that two measurements (in that direction and in the perpendicular direction) can be made. In the chapter on modeling, the Buffon needle problem was used as an example of geometric probability. The results of that calculation are directly applicable here. The intercept line length per unit area for uniformly random lines is LA = p/2PL if the measurement is made using test lines that are parallel to the orientation axis. If the test lines are oriented perpendicular to the orientation axis the value of PL will be greater, and the value of LA (total line length per unit area of image) Anisotropy and Gradients 319 is obtained by subtracting PL for the parallel lines. Combining these relationships gives LA = PLperpendicular + 0.571 ◊ PLparallel (13.1) for the total line length per unit area. So by performing two counts of PL, one in the principal direction of elongation and the other perpendicular to it, the total line length per unit area can be determined. The degree of preferred orientation is then give by (Underwood, 1970) PLperp - PLpar PLperp + 0.571 ◊ PLpar W12 = (13.2) The subscript 12 indicates that we are dealing with lines (1 dimensional) on planes (2 dimensional). The value of Wis a dimensionless ratio, often expressed as a percentage. To determine the preferred orientation of lines is space (e.g., dislocations in metal, fibers in a composite) a similar technique can be applied. Two perpendicular planes are examined and the number of points where the three-dimensional lines intersect the planes are counted. Then the degree of preferred orientation is W13 = PAperp - PApar PAperp + PApar (13.3) For surfaces in space, the specific area of the surface SV is estimated by counting PL on sections that are parallel and perpendicular to the orientation axis. For systems that are arrays of parallel, needle-like grains or fibers that appear equiaxed on a plane perpendicular to the orientation axis the degree of orientation is given by W23 = PLperp - PLpar PLperp + 0.273 ◊ PLpar (13.4) Arrays of plate-like grains give rise to a more complicated situation, where there are three combinations of directions and hence three directions in which to count PL (called perpendicular, parallel and transverse), and three W terms. This is equivalent to the generalized Buffon needle problem in three dimensions. The overall degree of anisotropy can be estimated as the square root of the sum of squares of the three terms, in cases where a single descriptive parameter is needed. W23 a = PLperp - PLtrans PLperp + 0.429 ◊ PLpar + 0.571 ◊ PLtrans W23 b = 1.571 ◊ (PLtrans - PLpar ) PLperp + 0.429 ◊ PLpar + 0.571 ◊ PLtrans W23c = PLperp - 1.571 ◊ PLpar + 0.571 ◊ PLtrans PLperp + 0.429 ◊ PLpar + 0.571 ◊ PLtrans (13.5) 320 Chapter 13 Note that these terms include much less detail than the rose plot, as they compare intercept lengths in only two or three directions (which are assumed to be the important directions for the structure). All of these coefficients can be useful to describe the degree of preferred orientation for quantitative comparison in a given class of materials, but they do not really “describe” the nature of the orientation and they depend upon finding the correct natural coordinate system for the polished faces. Boundary Orientation Computer-based image analysis has tools that make it possible to measure the orientation of boundary lines directly. The derivative of brightness in the horizontal and vertical directions can be calculated for every pixel in the image by using local neighborhood operators. For example, multiplying the adjacent pixels in a 3 ¥ 3 neighborhood by the integers 1 2 1 0 0 0 -1 -2 -1 produces the derivative in the horizontal direction, and a similar set of numbers rotated by 90 degrees produces the vertical derivative. If these are then combined as Ê Á 225 ˆ Ê Pixel = ◊ arctanÁ Ë p ¯ Á Ë ∂B ˆ ∂y ˜ ∂B ˜ ˜ ∂x ¯ (13.6) a new image is produced in which every pixel has a grey scale value that represents an angle, the direction of the maximum local gradient. Using the same local derivatives to get the magnitude of the local brightness gradient as 2 Ê ∂B ˆ Ê ∂B ˆ Pixel = Á ˜ + Á ˜ Ë ∂x ¯ Ë ∂y ¯ 2 (13.7) allows selecting just the pixels that actually correspond to edges (this is called the Sobel operator, and is discussed in the chapter on image processing). Then a histogram of the pixel brightness values provides a direct measure of the preferred orientation of the boundaries. Because of the limitations of performing this operation on a discrete grid of pixels in a 3 ¥ 3 neighborhood in which some pixels are farther from the center than others, the results are not perfect. Measuring the boundaries of circles as shown in Figure 13.6 shows the directional bias, so that measurements on real structures can be normalized. This is a relatively fast technique for measurement of real structures. Figure 13.7 shows the results for the same image used above for intercept length measurements (Figure 13.2a). The histogram of the pixels shows the 45 and 90 degree “spikes” mentioned above, but they do not affect the ability to analyze the results. Anisotropy and Gradients 321 b a c Figure 13.6: Measurement of edge orientation: a) image of ideal circles; b) the direction results for the boundaries (color coded); c) histogram of direction values, showing bias favoring 45 and 90 degree directions. (For color representation see the attached CD-ROM.) These indicate a strong degree of preferred orientation in which most of the boundary length is horizontal and little is vertical. It is important to note that the measurement of intercept length or feature axis (discussed below) is not necessarily the same thing as measuring boundary orientation. The graph in Figure 13.2d shows about a 2 : 1 ratio for the aspect ratio of the rose plot, and this is in agreement with the fact that the steel was rolled to half of its original thickness (50% reduction). The histogram in Figure 13.7b shows a much greater ratio of the peaks at 0 and 180 degrees to the valleys in between. In part this is due to the fact that the valley covers a wide range of angles (boundaries between the ends of grains are not precisely vertical). It also reflects the fact that grain shapes are not regular. Figure 13.8 shows two extreme examples of feature shapes for which boundary orientation produces a very different result than a consideration of orientation based on the longest dimension (or the moment axis introduced below). Both objects are visually oriented at about 45 degrees to the left of vertical. The feature in Figure 13.8a has boundaries that are primarily oriented at 90 degrees to the main feature direction, but the one in Figure 13.8b has boundaries that are primarily oriented in 322 Chapter 13 b a Figure 13.7. Boundary orientation measurement on the 50% cold rolled steel image in Figure 13.2a: a) color coding of gradient direction for boundary pixels; b) histogram of values. (For color representation see the attached CD-ROM.) the same direction as the feature. Measuring feature or grain orientation with intercept lengths or other methods that depend on the interior of the grain produces different results and has a different meaning than measuring the orientation of the boundaries. It is important to decide beforehand which has meaning in any particular experimental application. In principle the measurement of boundary orientation can be performed in three dimensions the same as in two. It is not enough to simply measure the pixels a b Figure 13.8. Two features whose major axis orientation and boundary orientation have different relationships. Anisotropy and Gradients 323 in images on several sections, however. Instead, a true 3D imaging technique that generates arrays of cubic voxels must be used. Magnetic resonance imaging and computed tomography are capable of doing this, and so in some situations is confocal light microscopy. Then the same local neighborhood operators, extended to taking derivatives in the three X, Y, and Z directions, can be used to measure the orientation of the gradient in three dimensions and used to construct histograms for interpretation. Gradients and Neighbor Relationships Nonuniformity in structures (and hence in images, provided the section planes are properly oriented) can take an endless variety of forms. Human perception is very good at detecting some of them, such as alignments and orientation of features, and quite insensitive to others, such as variations in size. Figures 9 and 10 show a few examples of gradients. The first case (Figure 13.9a) illustrates a variation in area fraction, which can happen in materials due to compositional differences arising from diffusion, heat treating, welding, etc. If the direction in which the gradient exists is known, it can often be measured simply by plotting the average pixel brightness. Figure 13.9b shows a plot averaged over a band about 40 pixels wide, which in spite of the local bumps and dips indicates the gradual overall change in area fraction. Gradients such as the variation in size with position (Figure 13.10a) or orientation with position (Figure 13.10b) are much more difficult to quantify. Generally it requires measuring each feature to determine the appropriate size and shape parameters and the centroid location. The latter may be in some global coordinate system taken from the microscope stage or the location of specimens in the material being sampled, depending on the scale. Then the data file containing all of the b a Figure 13.9. Concentration gradient in a tool steel due to carburization (a), and a plot of average brightness in the gradient direction (b). 324 Chapter 13 b a Figure 13.10. Examples of gradients: a) size; b) orientation. individual measurements can be subjected to various statistical tests to obtain the desired quantitative description. When mixed gradients (changes in several parameters of size and shape) or nonlinear directions of variation are present, the situation becomes extremely complex, and requires knowing a great deal in advance about the specimen. One of the most interesting location-related variables in structures is the distance between neighboring features. Figure 13.11 shows three example cases, corresponding to a random distribution of features, uniform spacing of features, and clustering of features. Many physical situations correspond to one of these. Random distributions result when every instance is independent of all others. A section through a random three-dimension structure will show a random distribution of features on the section plane. Clustering results when structures are attracted to one another by some force (gravity causes clustering of galaxies, surface tension causes clustering of dust on fluids, human nature causes people to live in cities). Spacing or self-avoidance also arises from physical conditions; for example the precipitation of particles in metals typically produces self avoidance because forming one particle depletes the surrounding region of the element in the particles and makes it less likely that a second particle will form nearby. To have a quantitative measure of the tendency of structures to clustering or self avoidance, Exner (Schwarz & Exner, 1983)) has proposed measuring the nearest neighbor distance. For a random structure, this produces a Poisson distribution, with a few particles having quite close neighbors and others much large spacings. In fact, the random distribution is sometimes called a Poisson random process. In a clustered structure, as shown in Figure 13.12, the nearest neighbor is usually much closer, and conversely in the self-avoiding structure the mean nearest neighbor distance is much greater. For a Poisson distribution, the mean is the only parameter needed to fully characterize the data. If the number of features per unit area is known, the mean Anisotropy and Gradients 325 b a c Figure 13.11. Examples of clustering (a), self-avoidance(b) and a random distribution of features (c). value that a random distribution will produce is therefore known. It should be simply Mean Distance = 0.5 NA (13.8) which has the proper units of distance. For any Poisson distribution, the standard deviation is simply the square root of the mean. If the mean nearest neighbor distance and standard deviation value actually measured from an image is different from the mean value, we can conclude that the specimen is not random and decide whether it shows clustering or self-avoidance. The chapter on statistical analysis 326 Chapter 13 b a c Figure 13.12. Histograms of the measured nearest neighbor distances for the features in the images in Figure 13.11. (For color representation see the attached CD-ROM.) presented the t-test, a simple tool that can be used to compare the values and make a determination, with explicit confidence levels. Table 13.1 shows the values for each of the images in Figure 13.11. Nearest neighbors can also be used to identify anisotropy. Figure 13.13 shows an illustration of using the nearest neighbor direction to produce a rose plot of orientation. In the example, most of the nearest neighbors lie in either the northeast or southwest direction, indicating a strong preferred orientation. This method has proven particularly useful in finding and correcting the compression of samples produced by microtoming, which can result in distortions of 10–20%. Stretching the Table 13.1. Nearest neighbor data from Figures 11 and 12 Image: Mean Nearest Neighbor Distance (pixels) Standard Deviation Predicted (equation 7) Standard Deviation Clustered 7.41 Self-Avoiding 20.81 Random 13.56 6.16 12.86 3.59 0.01 11.40 3.38 6.33 13.06 3.61 Anisotropy and Gradients 327 a b Figure 13.13. Illustration of preferred orientation revealed by a rose plot of the number of nearest neighbors as a function of the orientation angle at which they occur. (For color representation see the attached CD-ROM.) image back until the rose plot becomes circular (provided the structure is isotropic) restores the correct dimensions. Distances and Irregular Gradients Measuring the distance of features from each other is generally carried out after the measurements have been taken on each feature. The locations of the centroids of the features can then be compared, pairwise, to find the closest neighbor and the distance or direction used for the statistical comparisons discussed above. The coordinates of features are generally in some external coordinate system, based on the pixel location within the image and perhaps the stage micrometer coordinates or the location from which the sample was taken in the original specimen. But it is often useful to measure the distances of features from some other structure present in the specimen. This could be the surface, but in most cases is likely to be an irregular feature such as a grain boundary, some other type of particle, etc. In biological specimens it may be a membrane or cell wall, or another organelle. In a real world it might be the distance from the nearest road. Calculating this distance in the traditional analytical geometry way would be at least very difficult, since the target boundary is not likely to have a simple algebraic function to describe its shape. Also, for irregular boundaries there may be several different perpendicular distances and finding the appropriate shortest one adds more complexity. Fortunately, there is a relatively straightforward and very fast way for the computer to make this measurement by processing the original image. It is based on the Euclidean Distance Map (EDM), which assigns a value to each pixel in the 328 Chapter 13 a b c d e Figure 13.14. Illustration of using the Euclidean distance map to measure distance from an irregular boundary: a) test image showing boundary and features; b) the interior of the boundary with colors assigned according to distance (the Euclidean distance map); c) the features; d) colors from figure 13.b assigned to the features from figure 13.c; e) histogram of distances obtained by tallying the colors of features in figure 13.d. (For color representation see the attached CD-ROM.) Anisotropy and Gradients 329 a c b Figure 13.15. Illustration of the linear Hough transform. Each point in the original spatial domain image (a) generates a sinusoid in Hough (r, q) space (b) corresponding to all possible lines through the point. The crossover point in this space identifies a single straight line in the spatial domain image (c) that passes through the points. (For color representation see the attached CD-ROM.) image based on its straight line distance from a defined structure regardless of shape or irregularities. The algorithm for constructing the EDM (Danielsson, 1980) requires only two passes over the image pixels, and no algebra, taking only a fraction of a second on the computer. As shown in Figure 13.14 this produces an image (color coded for clarity) in which all pixels with the same value lie at the same distance from the boundary. Combining this image with an image of the features of interest assigns the distance values to the features. Measuring each feature’s color value then gives the desired information. In order to use the data in Figure 13.14e to detect gradients with respect to distance from the boundary, an additional step is needed. The shape of the interior region within the boundary is important because there is more space near the boundary than far away. This can also be measured with the distance map. A simple histogram of all of the pixels within the region gives the number of pixels at each distance from the boundary. This can be used to normalize the histogram of feature 330 Chapter 13 distances, to reveal gradients that place many features near the boundary or perhaps show depletion there. Alignment Human vision is particularly good at finding alignments of features along straight lines (even if they really aren’t based on any physical reason, which is why we see constellations in the night sky). There is a computer technique that can be used to locate these alignments automatically, called the Hough transform (Hough, 1962). Figure 13.15 shows the basic steps involved. Each point in the original image is mapped into Hough space as a sinusoid. The (r, q) coordinates of this space are the polar coordinates of a line in the original spatial domain. Each point on the sinusoid represents one of the possible lines that could be drawn through the corresponding point in the original spatial image. Since all of the sinusoids in Hough space are added together, a maximum value results where many of them cross over. In Figure 13.15b, color coding has been used to show this peak. The peak corresponds to the coordinates of the line that passes through the points in the original image, and shown in Figure 13.15c. This method can also be applied to fitting circles and other shapes (Duda & Hart, 1972), but the details go beyond the intended scope of this text.