Master of Science Thesis
Fractal Dimension Analysis of Grain
Boundaries of 7XXX Aluminum Alloys and
Its Relationship to Fracture Toughness
Hamideh Khanbareh
22 December 2011
Faculty of Aerospace Engineering Delft University of Technology
Fractal Dimension Analysis of Grain
Boundaries of 7XXX Aluminum Alloys and
Its Relationship to Fracture Toughness
Master of Science Thesis
For obtaining the degree of Master of Science in Aerospace
Engineering at Delft University of Technology
Hamideh Khanbareh
22 December 2011
Faculty of Aerospace Engineering Delft University of Technology
Delft University of Technology
Delft University Of Technology
Department Of
Novel Aerospace Materials
The undersigned hereby certify that they have read and recommend to the Faculty of
Aerospace Engineering for acceptance a thesis entitled Fractal Dimension Analysis of
Grain Boundaries of 7XXX Aluminum Alloys and Its Relationship to Fracture
Toughness by Hamideh Khanbareh in partial fulfillment of the requirements for the
degree of Master of Science.
Dated: 22 December 2011
Head of department:
prof.dr.ir. S. van der Zwaag
Supervisor:
dr. X. Wu
Reader:
dr.ir. R.C. Alderliesten
Reader:
dr. A.G. Miroux
Abstract
The main aim of this M.Sc. thesis is quantitative analysis of the grain boundaries in
partially recrystallized microstructures of hot-rolled 7050 Aluminum alloy. To this end
a MATLAB program was developed to automatically process both microstructures of
fully recrystallized and partially recrystallized materials in order to detect the desired
grain boundary, while removing all other features including sub-grains and precipitations.
The image processing performed on images of microstructures consists of several steps of
preparation, segmentation and postprocessing, that eventually lead to the extraction of
quantitative information. The output is a binarized image containing a one pixel wide
boundary suitable to be implemented in box counting calculations to estimate the fractal
dimension of the boundary.
To implement the box-counting method for fractal dimension calculations a MATLAB
program was developed based on the theoretical considerations. To examine the accuracy
of the algorithm, test images of Koch snowflake curves with known theoretical fractal
dimension were generated at different iterations. The influence of a number of iterations
and image resolution on the accuracy of estimated fractal dimension is evaluated using
the same Koch curves. It has been found out that at a constant resolution, increasing the
number of iterations results in a fractal dimension closer to the mathematical value, while
for each Koch curve higher image resolution results in less deviation from the theoretical
fractal dimension.
The verified box counting algorithm was used to quantify the irregularity of high angle
grain boundaries between recrystallized and un-recrystallized regions in the microstruc-
ture of heat-treated Aluminum alloys for three types of conventional-rolled, modified-
v
vi Abstract
rolled I ,and modified-rolled II materials each containing 0 and 90 groups of samples.
In order to investigate the effect of grain shape on fracture behavior of the material, box
counting calculations were carried out on high angle grain boundaries aligned in crack
growth direction in the microstructure of crack plane for tear-tested specimens. The effect
of grain boundary configuration on fracture toughness of the materials was investigated
using UPE data of tear test. The results show that there is a strong correlation between
UPE and the fractal dimension of the grain boundaries parallel to crack propagation di-
rection for both 0 and 90 group of samples. In other words by increasing the fractal
dimension of grain boundaries, the UPE of all studied material increases. For both 0
and 90 group of samples the modified type I with higher percentage of modified rolling
posses the highest fractal dimension and the highest fracture toughness value. Comparing
two different 0 and 90 orientations for each rolling process, it has been found out that
90 sample shows higher fractal dimension and higher UPE than 0, this is in agreement
with the observation that the material tested in 0 mostly shows intergranular fracture
however, in 90 the fracture mode is more transgranular.
Quantitative analysis has been carried out on the Aluminum micrographs to estimate
the degree of recrystallization and the grain size in crack growth direction, in order to
compare the influence of fractal dimension of grain boundaries on UPE to that of other
microstructural parameters. It has been found out that there is no clear correlation
between the fraction of recrystallized grains and the UPE. Studying the grain size in
crack propagation direction shows that increasing the grain size results in decreasing the
unit propagation energy. However comparing the general trends of data for both effects
of the grain size and the fractal dimension on the fracture toughness reveals that the
fractal dimension of the grain boundaries has the most significant role in determining the
fracture toughness of the studied materials.
Contents
Abstract v
List of Figures xi
List of Tables xiii
1 Introduction 1
1.1 Fractals in materials engineering . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Fractals in the microstructure of metallic materials . . . . . . . . . 2
1.1.2 Serrated grain boundaries in the microstructure of alloys . . . . . . 3
1.2 Digital image processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 Preprocessing or basic image enhancement . . . . . . . . . . . . . . 6
1.2.2 Segmentation or discrimination of features in microstructures . . . 11
1.2.3 Postprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 The concept of fractals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3.1 The Koch snowflake curve . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.2 Self-similarity and similarity dimension . . . . . . . . . . . . . . . 17
1.3.3 Statistical self-similarity . . . . . . . . . . . . . . . . . . . . . . . . 20
1.3.4 Characterization of serrated grain boundaries by fractal analysis . 20
2 Image processing 29
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2 MATLAB program for boundary extraction . . . . . . . . . . . . . . . . . 29
2.2.1 Boundary extraction in partially recrystallized microstructure . . . 30
2.2.2 Boundary extraction in fully recrystallized microstructure . . . . . 39
2.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
vii
viii Contents
3 Box counting method for fractal dimension calculation 45
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.2 Box-counting dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.3 MATLAB code for box-counting calculations . . . . . . . . . . . . . . . . 47
3.4 Generation of Koch snowflakes . . . . . . . . . . . . . . . . . . . . . . . . 47
3.5 Implementation of the box-counting program . . . . . . . . . . . . . . . . 49
3.5.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.5.2 The origin of possible errors . . . . . . . . . . . . . . . . . . . . . . 55
3.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4 Calculating fractal dimension of the grain boundaries 57
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.1.1 Fracture toughness testing . . . . . . . . . . . . . . . . . . . . . . . 58
4.2 Experimental work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.3 Results and discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.3.1 Image processing on the Aluminum microstructure . . . . . . . . . 63
4.3.2 Box counting measurements on the grain boundaries of Aluminummicrostructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.3.3 Relationship between the fractal dimension of the grain boundariesand the fracture toughness . . . . . . . . . . . . . . . . . . . . . . 78
4.3.4 Relationship between the fracture toughness and other microstruc-tural features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.3.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5 Conclusions 87
A Matlab codes 99
A.1 MATLAB Code for Generating Koch snowflake curves . . . . . . . . . . . 99
A.2 MATLAB Code for image processing followed by box-counting . . . . . . 101
A.3 Detect code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
A.4 MATLAB Code for box-counting calculation . . . . . . . . . . . . . . . . 105
A.5 MATLAB Code for calculating degree of recrystallization . . . . . . . . . 106
List of Figures
1.1 Flowchart of image-based description of microstructure. . . . . . . . . . . 6
1.2 An image and its histogram . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Examples of logic operations . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Background subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Sequence of application of a neighborhood operation . . . . . . . . . . . . 10
1.6 An example of SE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.7 Properties of transformations based on erosion and dilation . . . . . . . . 14
1.8 Skeleton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.9 classical concept of the dimension versus fractal dimension . . . . . . . . . 16
1.10 Procedure for generating Koch snowflake curve . . . . . . . . . . . . . . . 17
1.11 Self-similarity concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.12 Exact and statistically self-similar fractal curves and their fractal dimensions 21
1.13 Mandelbrot-Richardson diagram . . . . . . . . . . . . . . . . . . . . . . . 22
1.14 Divider method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.15 Aria-perimeter method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.16 Box-counting method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.1 Microstructure of partially recrystallized Al7050. . . . . . . . . . . . . . . 30
2.2 Microstructure after binarization using T = 0.80. . . . . . . . . . . . . . . 32
2.3 Microstructure after hole-filling. . . . . . . . . . . . . . . . . . . . . . . . . 32
2.4 Concept of connectedness. . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.5 Disk-shaped structuring element. . . . . . . . . . . . . . . . . . . . . . . . 34
2.6 Microstructure after contour thickening followed by labeling. . . . . . . . 35
2.7 Detected grain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.8 Detected grain after closing. . . . . . . . . . . . . . . . . . . . . . . . . . . 36
ix
x List of Figures
2.9 Extracted grain boundary. . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.10 Initial image vs final image. . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.11 Microstructure of fully recrystallized Al7050. . . . . . . . . . . . . . . . . 39
2.12 Microstructure after binarization. . . . . . . . . . . . . . . . . . . . . . . . 40
2.13 Microstructure after hole-filling. . . . . . . . . . . . . . . . . . . . . . . . . 41
2.14 Microstructure after contour thickening followed by labeling. . . . . . . . 41
2.15 Detected grain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.16 Detected grain after closing. . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.17 Extracted grain boundary. . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.18 Extracted grain boundary after opening. . . . . . . . . . . . . . . . . . . . 43
2.19 Initial image vs final image. . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.1 Surrounding the Koch curve with boxes . . . . . . . . . . . . . . . . . . . 46
3.2 Construction of the Koch curve. . . . . . . . . . . . . . . . . . . . . . . . 49
3.3 Koch snowflakes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.4 Results of box-counting calculation for Koch2 at two resolutions. . . . . . 52
3.5 Results of box-counting calculation for Koch3 at two resolutions. . . . . . 52
3.6 Results of box-counting calculation for Koch4 at two resolutions. . . . . . 53
3.7 Results of box-counting calculation for Koch5 at two resolutions. . . . . . 53
4.1 The sketches of an untested and tested Kahn-tear test specimens. . . . . . 59
4.2 Schematic result of tear test to measure UPE. . . . . . . . . . . . . . . . . 59
4.3 Sample orientations used for fracture toughness tests . . . . . . . . . . . . 60
4.4 Specimens for microstructure analysis . . . . . . . . . . . . . . . . . . . . 61
4.5 Microstructure of partially recrystallized 7050 alloy . . . . . . . . . . . . . 62
4.5 Microstructure of partially recrystallized 7050 alloy . . . . . . . . . . . . . 63
4.6 Procedure of sampling the grain boundary aligned in L direction on L-Tplane of CoR 0 sample. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.7 Procedure of sampling the grain boundary aligned in L direction on L-Tplane of MoRI,1 0
sample. . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.8 Procedure of sampling the grain boundary aligned in L direction on L-Tplane of MoRI,2 0
sample. . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.9 Procedure of sampling the grain boundary aligned in L direction on L-Tplane of MoRII,1 0
sample. . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.10 Procedure of sampling the grain boundary aligned in L direction on L-Tplane of MoRII,2 0
sample. . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.11 Procedure of sampling the grain boundary aligned in S direction on S-Tplane of CoR 90 sample. . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.12 Procedure of sampling the grain boundary aligned in S direction on S-Tplane of MoRI,1 90
sample. . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.13 Procedure of sampling the grain boundary aligned in S direction on S-Tplane of MoRI,2 90
sample. . . . . . . . . . . . . . . . . . . . . . . . . . 72
List of Figures xi
4.14 Procedure of sampling the grain boundary aligned in S direction on S-Tplane of MoRII,1 90
sample. . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.15 Procedure of sampling the grain boundary aligned in S direction on S-Tplane of MoRII,2 90
sample. . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.16 Box counting results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.16 Box counting results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.17 Relationship between the fractal dimension of the grain boundaries and UPE. 80
4.18 The relationship between the fractal dimension of the grain boundaries andUPE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.18 The procedure to calculate the degree of recrystallization of partially re-crystallized microstrucures. . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.19 Relationship between degree of recrystallization and UPE. . . . . . . . . . 83
4.20 Schematic procedure of measuring the recrystallized grain size in crackpropagation direction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
4.21 Relationship between grain size and UPE. . . . . . . . . . . . . . . . . . . 85
xii List of Figures
List of Tables
2.1 Input values for the MATLAB program . . . . . . . . . . . . . . . . . . . 39
3.1 Size of generated Koch images. . . . . . . . . . . . . . . . . . . . . . . . . 49
3.2 Results of box-counting for different Koch islands at the resolution of 400dpi. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.3 Results of box-counting for different Koch islands at the resolution of 600dpi. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.4 Results of box-counting for Koch5 at 600 dpi. . . . . . . . . . . . . . . . . 54
4.1 Results of box-counting on Aluminum microstructures. . . . . . . . . . . . 79
4.2 UPE data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.3 Measurement results of the degree of recrystallization. . . . . . . . . . . . 82
4.4 Measurement results of average recrystallized grain size in crack growthdirection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
xiii
xiv List of Tables
Chapter 1
Introduction
The microstructure of metals and alloys is composed of grains, separated by grain bound-
aries. The mechanical properties of polycrystalline materials are strongly related to the
shape, distribution, and character of these grain boundaries. In classical stereology grains
are normally described by size and shape factors, for instance average grain size and as-
pect ratio. However these conventional descriptors are not capable to quantify an irregular
morphology of the grains. Recently a new family of hot-rolled Aluminum alloys have been
produced with very good toughness values. The alloys have a standard composition, and
a seemingly normal microstructure with the exception of one special feature: serrated
grain boundaries. Fractal geometry is found to be an efficient tool to describe shapes
having a rugged appearance. The tortuosity, fragmentation or roughness of such features
can be described via their fractal dimension. In general the fractal dimension is an exten-
sion of the Euclidean dimension and allows describing complex boundaries. For a straight
line, Euclidean and fractal dimensions are equal to 1. For a line inscribed in a plane, the
fractal dimension varies from 1 if the line is straight to 2 if the line is so tortuous that it
fully covers the whole plane. Introduction of the fractal concept and methods to calculate
fractal dimension are presented in section 1.3.
1.1 Fractals in materials engineering
The concept of fractal geometry has been applied in different fields of materials engineering
where shapes of objects have to be characterized. The main reported topics can be
1
2 Introduction
categorized as follows:
Metallic materials: will be treated in detail in 1.1.1.
Porous materials: surface fractal dimension, an important parameter reflecting
the roughness of pore surfaces is the aim of characterization of different porous
systems [1]. For instance Al2O3-SiO2 membranes with application in filtration [2],
mesoporous carbons with application as electrode materials in electric double-layer
capacitors [3, 4], SiC ceramics [5], palladium-alumina ceramic membrane [6], and
soil structure [7].
Thin-film materials: surface roughness characterization by means of fractal ge-
ometry has been reported for gold films deposited on quartz crystals [8], copper
tungsten thin film deposited on silicon wafers for application in electronic devices
[9], thin films of BaTiO3 for electro-ceramic applications [10], and silver oxide film
[11, 12] used as a photocathode.
Crack paths: analysis of the crack geometry using fractal dimensions is reported
for aluminazirconia composites [13]
Fracture surfaces: the fractal dimension as a measure of fracture surface rough-
ness [14, 15, 16, 17, 18, 19, 20] has been reported for ceramics[21], composites[22, 23,
24], glass [25], and metallic materials like Steels and Titanium alloys [26, 27, 28, 29].
Fine particles: irregularity of the structure of metal powder grains [30, 31], pig-
ments [31], wear particles [32, 33], colloidal particles in solid-liquid suspension [31],
and aerosol particles like carbon black and diesel soot [34, 35, 31] has been quantified
by fractal geometry.
Silicate minerals: serrated grain boundaries in the recrystallized microstructure of
quartz have been characterized by their fractal geometry. The relationship between
deformation parameters, temperature and strain rate, and fractal dimension of the
boundaries has been investigated. It has been reported that the fractal dimension
increases with increasing strain rate and decreasing temperature [36, 37, 38, 39, 40,
41, 42, 43].
1.1.1 Fractals in the microstructure of metallic materials
Fractal dimensions have been extensively used to characterize various features of metallic
microstructures, for instance:
1.1 Fractals in materials engineering 3
Dislocation patterns [20, 44, 45]
Grain boundary morphology [20, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 67]
Metallic powder particles [20]
Dendritic structures [20]
Slip lines [20]
Precipitates [20, 68, 69, 70]
Martensite structure [20]
Graphite structure in cast iron [71, 20]
Void structures [70, 20]
1.1.2 Serrated grain boundaries in the microstructure of alloys
Fractal analysis for quantifying the degree of the grain boundary serration as one of the
important indexes to characterize the microstructure and properties of alloys has been
attempted for different metallic materials. It has been shown that the grain boundary
configuration can be estimated by the fractal dimension of grain boundary surface profile
in two-dimensional section (the fractal dimension of the grain boundaries, D, 1 < D
< 2). When the fractal dimension of grain shapes is almost one, the grain boundaries
display linear shapes, and when the fractal dimension shows a higher value, towards 2,
the grain boundaries present a serrated figure. The evolution of rugged or serrated grain
boundaries in alloys, e.g. by cold work, hot work, or heat treatment, is one of the most
effective methods to improve the high-temperature strength of alloys, especially the creep
rupture properties [46, 48, 72, 47]. There is also a possibility to investigate a numerical
correlations between the fractal dimension of the grain boundaries and strength properties
such as fracture toughness, creep strength, and high temperature fatigue [47, 72].
The summary of the reported investigations and related mechanical properties for different
metallic systems is discussed below.
Hot-worked Al-Mg alloys [50, 46] has been reported to show serrated grain bound-
aries after hot deformation.
4 Introduction
Hot-worked Ti-15-3 alloy after hot deformation and solution treatment [49]. The
fractal dimension of recrystallized grains were studied and the influence of processing
parameters on fractal dimension was investigated. With increasing deformation
degree and strain rate or decreasing deformation temperature, the fractal dimension
of recrystallized grains becomes larger.
Solution-treated AISI 316 stainless steel [51, 52] were studied to investigate the
formation of rugged grain boundaries. It has been reported that grain boundary
serration forms by interaction between grain boundary and second phase particles
at the boundary. It has been shown that creep properties improve when grain
boundary serration occurs, since serrations disturb grain boundary sliding.
Solution-treated Ni-based and Co-based superalloys. The development of serrated
grain boundary has been reported to be associated with the heterogeneous pre-
cipitations at grain boundaries and the migration of grain boundary segments in
between the particles. It has been demonstrated in several commercial superalloys
that a material with irregular, serrated grain boundaries has improved resistance to
creep crack growth over one with smooth grain boundaries [48, 54, 55, 58, 56].
Cold worked pure iron. The fractal geometry has been applied to describe the
morphologies of deformed and recrystallized structures of pure iron. It has been
found out that the fractal dimension increases with the amount of plastic defor-
mation. The fractal dimension of the deformed structures reaches a peak near the
recrystallization temperature and decreases with the grain growth [73].
Pure Zn poly-crystals [67] and austenitic steel [65] during creep deformation were
studied. The effect of creep deformation on grain morphology was investigated
using fractal geometry. The fractal dimension of the grain boundaries increases
with increasing the creep strain which can be correlated with the increase in the
density of slip lines in the grains that formed the serrations on grain boundaries.
Cu-Au alloy refined by platinum [61] has been reported to show higher fractal di-
mension than non-refined alloy.
Tungsten wire for light bulbs [62, 63]. Fractal dimension of tungsten grains has been
demonstrated to highly affect the creep behavior of the lamp filament wire which
must be very resistant to high-temperature creep. It has been observed that grain
boundary sliding is suppressed for grains with higher fractal dimensions.
1.2 Digital image processing 5
In order to quantitatively describe the fractal characteristics of grain boundaries in the
microstructures, the first step is to abstract the grain boundary. It is necessary to conduct
several image processing operations on the images of the microstructure. This study
attempts to introduce the fundamentals of digital image processing and the basis of fractal
geometry required to quantitatively characterize the configuration of the grain boundaries
in the microstructure of partially recrystallized Aluminum alloys.
1.2 Digital image processing
In materials science images play very important role in the area of the quantitative de-
scription of the microstructure. In order to perform measurements on images of mi-
crostructures image processing is the first step to be taken. Image processing, by defi-
nition, include those methods that start with an image (an array of pixels each with a
gray-scale value) and end with an image. Various kinds of methods intend to produce a
modified image that emphasizes some aspects of the original image, for instance filtering
technique selects certain kinds of image data to be analyzed. More often the features
that are desired are particles, boundaries, or some other defined structures. Depending
on what is considered to be of interest, it is possible to construct a suitable processing
operation to make the feature ready to be measured. It is basically possible to measure
different stereologocal parameters which describe the geometrical properties of either a
group of features or one individual microstructural element from the imaged micrograph.
Point numbers, length and area of system of elements can be simply calculated using the
pixel-related information of the images. There are also various parameters that are not
directly measured, but can be derived from primitive measurements. Having described
the microstructural elements of interest it would be possible to evaluate the materials
properties. The procedure of image analysis starting from feature recognition to relation-
ship analysis is illustrated in figure 1.1.
The operations performed on images of microstructures in order to enhance them or to
make them more accessible for quantitative analysis, are described as image processing.
The process of image processing can be viewed as consisting of three steps:
1. Preprocessing or basic image enhancement
2. Segmentation or discrimination of features in microstructure
3. Postprocessing
6 Introduction
Figure 1.1: Flowchart of image-based description of microstructure.
After these steps have been performed, measurements and data analysis are undertaken
[74]. The above mentioned steps are described below.
1.2.1 Preprocessing or basic image enhancement
Enhancement is the first step used to correct basic image defects, and it is considered
as a preparation for the segmentation step that eventually leads to the extraction of
quantitative information. Due to the digital nature of the computer images they can be
modified using usual mathematical functions. The simplest functions can be applied for
basic image enhancement, usually known as brightness and contrast control. Histograms,
look-up tables (LUT), and point operations are preprocessing mathematical manipula-
tions of pixel intensities which are widely used in image enhancement. Shading correction
is applied in this phase in case of uneven illumination, and noise reduction can be done
using suitable filters prior to any quantitative analysis.
The image histogram
It is noteworthy to make a brief review about the basis of digital images here. A gray-
scale digital image is composed of discrete points of gray tones, or brightness, rather than
1.2 Digital image processing 7
Figure 1.2: An image and its histogram. (a) Light micrograph, hypereutectic cast iron,
200, BF, CCD 1300 1030. (b) Intensity histogram [75].
continuously varying tones. A natural image is divided into a number of individual points
of brightness, and in addition, each of those points is described by a digital data value.
Each brightness point is a pixel of the digital image. A pixel is the most basic element
of any digital image. The pixels of an image form a rectangular array. Each pixel has a
coordinate (x, y) that corresponds to its location within the image, x being the vertical
component, and y the horizontal component. In general (0, 0) is the upper left corner of
the image. For 256 gray-tone images, a pixel can have one of the 256 brightness values,
ranging from 0 to 255. Black is represented by 0, and white is represented by 255.
The image histogram is actually the distribution of the pixel intensities in the image.
Figure 1.2 shows an image obtained through a light microscope and a CCD camera, and
its respective histogram. The horizontal axis represents the pixel intensities, in this case
between 0 (black) and 255 (white). The vertical axis measures the number of pixels in
each intensity value. For a gray scale image it corresponds to the gray-level distribution
[75].
Point Operations
Point operations are a class of image enhancements that do not alter the relationship
of pixels to their neighbors. This class of algorithms uses a type of transfer function to
translate original gray levels into new gray levels. In general terms, all LUT operations
are classified as point operations, where the intensity I0(x, y) of a pixel with coordinates
(x, y) in the output image is a function only of the intensity Ii(x, y)of a pixel with the
same coordinates in the input image. That is:
8 Introduction
Figure 1.3: Examples of logic operations between binary images. (a) Image A. (b) Image
B. (c) A AND B. (d) A OR B. (e) A XOR B. (f) NOT A [75].
I0(x, y) = F [Ii(x, y)] (1.1)
Where F is the function that relates input and output intensities. It can be represented
by a numerical table. Applying an LUT to an image is a very fast operation. Image-
processing programs use this fact to allow dynamic, interactive modification of parameters
such as brightness, contrast, and other display characteristics [75, 76]. Point operations
are the basis of algebraic and logic operations.
Algebraic and Logic Operations
Two or more images of the same size can be combined with different kinds of operations
in such a way that:
I0(x, y) = F [Ii1(x, y), Ii2(x, y)] (1.2)
Where Ii1(x, y) and Ii2(x, y) represent the intensities of pixels in the same positions of
two input images, F is a function that relates the two images, and I0(x, y)is the out-
put intensity. The simplest functions are algebraic operations like addition, subtraction,
multiplication, and division [75]. These functions that use more than one image and
combine them in mathematical way are very useful. For example, adding images is used
to increase the brightness in an image, averaging images is used to reduce noise, and
subtracting images is used to correct for background shading [77].
Similar to algebraic operations, logic operations relate binary images. The fundamental
operations, are negation (NOT), intersection (AND), union (OR), and difference (ex-
clusive or, XOR). Figure 1.3 shows examples of these operations. Logic operations are
particularly useful in the postprocessing step that follows image segmentation [75].
1.2 Digital image processing 9
Figure 1.4: Background subtraction. (a) An image with uneven illumination (hypereutectic
cast iron, 200, BF, CCD 1300 1030). (b) Estimated background. (c)
Background subtracted image. ASM, Digital imaging [75].
Shading correction
Image defects that are caused by uneven illumination or artifacts in the imaging path,
typical of light microscopy, must be taken into account during image processing. Shading
correction is used when a large portion of an image is darker or lighter than the rest of
the image. The relative differences between features of interest and the background are
usually the same, but features in one area of the image have a different gray level range
than the same type of feature in another proportion of the image. The main methods
of shading correction use a background reference image, either actual or artificial. A
featureless reference image requires the acquisition of an image using the same lightening
conditions but without the features of interest. The reference image is then subtracted
from the shaded image to level the background as shown in Figure 1.4 [77].
Filters
Digital images are often polluted with noise produced, for example, by video cameras
in the case of insufficient illumination or by SEM detectors. Obviously, noise should be
removed from such images prior to any quantitative analysis. This can be done using
suitable filters. Filtering is one of the neighborhood kernel operations, which translates
individual pixels based on surrounding pixels. In these transformations the output in-
tensity of any image pixel at position (x, y) depends not only on the initial gray value of
this pixel but also on the gray levels of its neighbors. The concept of using a kernel or
two-dimensional array of numeric operators which is briefly discussed bellow, provides a
wide range of image enhancements.
The basic principle of operation is shown in Figure 1.5. A certain neighborhood size is
chosen in the input image, in this example, 3 3 pixels. The intensity of each pixel
10 Introduction
Figure 1.5: The sequence of application of a neighborhood operation [75].
in this neighborhood is multiplied by a certain weight; the results are summed together
and divided by the total weight for all pixels. The resulting value is written in the
output image in a coordinate that corresponds to the neighborhood center. The process
is repeated for a new neighborhood, one column to the right, and so on, until the right
edge of the image is reached. Then the neighborhood moves to the next line, and the
column scan is repeated. Eventually, the last line of the image is scanned.
The effect of the operation depends on the neighborhood size and on the weights that
multiply the intensities of the pixels. The neighborhood is always odd-sided, so that a
central pixel can be chosen. The larger the neighborhood the stronger is the effect of
the operation. The weights are normally represented by a matrix with the size of the
neighborhood, the kernel. Kernel operations are fundamental for noise filtering, back-
ground subtraction, edge detection, and other applications. Some filters will be described
in detail below.
Smoothing filter
Smoothing filter is probably the simplest possible filter that provides an image with
reduced noise and a somewhat out-of-focus appearance. The simplest way to smooth
noise in an image would be to replace the value of each pixel by the average of it and its
neighbors. The positive kernels are smoothing filters [75].
1.2 Digital image processing 11
Median filter
Median filter would provide better results than smoothing filter. For each neighborhood,
this filter sorts pixel intensities in ascending order and takes the median value of the
sequence, which is then written in the central pixel of the neighborhood in the output
image. A median filter can be effectively applied for treating heavily noisy images and in
most cases is the best solution available. This filter keeps the image sharp [75].
Maximum and the minimum filters
The maximum filter returns the value which is equal to the maximum of all the pixels
surrounding the pixel being analyzed. As a consequence, one obtains a new image which
is brighter than the original, with removed noise. The filtered image contains less details
than the initial one. The minimum filter returns the value which is equal to the minimum
of all the pixels surrounding the pixel being analyzed. The result of minimum filtering
is darker than the original and contains less details. The minimum and maximum filters
are widely used in practice and simultaneously are equivalent to some morphological
operations, which are sometimes decisive for the final result of image analysis [78].
1.2.2 Segmentation or discrimination of features in microstructures
Segmentation is the technical term used for the discrimination of objects in an image.
When one looks at an image one uses many different inputs to distinguish the objects:
brightness, boundaries, specific shapes, or textures. The brain processes this information
in parallel at high speed, using previous experience. Computers, on the other hand, do
not have the same associative power. The recognition of objects in an image is made
through the classification of each pixel of the image as pertaining or not to an object.
Here the binarization method is discussed.
Binarization
The process of transformation of gray-scale images into binary ones is called binarization
or thresholding, in which 256 gray values are reduced to 2 gray values. It is accomplished
by selecting the gray level range of the features of interest. Pixels within the selected gray
level range are assigned as foreground, or detected features, and everything else as back-
ground, or undetected features. In other terms thresholding simply converts the image to
a series of 0s and 1s, which represent undetected and detected features respectively [77].
12 Introduction
The simplest and most commonly used parameter for thresholding is the intensity of the
pixel. A pixel is considered part of an object if it is bright enough. The segmentation
then proceeds through the choice of a certain threshold level T and the application of the
simple decision rule [75]:
If I(x, y) T then the pixel at (x, y) belongs to the object class.
If I(x, y) < T then the pixel at (x, y) belongs to the background class.
The proper choice of threshold level is decisive for the results of analysis. Threshold
selection methods can require user intervention or be fully automatic. In the interactive
thresholding the operator chooses the threshold T manually and adjusts it until a rea-
sonable segmentation is obtained. The image histogram is always used as a reference.
Interactive thresholding can be very efficient and provide fast, accurate results [78].
1.2.3 Postprocessing
Even with the best conditions, segmentation is seldom a single-step procedure. Most of
the sophisticated methods can leave behind spurious objects and other defects that must
be dealt with in the postprocessing step. There is one main group of methods based on
morphological operations to improve the segmentation results. These operations are used
to correct segmentation defects.
Morphological operators
Morphological operators are part of mathematical morphology [79], a powerful approach
to process images. Application of morphological operators enables detection of features
not available with other analysis methods. These operators are similar to the neighbor-
hood operators; they look at a given pixel and its neighbors. The main difference is that
morphological operators are more commonly applied to the binary images created by
segmentation. The analysis of a pixel neighborhood defines if the pixel keeps its original
black or white color, or if it is inverted. Morphological operators depend on structuring
element, which defines the shape of the neighborhood analyzed around each pixel and,
will affect the final shape of objects submitted to the operations. The central point of
mathematical morphology is the concept of structuring element. It can be understood as
a model of local pixel configuration. Usually, structuring elements are defined using the
following notation:
1 - for pixels belonging to the set of points under analysis
1.2 Digital image processing 13
Figure 1.6: An example of SE.
0 - for pixels belonging to the matrix
X - for pixels not taken into account (i.e., this point can have any value and has no effect
in the transformation)
An exemplary structuring element is shown in figure 1.6.
Morphological transformations can be defined as advanced filters, applied not for all the
pixels in the image, but only for pixels that fit configurations defined by the structuring
element. From the very long list of morphological transformations available, the following
groups are more important:
Erosion, dilation, opening and closing
Skeletonization
Erosion and Dilation
Common operations that use neighborhood relationships between pixels include erosion
and dilation. These operations simply remove or add pixels to the periphery (both exter-
nally and internally, if it exists) of a feature based on the shape and location of neighbor-
hood pixels. Erosion often is used to remove extraneous pixels, which may result when
overdetection during thresholding occurs, because some noise has the same gray level
range as the features of interest. When used in combination with dilation (referred to as
opening), it is possible to separate touching particles. Dilation often is used to connect
features by first dilating the features followed by erosion to return the features to their
approximate original size and shape (referred to as closing). Most image analysis systems
allow the option of using several neighborhood kernel patterns. However, great care must
be exercised because the feature shape can be significantly different from the original
shape [77]. The basic properties of the whole family are shown graphically in Figure 1.7.
Skeletonization
A specialized use of erosion that prevents the separation of features while eroding away
pixels is called skeletonization, or thinning. This operation is useful when thinning thick,
14 Introduction
Figure 1.7: Illustration of the properties of transformations based on erosion and dilation.
(a) Initial image, (b) the same image after erosion, (c) opening, (d) dilation,
(e) closing, and (f) closing followed by opening [78].
Figure 1.8: An example of geometrical figure and its skeleton (thick black line) [78].
uneven feature boundaries. One can intuitively understand the idea of skeleton from
Figure 1.8. However, a more formal definition can be helpful for further analysis. We can
treat a skeleton as a central line, i.e., a line whose points are equally distant from two
closest points of the figure edges [77].
1.3 The concept of fractals
A traditional Euclidean classification of shape which is in harmony with the sense de-
veloped in the process of everyday observations is based on the analysis of the features
dimensions. From this point of view elements can be broadly divided into:
Point: 0-dimensional
Linear: 1-dimensional
1.3 The concept of fractals 15
Surface: 2-dimensional
Volume: 3-dimensional
Examples can easily be found of point, linear, surface, and volumetric shapes. However,
relatively new findings from mathematics show that this categorization is incomplete
and some additional features may be defined that have their dimensionality expressed in
fractions. These features are called fractals. In other words, fractals are the geometrical
features whose non-integer dimensions are intermediate between 0 and 3.
The theory of fractals which is one of the most important developments in natural science
was firstly introduced by Mandelbrot [80]. Fractal geometry was derived mainly because
of the inefficiency of classical geometry in describing complex shapes and phenomena.
This revolutionary theory has been applied in many fields ranging from molecular physics
to the large scale structure of universe, and provides new conceptual tools and insights.
In this theory fractals are considered as curves, surfaces, or volumes generated by some
repeated process involving successive subdivisions.
The fractal objects normally possess too irregular structure to be described by tradi-
tional topological or Euclidean approaches. Mandelbrot suggested that complex shapes
or boundaries can be described in useful terms by extending the classical concept of the
dimensionality of the system to add a fractional index to the whole number dimension to
generate a measure of the space-filling nature of a rugged structure. Mandelbrot proposed
to differentiate between the topological dimension of a system and its fractal dimension
in the sense that topology concerns itself with the properties of a system which remain
invariant when their containing space is distorted. Thus, if one were to look at the set of
figure 1.9 they all have a topological dimension of one as any one of them can be drawn
on elastic graph stretched to fit over a traditional straight line [80]. Mandelbrot points
out that in the non-topological sense the lines all represent systems intermediate between
one and two dimensions.
Here we summarize some of the major differences between fractals and traditional Eu-
clidean shapes. First fractals are relatively modern inventions. Second, whereas Euclidean
shapes have one, or at most a few, characteristic sizes or length scales (typical length of
a shape, for example the radius of a sphere, the side of a cube), fractals, like a coastline
possess no characteristic sizes. Fractal shapes are said to be self-similar or scale-invariance
which will be discussed in detail later. Third, Euclidean geometry provides concise accu-
rate descriptions of man-made objects but is inappropriate for natural shapes. Euclidean
geometry with its well-defined and mathematically tractable planes and surfaces is usu-
16 Introduction
Figure 1.9: The classical concept of the dimension of a physical quantity can be extended
by adding fractional quantities related to the ruggedness of a system to the
topological dimension [81].
ally only found as an approximation over a narrow range of dimensions where mankind
has imposed it. For instance the surface of paper is flat, straight, and Euclidean, but
only in the dimension or scale where humans perceive and control. Magnify the paper
surface and it becomes rough. Therefore the use of fractal dimensions is a new tool for
describing such roughness. Finally, whereas Euclidean shapes are usually described by a
simple algebraic formula (e.g. r2 = x2+y2defines a circle of radius r), fractals, in general,
are the result of a construction procedure or algorithm that is often recursive (repeated
over and over) and ideally suited to computers [82]. The differences between fractals and
traditional Euclidean shapes will be illustrated with the Koch curve.
1.3.1 The Koch snowflake curve
The Koch snowflake curve, one of the early mathematical shapes, (first proposed around
1904) as shown in Figure 1.10, illustrates an iterative or recursive procedure for construct-
ing a fractal curve. A simple line segment is divided into thirds and the middle segment is
replaced by two equal segments forming part of an equilateral triangle. At the next stage
in the construction each of these 4 segments is replaced by 4 new segments with length
1.3 The concept of fractals 17
Figure 1.10: Recursive replacement procedure for generating Koch snowflake curve and vari-
ations with different fractal dimensions [82].
1/3 of their parent according to the original pattern. This procedure, repeated over and
over, yields the Koch curve shown at the top right of Figure 1.10.
It demonstrates that the iteration of a very simple rule can produce seemingly complex
shapes with some highly unusual properties. Unlike Euclidean shapes, this curve has
detail on all length scales. Indeed, the closer one looks, the more detail one finds. More
important, the curve possesses an exact self-similarity. Each small portion can reproduce
exactly a larger portion. The curve is also invariant under changes of scale. At each stage
in its construction the length of the curve increases by a factor of 4/3. Thus, the limiting
curve crams an infinite length into a finite area of the plane without intersecting itself.
At successive iterations corresponding to successive magnifications, one finds new detail
and increasing length [80, 82].
1.3.2 Self-similarity and similarity dimension
The property of self-similarity or scaling, as exemplified by the Koch curve is one of the
central concepts of fractal geometry. It is closely connected with the intuitive notion of
dimension as illustrated in figure 1.11. An object considered as one-dimensional possesses
a similar scaling property. It can be divided into N identical parts each of which is scaled
down by the ratio r = 1/N from the whole. Similarly, a two-dimensional object, such as
a square area in the plane, can be divided into N self-similar parts each of which is scaled
18 Introduction
down by a factorr = 1N. A three-dimensional object like a solid cube may be divided
into N little cubes each of which is scaled down by a ratio r = 13N. With self-similarity
the generalization to fractal dimension is straightforward. A D-dimensional self-similar
object can be divided into N smaller copies of it self each of which is scaled down by a
factor v where r = 1DN so;
N(r) =1
rD(1.3)
Where N(r) is the number of self-similar parts, each scaled by a factor of r from the whole
that comprises the object. Conversely, given a self-similar object of N parts scaled by a
ratio r from the whole, its fractal or similarity dimension is given by
D =log(N)
log(1r )(1.4)
The fractal dimension, unlike the more familiar notion of Euclidean dimension, need not be
an integer. Any segment of the Koch curve is composed of 4 sub-segments each of which is
scaled down by a factor of 1/3 from its parent. Its fractal dimension is D = log(4)/log(3)
or about 1.26. This non integer dimension, greater than one but less than two, reflects
the unusual properties of the curve. It somehow fills more of space than a simple line (D
= 1), but less than a Euclidean area of the plane (D = 2). Hence the similarity dimension
may be regarded as an index of complexity [83, 82].
Mandelbrot gives some variations of the Koch construction and one is presented in figure
1.10. At the bottom a segment is replaced by 8 new segments each of the initial one to
yield:
D =log(8)
log(4)= 1.5 (1.5)
As D increases from 1 toward 2 the resulting curves progress from being line-like to
filling much of the plane. Indeed, the limit D 2 gives a space-filling curve. The fractal
dimension D, thus, provides a quantitative measure of ruggedness of the curves. Although
these Koch curves have fractal dimensions between 1 and 2, they all remain a curve with
a topological dimension of one [82].
Because fractal scaling is demonstrated easily to non-mathematicians using self-similar
fractals, the concepts of fractal and self-similarity may be confusingly mixed. Clearly,
not all self-similar objects are fractals; for example a straight line is self-similar but not
fractal, because its fractal and topological dimensions are both equal to 1 [84].
1.3 The concept of fractals 19
Figure 1.11: Interpretation of standard integer dimension figures in terms of exact self-
similarity and extension to non-integer dimensioned fractals [82].
20 Introduction
1.3.3 Statistical self-similarity
Fractal objects can be divided in two groups: linear (or ideal or exact) fractals and non-
linear (or natural) fractals. Linear (or ideal) fractals result from an absolute generating
process and are mathematical objects such as those of figure 1.10 which are constructed
by the infinite iteration of a construction algorithm. In this case the determination of the
fractal dimension is analytical and it can be exactly calculated over a semi-infinite domain.
It is a property of an ideal fractal curve that it appears the same at any magnification.
Therefore, if one photographs a portion of the boundary of an ideal fractal, one would
not know from the photograph what scale of magnification was being used to inspect
the boundary, since increasing resolution would only reveal increased detail similar in
structure to the boundary visible at low resolution [85]. Although mathematically exact
fractals are excellent for demonstrating fractal scaling, their mathematical exactness and
inferred infinite scaling make them unlike most natural fractals. Most fractal-looking
objects in nature are nonlinear and do not display quite this precise form, for instance, a
magnified view of one part of the coastline will not precisely reproduce the full picture, but
it will have the same qualitative appearance if a sufficient number of high magnification
images are taken. A coastline displays the kind of fractal behavior that is called statistical
self-similarity. Natural-appearing fractal curves are demonstrated in figure 1.12 b and c.
Note that these patterns are neither infinitely self-similar nor exact. Instead, they possess
a statistical self-similarity which can be estimated within a finite range of scales. The
property that objects can look statistically similar while at the same time different in
detail at different length scales, is the central feature of fractals in nature. A coastline
for instance is random in the sense that (unlike the Koch curve) a large scale view is
insufficient to predict the exact details of a magnified view [84, 82].
1.3.4 Characterization of serrated grain boundaries by fractal analysis
As soon as the grain boundaries are extracted from the microstructure, fractal analysis
to quantify the degree of grain boundary serration can be carried out by means of several
methods as described below.
1.2.4.1. Mandelbrot-Richardson method
Mandelbrot [80] discusses various approaches for the evaluation of fractal dimensions. The
most widely used method is to estimate the length of the profile with varying resolution
and to calculate the fractal dimension from a diagram called Mandelbrot-Richardson
plot in which the logarithm of the length estimate is plotted versus the logarithm of the
1.3 The concept of fractals 21
Figure 1.12: Exact and statistically self-similar fractal curves and their fractal dimensions.
(a) Koch curve, Df = 1.26, (b) and (c) fractional curves of fractal dimension
1.2 and 1.8, respectively, produced by midpoint displacement and successive
random additions algorithm [86].
resolution as shown in figure 1.13. Briefly, in this case fractal dimension would be the
rate at which the perimeter (or surface area) of an object increases as the measurement
scale reduces. The measurement scale varies from fine resolution on the left to coarse
resolution on the right side of horizontal axes, as shown in figure 1.13. In practice, the
resolution is chosen to range from very fine (depending on the method used) to the order
of the total profile length. The data points are substituted by a straight line of best fit
which can easily be obtained by a linear regression analysis. The slope equals 1 - D where
D is the fractal dimension of the curve [80].
The practical problem is to measure the length of the profile with varying resolution. The
following three methods have been shown to be feasible:
Divider method or yard-stick technique
In this method [80], the irregular curve of the original profile is approximated by polygons
each with constant side length (= resolution) which increases in consecutive steps. In
practice, a pair of dividers can be set to a prescribed length L (figure 1.14). Walking
along the curve with this step size, the length of the original curve is approximated by
the polygon. The number of steps multiplied by the stride length produces a perimeter
measurement.
Considering the self-similar fractal curve in figure 1.14, the distance between the two end
points isLmax. The perimeter can be measured using dividers of length (L), where
22 Introduction
Figure 1.13: Mandelbrot-Richardson diagram for evaluating fractal dimension [80].
Figure 1.14: Fractal boundary spanned by three segments of ruler length L. Using this
size ruler measured perimeter is P = L N , where N is number of ruler
steps. Note how details smaller than L are spanned by ruler and excluded from
perimeter calculation. Using smaller rulers, more detail is included in perimeter
calculation, hence measured perimeter increases [84].
1.3 The concept of fractals 23
L = r Lmax , for r < 1 (1.6)
The measured perimeter (P) is determined by
P (L) = LN (1.7)
where N is the number of ruler steps of length (L) needed to measure the curve. Variations
along the curve that are smaller than L are spanned by the ruler. Therefore, as the ruler
size decreases, more details of the curve are accounted for in the perimeter measurement.
Recalling Equation 1(N(r) = 1rD) for self-similar fractals,and combining with Equations
1.6 and 1.7 yields
P (L) = L (LmaxL
)D (1.8)
or
P (L) 1
LD1(1.9)
P (L) = L1D (1.10)
also N as the number of sides of the polygon would be
N(L) = LD (1.11)
where is a constant [31]
Taking logarithm gives:
log(P ) (1D) log(L) (1.12)
log(N) (D) log(L) (1.13)
If a range of divider sizes is used, then the fractal dimension can be estimated from the
slope of the linear least-square fit in a log (P) versus log (L) or log (N) versus log(L) plots
[31], where in the first case
24 Introduction
D = 1 slope (1.14)
And in the second case
D = slope (1.15)
In principle, a smaller yardstick can take into account details of the (complicated) shape
which are invisible with larger strides. Therefore, the smaller the yard-stick length L, the
larger the perimeter P measured with it [31].
Minkowski method
The second method is based on an algorithm due to the mathematician G. Cantor [81].
Each point of the curve is the center of a circle of radius R, which results in a tape of
width 2R. Measuring the area of this tape and dividing it by 2R gives an estimate of
the profile length. The smaller R (= resolution), the better is the approximation to the
original curve. Plotting the area swept out by the circle versus the radius on log-log
axes, produces a line whose slope gives the fractal dimension. This method is easily
implemented in automatic image analyzers with a dilation unit (available in most of the
higher-priced commercial instruments). Dilation produces tapes of different width the
area of which is readily measured by these instruments [74].
Smoothing method
Another method to construct Mandelbrot-Richardson plot can be employed by applying
smoothing kernels to blur the serrated boundary, so small irregularities are moved and the
perimeter decreases. Plotting the measured perimeter vs. the standard deviation of the
smoothing kernel, on log-log axes, produces a straight line whose slope gives the fractal
dimension [74].
1.2.4.2. Area-perimeter
This method [40, 39, 84] is to compare grain boundary length P (perimeter) and grain
size d (diameter) (see figure 1.15) which is calculated by a circle having the same area A
of the grain. For fractal grain boundaries, the perimeter P is related to the diameter d or
the area A as is:
P dD AD/2
The areas of a series of self-similar grains are measured to calculate the diameters, d,
of equivalent circles. By log-log plotting the actual perimeters, versus d, the fractal
1.3 The concept of fractals 25
Figure 1.15: The concept of the aria-perimeter analysis shown schematically. (a) A having
the area, A, and serrated perimeter, P. (b) Circle has the same area. A, and
diameter, d.
dimension, D, is defined as the slope of a least squares fitted line. Where 1 D 2
because the measurement is in two-dimensional Euclidean space [87, 80]. This schematic
explanation is illustrated in figure 1.15. Obviously it is also possible to use grain area
in order to obtain the fractal dimension. The areaperimeter method obtains the fractal
dimension as a collective property for a set of objects with various sizes. However other
methods provide the fractal dimension that expresses the complexity of an individual
grain boundary as the individual fractal dimension [39, 80, 87]. It has been reported
that the evaluation of the fractal dimension of the grain boundaries by means of the
perimeter-area relation requires the verification of the self-similarity of the structure first.
For self-similar random fractals this requires the application of a quantitative method
based on the defining equation (P (S) = S1D), for instance the yardstick method, to
examine the fractal dimension at different magnifications [46, 37].
1.2.4.3. Box counting
This technique is one of the most popular methodologies for fractal analysis of grain
boundary shapes [40, 42, 57, 58, 60, 66, 92, 93]. Box counting method consists in the
superposition of a series of boxes with specific edge on top of the feature whose fractal
dimension is to be determined. Then count the number of cells needed to cover the
shape to be characterized. The size of the boxes, in pixels, is usually varied following
an exponent 2 progression, i.e. 1 x 1, 2 x 2, 4 x 4, etc. In this method, two values
26 Introduction
Figure 1.16: Schematic illustration of box-counting method to obtain the fractal dimension
of a grain boundary D [39].
are recorded: the number of square boxes containing at least one pixel of the projection
contour, N(r), and the size of the squares, r. The number N of boxes of size r needed to
cover a fractal set follows a power-law:
N(r) = N0 rD (1.16)
where N0 is a constant and D Dspace (Dspace is the dimension of the space, usually
Dspace = 1, 2, 3). The regression slope D of the straight line formed by plotting log(N(r))
against log(r) indicates the degree of complexity, or fractal dimension, between 1 and 2
(1 < D < 2) (see equation 1.17). D is known as box-counting dimension [80, 83]. Figure
1.16 shows schematically the box-counting procedure to obtain the fractal dimension of a
grain boundary.
Log(N(r)) = DLog(r) + Log(N0) (1.17)
The ledges and steps on serrated grain boundaries have both the lower and the upper
bounds of characteristic size in scale. The grain boundary length or the grain boundary
diameter may be the upper bound, and the atomic radius or the inter-atomic spacing may
be the lower bound. The degree of serration of interest lies between these two bounds.
Since grain boundaries do not have fractal nature beyond these two bounds, the maximum
size of grids are normally of the order of the grain boundary length [48]. If the measured
object is an individual grain boundary, the obtained fractal dimension is the individual
fractal dimension. However, the box-counting method can also give collective fractal
1.3 The concept of fractals 27
dimension when the measured object is not an individual or partial grain boundary but
an entire network of grain boundaries [82, 41, 88].
The structural complexity of an object can be characterized using the difference between
fractal dimension and topological dimension (D0 = D d) which is called the fractal
dimensional increment [47]. A growth in value of (D0) would correspond to an increase
in complexity. Since fractal dimension of grain boundaries is measured in a plane, the
topological dimension for a curve in a plane is one. (D0 = D 1) can be used to rep-
resent the complexity of grain boundaries, that is to say, the degree of serration of grain
boundaries increase with the increase in D [49, 40].
In the next chapter of this study we will focus on details of practical image processing to
extract grain boundaries in the microstructure of Aluminum alloys. A MATLAB program
will be introduced to automatically detect the grain boundaries of interest with reasonable
preferences for using box counting analysis. The third chapter will be mainly dealing with
box counting calculations of artificially generated Koch curves using a written MATLAB
program to verify the accuracy of the implemented method. Then the same procedure
was carried out to detect high angle grain boundaries in the partially recrystallized mi-
crostructure of hot-rolled Aluminum alloy, and calculate the fractal dimensions. Having
UPE data of the materials, it has been attempted to investigate the relation between frac-
ture toughness and fractal dimension of the grain boundaries. The results are reported
in the forth chapter.
28 Introduction
Chapter 2
Image processing
2.1 Introduction
The use of computer algorithms to enhance the digital images of the microstructures in
order to prepare them for fractal analysis forms the main aim of this chapter. Thus
MATLAB as a powerful programming language for technical computing is used. The
basic MATLAB distribution can be expanded by adding a range of toolboxes for specific
applications. The particular toolbox of interest to us is the image processing toolbox.
This software provides a comprehensive set of reference-standard algorithms and graph-
ical tools for image processing, analysis, visualization, and algorithm development. In
the present work a MATLAB program was developed to process two types of microstruc-
tures for Aluminum alloy, fully recrystallized, and partially recrystallized to extract the
grain boundary of interest. The MATLAB function and the resulting microstructures are
discussed in detail below.
2.2 MATLAB program for boundary extraction
The MATLAB function developed in this M.Sc. project is able to automatically pro-
cess both microstructures of fully recrystallized and partially recrystallized materials in
order to detect the desired grain boundary, while removing all other features including
sub-grains and precipitations. The output is a one pixel wide boundary which will then
29
30 Image processing
Figure 2.1: Microstructure of partially recrystallized Al7050.
be implemented in box counting calculations to get the fractal dimension of the bound-
ary. The operation of the program is described in the following sections for a partially
recrystallized (section 1.2.1) and fully recrystallized (section 1.2.2) microstructures. The
program code is given in the Apendixes.
2.2.1 Boundary extraction in partially recrystallized microstructure
The microstructure of partially recrystallized Aluminium alloy sample shown in figure 2.1,
is a tif type image of size 1461 pixels by 1222 pixels at a resolution of 96,000 pixels/inch.
It was taken by the Neophot 30 optical microscope using two lenses of 12.5X and 8X.
This raw image is the input for the MATLAB program.
The program basically works in three main phases;
reading the raw image
processing the raw image
returning the extracted grain boundary
2.2 MATLAB program for boundary extraction 31
Reading the image
In MATLAB images are considered as matrices whose elements are the pixel values of
the image. If the input is a true-color image or any other types rather than gray-scale, it
has to be converted to gray-scale before running the code. I = imread(filename.fmt)
, reads the gray-scale image from the graphics file into a matrix I. If the file contains a
gray-scale image, I is an M-by-N array. M refers to number of rows and N is number of
columns respectively [89].
Thresholding the image
The next step is the image binarization after choosing the appropriate threshold value.
MATLAB has the im2bw function, which thresholds an image of any data type, using
the general syntax I = im2bw(image, T level). where T level is a value between 0 and
1, indicating the fraction of gray values to be converted white. The im2bw function
automatically scales the T level to a gray value, and then performs a thresholding in the
way that it will return 1 (white) for all those pixels for which the gray values are greater
than T level, and 0 (black) for all those pixels for which the gray values are less than
or equal to T level. The result would be a matrix of 0s and 1s, which shows up in a
new window. In image processing, the pixels in a binary image having logical value 1 are
called the image foreground pixels, whilst those pixels having logical value 0 are called the
image background pixels. The program keeps performing a loop thresholding in which
the optimized T level should be defined by the user. As soon as the grain boundary of
interest is well-defined as a continoius boundary, next step appears [90]. The optimized
threshold value for figure 2.1 was obtained to be 0.80. The resulting binary image is
shown in figure 2.2.
Removing particles
Impurities and particles within a grain can strongly affect the quantitative analysis on
grain boundaries and thus should be removed. To this aim the region filling operation
is used. The imfill function, I = imfill(I, holes), identifies the pixels constituting
holes within connected components in the binary image and fills them. A hole is a set
of connected background pixels that cannot be reached by filling in the background from
the edge of the image [90]. The resulting output image is shown in figure 2.3.
32 Image processing
Figure 2.2: Microstructure after binarization using T = 0.80.
Figure 2.3: Microstructure after hole-filling.
2.2 MATLAB program for boundary extraction 33
(a) 4-connection. (b) 8-connection.
Figure 2.4: Concept of connectedness.
Extracting the connected objects
An object in a binary image consists of any group of connected pixels. Two definitions
of connection between pixels are commonly used. If a given foreground pixel has at
least one neighboring foreground pixel to the north, south, east or west of itself to be
considered as part of the same object, then the 4-connection concept is applied. If,
however, a neighboring foreground pixel to the north-east, north-west, south-east or south-
west is sufficient for it to be considered as part of the same object, then the 8-connection
defenition is used. The basic concept is shown in figure 2.4.
For any foreground pixel, the set of all foreground pixels connected to it is called the
connected component of that pixel. A group of pixels which are all connected to each
other in this way is differentiated from others by giving it a unique label. Extracting
connected components can be achieved with the function bwlabel. The function I =
bwlabel(I), analyses an input binary image so as to identify all the connected objects in
the image. It returns a so called labeled image in which all the pixels belonging to the
first connected component are assigned a value 1, all the pixels belonging to the second
connected component are assigned a value 2 and so on. In this process the default value
for connection is 8 [90, 91].
Thickening the contour of the object
To apply the labeling method, the user needs to make sure that the object of interest(in
this case the largest grain in the image) is well isolated from the rest of the microstrusture,
while preserving the details, otherwise the features would not be labeled correctly. For
this type of microstructure to be analized, the optimized approach is a one step of line
34 Image processing
Figure 2.5: Disk-shaped structuring element.
thickening, followed by a morphological opening operation.
I = bwmorph(I, thin, n) removes pixels from the exterior of the foreground object,
resulting in a thicker boundary. It applies the operation n times. In this case it is set to
1, which means only one step thickening is performed.
I = imopen(I, se) performs morphological opening on the binary image I with the struc-
turing element se. The general effect of opening is to remove small, isolated objects from
the foreground of the image, placing them in the background. So it tends to smooth the
contour of the binary object. The structuring element is the key factor which determines
exactly which image pixels surrounding the given foreground/background pixel must be
considered in order to make the decision to change its value or not. Using the MATLAB
function se = strel(shape, parameters) creates a morphological structuring element of
the type specified by shape. Depending on shape, strel can take additional parameters.
se = strel(disk, R,N) creates a flat, disk-shaped structuring element (see figure 2.5),
where R specifies the radius [89]. In the present case R is defined as 2, which determines a
small structuring element. After this operation, the small interconnections such as broken
grain boundaries are removed and the image is ready for correct labeling. The resulting
image after labeling is demonstrated in figure 2.6.
Detecting the desired component
Imtool(I) opens a new Image Tool displaying the image. To access the Pixel Region
Tool, user should select Tools > Pixel region in the Image Tool menu. Then the Pixel
Region Tool opens a separate figure window containing an extreme close-up view of a small
region of pixels in the target image, then the user can drag the pointer through the object
of interest and read the pixel value which is constant all over the connected component.
This is the input matrix for the Detect function. Inew = Detect(I, pixelvalue) is a
MATLAB function which gets the labeled matrix and creates a matrix the same size as
I consisting of all zeros, then replaces an array including the elements with the indicated
2.2 MATLAB program for boundary extraction 35
Figure 2.6: Microstructure after contour thickening followed by labeling.
pixel value in the zeros matrix while all other elements are set to zero. Having defined
the pixel value of the largest grain in the current microstructure as 612, Detect function
returns an output as shown in figure 2.7.
Closing
Morphological closing tends to remove small holes in the foreground, changing small
regions of background into foreground. The main reason to apply closing in this stage
is to eliminate small unavoidable artificial traces on the grain boundary caused by the
previous thresholding operation. If second phase particles or subgrain-boundaries are
located very close to the main grain boundary to be extracted (see figure 2.1), they
appear to be connected to the grain boundary after thresholding operation (see figure 2.2),
consequently the detected grain as shown in figure 2.7 has some tiny artificial intrusions
on the grain boundary. Here a disk of radius 7 was chosen as the structuring element
which returns the image illustrated in figure 2.8. The radius of 7 was found to be the
optimized value for the group of microstructures being processed in this study, in other
words it might not be valid for other types of grain strustures or other materials.
36 Image processing
Figure 2.7: Detected grain.
Figure 2.8: Detected grain after closing.
2.2 MATLAB program for boundary extraction 37
Figure 2.9: Extracted grain boundary.
Edge detection
An edge is defined as a significant, local change in image intensity. There are a large
number of edge detection algorithms available. Here we focus on a particular one de-
veloped by John F. Canny ([92]) to produce a one pixel wide edge, while preserving the
structural properties of the desired features. The Cannys Edge Detector is optimal with
regards to localization, in other words the detected edges are as close as possible to the
real edges. I = edge(I, canny) finds edges in the figure 2.8 and returns the extracted
boundary as shown in figure 2.9. Please note that as a result of the procedure followed,
the boundary is always continious. This is a suitable input image for box counting and
fractal dimension calculations.
Final particle removing step
If there is any small particle still remained inadvertently after the edge detection opera-
tion, bwareaopen function helps to elliminate it. IB = bwareaopen(I, P ), removes from
a binary image all connected components (objects) that have fewer than P pixels, pro-
ducing another binary image, IB. The default connectivity is 8 for two dimensions [89].
38 Image processing
(a) Original microstructure. (b) Extracted grain boundary.
Figure 2.10: Initial image vs final image.
The basic steps are:
Determining the connected components
Computing the area of each component
Removing small objects
This operation has no effect on the current case, however for fully recrystallized mi-
crostructure the remnants of small objects are removed by this final operation. In figure
2.10 the original microstructure and the extracted boundary are compared, showing that
the grain boundary features are well preserved. Please note that the procedure used aims
to find the perfect topology of one grain boundary, rather than a less accurate represen-
tation of all grain boundaries. As pointed out earlierly in this chapter the input value
for thresholding and pixel value of labled feature are chosen based on the grain to be ex-
tracted. This increases the accurcy of preserving real profile of the boundary of interest.
Therefore it is not possible to detect different recrystallized grains in one microstruc-
ture (see 2.10) at the same time, since every single recrystallized grain is labled as one
connected component having different pixel value from the other objects. So the whole
procedure should be redone if more than one grain is aimed to be extracted in the same
image.
2.2 MATLAB program for boundary extraction 39
Figure 2.11: Microstructure of fully recrystallized Al7050.
Table 2.1: Input values for the MATLAB program
Microstructure Threshold value Pixel region
Partially recrystallized 0.80 612
Fully recrystallized 0.62 127
2.2.2 Boundary extraction in fully recrystallized microstructure
Figure 2.11 shows a gray-scale tif image of a fully recrystallized Aluminum alloy as the
second case study for boundary extraction using the presented MATLAB program. The
image size is 1461 pixels by 1222 pixels and the resolution is 96,000 pixels/inch.
Suppose the final goal is to detect the grain boundary on the bottom-right side of the
image. Having read the input, the function operates the same procedure as for the
first case of partially recrystallized microstructure. The input values should be adjusted
depending on the image and the desired object to be detected (see table 2.1). The
consequent processed images are illustrated in the following section.
40 Image processing
Figure 2.12: Microstructure after binarization.
Since the processed image (figure 2.17) still contains a few traces of particles, obviously
it is not a suitable input for the fractal analysis. Thus one step bwareaopen operation
enhances the image by removing small particles containing fewer than 100 pixels. The
output is shown in figure 2.18. The original fully recrystallized microstructure and the
extracted boundary are compared In figure 2.19, showing that the desired grain boundary
feature is detected without missing details.
2.2 MATLAB program for boundary extraction 41
Figure 2.13: Microstructure after hole-filling.
Figure 2.14: Microstructure after contour thickening followed by labeling.
42 Image processing
Figure 2.15: Detected grain.
Figure 2.16: Detected grain after closing.
2.2 MATLAB program for boundary extraction 43
Figure 2.17: Extracted grain boundary.
Figure 2.18: Extracted grain boundary after opening.
44 Image processing
(a) Original microstructure. (b) Extracted grain boundary.
Figure 2.19: Initial image vs final image.
2.3 Conclusions
The presented MATLAB program has been shown to be capable of extracting the grain
boundaries of interest in both fully and partially recrystallized microstructures of Alu-
minum alloys, while preserving the details needed for the fractal dimension calculations.
Chapter 3
Box counting method for fractal
dimension calculation
3.1 Introduction
Fractal concept is a new approach for quantifying the irregularity of complex shapes
that may not be treated by Euclidean geometry. In general, a fractal is defined as a set
having non-integer dimension. Consequently the fractal dimension (FD) is introduced as
a factor highly correlated with the human perception of objects roughness. FD fills the
gap between one- and two-dimensional objects. The more complex the contour of the
curve, the more it fills the plane and the more its fractal dimension will be closer to 2
[93]. The FD can be calculated in different ways. The present study concentrates on the
box-counting method. To implement this method a MATLAB program was developed
based on the theoretical considerations. To validate the code, test images of Koch curves
having known fractal dimension were generated and the estimated fractal dimensions are
compared to the known fractal dimension of the input figure.
3.2 Box-counting dimension
The box-counting dimension is probably the most frequently used method in characteri-
zation of irregular sets in science. The reason is that it is easy, automatically computable,
and applicable for patterns with or without self-similarity [94, 95]. The definition goes
45
46 Box counting method for fractal dimension calculation
Figure 3.1: Surrounding the Koch curve with boxes [96].
back at least to the 1930s and it has been variously termed Kolmogorov entropy, entropy
dimension, capacity dimension, and metric dimension [95]. In this method, each image
is covered by a sequence of grids of increasing sizes and for each of the grids, two values
are recorded: the number of square boxes containing at least one pixel of the projection
contour, N(r), and the size of the squares, r. The number N of boxes of size r needed to
cover a fractal set follows a power-law:
N(r) = N0 rD (3.1)
where N0 is a constant and D Dspace (Dspace is the dimension of the space, usually
Dspace = 1, 2, 3). The regression slope D of the straight line formed by plotting log(N(r))
against log(r) indicates the degree of complexity, or fractal dimension, between 1 and 2
(1 < D < 2) (see equation 3.2). D is known as box-counting dimension [80, 83].
Log(N(r)) = DLog(r) + Log(N0) (3.2)
The concept of box covering procedure for a Koch curve is illustrated in figure 3.1.
3.3 MATLAB code for box-counting calculations 47
3.3 MATLAB code for box-counting calculations
A quantitative analysis of perimeter roughness is carried out to illustrate the degree of
complexity of a binary image. In the input image all foreground pixels having a value of
1 are considered as the feature the dimension of which is to be calculated. BoxCount(I)
counts the number of boxes (boxnum) of size res needed to cover the nonzero elements
of a 2D array I. For practical purposes it is often convenient to consider a sequence of
grids where the mesh siz