You are on page 1of 17

Journal of Volcanology and Geothermal Research 154 (2006) 17 33

www.elsevier.com/locate/jvolgeores

The use of watershed segmentation and GIS software for


textural analysis of thin sections
Joseph Barraud
Department of Earth Sciences, University of Cambridge, Downing Street, Cambridge, CB2 3EQ, United Kingdom
Received 1 July 2004; accepted 30 September 2005
Available online 28 February 2006

Abstract
Textural analysis of thin sections of rocks can be performed with a Geographic Information System (GIS) program to improve
management and visualisation of data. Automatic detection of grain edges is performed by watershed segmentation on digital
pictures of the thin section. After vectorization of the segmented picture, the resulting map of grain boundaries is edited and
corrected manually. GIS software allows the user to associate each grain with attributes such as phase name, position, size, aspect
ratio, orientation and convexity. The grains can then be classified according to one or several attributes. The spatial distribution of
the different classes of grains can be visualised with colour-coded maps or quantified by cluster analysis. A weakly foliated
quartzite and an igneous cumulate are taken as examples to show how invisible patterns are made evident with these kinds of maps.
The interpretation of these spatial distributions remains problematic, but future development of 2D or 3D numerical models of
textural evolution makes this technique promising.
2006 Elsevier B.V. All rights reserved.
Keywords: watershed segmentation; GIS software; textural analysis; crystal size distribution; pattern; foliation

1. Introduction
The scientific description of rocks, or petrography,
involves observations and measurements at various
scales and various levels of details. A general
description, including the mode and the texture, is
usually enough for the geologist to understand in broad
terms the nature and origin of a rock. However, the
complexity of the processes involved in the crystallization and textural evolution of rocks requires more and
more quantification in order to test the available models.
Textural terms are difficult to quantify, as they are often
quite subjective, particularly for igneous rocks. Quan Tel.: +44 1223 333433; fax: +44 1223 333450.
E-mail address: jbar02@esc.cam.ac.uk.
0377-0273/$ - see front matter 2006 Elsevier B.V. All rights reserved.
doi:10.1016/j.jvolgeores.2005.09.017

tification therefore requires objective accurate measurements and appropriate statistical analysis. In this
contribution a complete method of optical texture
determination, from the thin section to the final
diagrams, is presented.
Textural analysis generally consists in measuring the
size, the shape, the orientation and the position of the
grains in a rock. Dihedral angle measurements can also
provide valuable information (Holness et al., 2005), as
can c-axis orientations (e.g., Heilbronner and Pauli,
1993). The simplest and cheapest way to perform
textural analysis is to cut thin sections in a rock sample
and to study the outlines of the grains in this plane under
an optical microscope. X-ray tomography is a promising
and impressive technique for direct 3D analysis
(Philpotts et al., 1999), but the boundary between two

18

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

touching grains of the same mineral cannot be resolved.


X-ray tomography is then ideal for imaging clasts in
lavas or porphyroblasts in metamorphic rocks (Carlson
et al., 1999). More generally, when the imaging
technique is based on a chemical property of the
minerals (like atomic number for backscattered electron
imaging, BSE) and when a major part of the rock is
composed of the same mineral (like plagioclase in a
gabbro) then only a continuous touching framework
appears on the images. Thus, the size, shape and
orientation of the constituting crystals cannot be
measured.
Consequently, grain-edge outlining is still the
mandatory first step of most textural analysis methods.
This is generally done either by hand directly on thinsection photographs or scans (Higgins, 2000; Berger
and Roselle, 2001; Boorman et al., 2004), or on screen
with a drawing package (Jerram et al., 2003). Many
authors have proposed automatic methods of grain
boundary detection (Launeau et al., 1994; Goodchild
and Fueten, 1998; Bartozzi et al., 2000; Heilbronner,
2000; McEwan et al., 2000; Thompson et al., 2001; van
den Berg et al., 2002; Tarquini and Armienti, 2002;
Perring et al., 2004). None of these methods has been
proved to be completely satisfactory, especially for
complex polymineralic plutonic rocks. Indeed, most of
these methods are based on the colour contrast of a
crystal with its neighbours. The grain outline is then
extracted by grey-scale thresholding or by gradient
filtering. This may work well with BSE images of
volcanic rocks because crystals are typically embedded
in a vitreous matrix without touching each other.
However, for holocrystalline rocks, a set of pictures
has to be taken at many different orientations of crossed
polars, at the expense of simplicity (Goodchild and
Fueten, 1998; Heilbronner, 2000; Perring et al., 2004).
Another possibility is to use orientation contrast (OC)
images obtained by scanning electron microscopy
(SEM, Bartozzi et al., 2000). This method has the
advantage of exploiting directly the changes in crystal
lattice orientation, allowing grains and sub-grains to be
identified objectively. However, it is not obvious that
this method can be easily used for polymineralic rocks.
The method described here makes use of simple optical
microscopy and of a set of pictures taken at three
crossed-polars orientations only. A powerful segmentation algorithm normally used for medical imaging has
been employed and the results of this so-called
watershed segmentation are particularly good with
holocrystalline rocks.
This method of textural analysis also makes extensive
use of Geographic Information System (GIS) software.

GIS software has revolutionised geography and geological mapping because it offers a unique way to visualise,
manipulate and analyse spatial data. Petrographic data
also have spatial components and the spatial distribution
of minerals and of their attributes should provide
significant information about the processes that occurred
during a rock's history. However, most techniques of
textural quantification lose track of the spatial information by averaging a parameter (e.g., size, orientation) or
by calculating a unique quantity that describes the
spatial distribution pattern (SDP, Jerram et al., 1996,
2003). While these quantities are useful to compare
different samples, a better way to visualise a spatial
distribution is to display directly the quantity on a map.
A GIS program allows the user to visually identify
different populations of crystals by overlaying several
parameters. Quantification can be subsequently performed on each individual population. This article
provides two examples of applications for metamorphic
and igneous rocks.
2. Methodology
The method comprises seven stages, from acquisition
of the images to statistical analysis and display of the
results (Fig. 1).
2.1. Image acquisition
In order to achieve the best results, it is important to
start with a good-quality digital image of the thin
section. The resolution has to be high enough to allow
the smallest grains to be imaged correctly. The image is
typically taken with a digital camera attached to a
microscope. Film scanners have been used by several
authors and provide images that may be suitable for
CSD studies (Boorman et al., 2004). However, their
resolution may not be high enough for shape
description. The images shown in this article have
been taken with a Nikon Coolpix 5000 that delivers
2560 1920 pixels images. The images are taken with
the 2 or 4 lens of the microscope, depending on the
average grain size. A mosaic of 3 3 images covers
about half a standard thin section when the 2 lens is
used. The final image contains around 45 million
pixels and the resolution is about 400 pixels per
millimetre. This high-resolution image will be used
later in the workflow for the manual correction of the
map of grain boundaries. However, the file has a very
large size, resulting in a dramatic increase in
calculation time in the next step of segmentation. The
image is therefore downsampled with Photoshop to a

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

Fig. 1. Workflow of the method.

smaller size (about 30 million pixels). This value is a


compromise that has been found to preserve the quality
of the segmentation and to offer a reasonable execution
time (see below).
2.2. Noise reduction and watershed segmentation
One of the novelties of the method is that automatic
grain edge detection is performed by watershed

19

segmentation. A state-of-the-art image-processing code


called ITK (for Image Toolkit, http://www.itk.org) is
used for this purpose. ITK offers almost all the filters
and segmentation algorithms currently available for
medical imaging. ITK is an open-source software
package implemented in C+, and is cross-platform
(Unix, Windows and MacOS X). The toolkit is a
collection of libraries and the user writes applications
combining the several filters that will be applied to the
input image in a sequence. The method presented makes
use of an application that is furnished with ITK and
simply called WatershedSegmentation1.
The strategy of watershed segmentation is to treat an
image as a height function, i.e., the grey level of a pixel
corresponds to the altitude of a point on a surface (Fig.
2a). The image of a thin section is treated like a Digital
Elevation Model where grains with uniform colour
define regions at different altitudes. A gradient filter is
then applied so that grain edges can be seen as ridges
and grains as valleys. If this virtual topography is now
flooded, the water will collect in the basins. The size
of these basins will grow with increasing level of water
when they merge with adjacent basins. The remaining
ridges of the flooded landscape are the grain boundaries.
The implementation of the watershed segmentation
algorithm in ITK involves an initial smoothing of the
raw image by the so-called anisotropic diffusion filter
(Perona and Malik, 1990). This filter removes a large
amount of noise while preserving the sharpness of grain
edges. Anisotropic diffusion includes a variable conductance term that, in turn, depends on the differential
structure of the image. Thus, the smoothing effect will
be less pronounced at edges, as measured by high
gradient magnitude.
All the filters are applied on the three channels of
RGB colour pictures simultaneously by converting
scalar-valued RGB images into a vector-based representation in the 3D RGB space. After anisotropic
diffusion, the height function is calculated with a
gradient operator on the pixel magnitude. Finally, the
watershed segmentation is performed. The output is a
colour image in which each grain has a different colour
(Fig. 2).
Four user-defined parameters control the entire
process: conductance and iteration for the smoothing
filter, threshold and flood level for the segmentation
filter. A suitable combination of parameters has to be
found by trial and error to avoid over- or undersegmentation (Fig. 2cd). The conductance controls the
sensitivity of the diffusion to the presence of highcontrast edges. The number of iteration controls the time
during which diffusion occurs, accentuating the blurring

20

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

Fig. 2. Watershed segmentation of a thin section. (a) Principles of the method: the curve on the left shows an imaginary intensity profile through a
grain. The grain boundaries are defined by the steep gradients on both sides of the intensity high. The gradient image defines a topography that can be
flooded by water. The basins are filled up to a level called the watershed depth, which controls the final amount of segmentation. (b) Original image of
a troctolite (crossed polars and lambda plate, bottom length 6.5 mm). (c) Oversegmented result (level = 0.16). (d) Undersegmented result (level = 0.4).
(e) Correct segmentation (level = 0.3).

effect. Typical values for conductance and iteration are


in the ranges 28 and 26, respectively.
Threshold and level are set as a fraction (value
between 0 and 1) of the maximum depth of the input
image. The threshold corresponds to the background
noise, which is removed (flattened) before segmentation. As most of the noise was removed already by
diffusion, this parameter is fixed for this study at a low
value of 0.01. The level value allows the user to
minimize over-segmentation by establishing a minimum
watershed depth. Adjacent regions are merged if their
combined depth falls below the minimum. A high value
therefore results in a lower segmentation. The segmented images in this article were produced with a level in
the range 0.160.30.
During the process of finding the correct parameters,
the treated images are visually compared with the
original. Nevertheless, due to complexity of natural
textures, it is necessary to make manual corrections at
the next step. A slightly oversegmented result is

therefore preferable because merging two objects to


remove a false boundary is easier than drawing a
missing boundary manually.
The smoothing filter is by far the slowest step of the
process. It takes 18 min to filter a 5000-by-3698 image
with 2 iterations on a PC equipped with a Pentium 4 2.6
GHz processor. It takes 40 min for the same image with
6 iterations.
2.3. Vectorization and editing
The segmented image is a raster (pixel-based) image
that has to be converted to a vector format before
editing. The built-in raster-to-vector conversion utility
of ArcGIS 8.2 was used in this study. Each colour patch
of the segmented image is converted into a polygon. The
vector format has many advantages: (1) grain boundaries consist of nodes and lines, allowing easy editing,
(2) overlaps and gaps do not exist because two
neighbouring grains share a single boundary, (3) there

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

is no loss of quality at high magnification, (4) each grain


is identified as a single object with various attributes like
name, area, perimeter, length, etc.
Curved boundaries are approximated by straight
lines, so the distance between two nodes on the outline
should be as small as possible. The accuracy of the
vectorization is controlled by a parameter called cluster
tolerance in ArcGIS, which for polygons corresponds to
the minimum distance between two nodes. Theoretically, the best result would be achieved if this distance were
equal to the size of the original pixels. However, this
would increase excessively both file size and display
time. The correct value depends on the complexity of
the texture, the grain size, and the capacity of the
computer. For this study, acceptable accuracy was
achieved with a minimum distance of 10 m (3 to 5
pixels).
The polygons can then be edited in order to correct
the unavoidable artefacts of automatic segmentation.
There are two types of artefacts: missing boundaries and
false boundaries (oversegmentation). Missing boundaries occur when the colour gradient between two grains
is not high enough to be detected by the previous
segmenting process. Oversegmentation is the reverse:
the presence of fractures, cleavages and plagioclase
twinning causes irrelevant subgrains to be created.
Olivine grains are typically impossible to automatically
contour correctly because of multiple fractures and
alteration products. They tend to form a mosaic of 5 to
20 pieces. However, it is relatively easy to reform the
correct outline by merging the subgrains.
The editing step is the longest of the method. An
image of the thin section underlies the map of polygons,
so that missing or false boundaries can be identified and
corrected. The microscope is necessary for complex
situations, e.g., very small grains or altered areas.
Ultimately, a precision of 515 m on the position of a
boundary can be achieved. The smallest grain diameter
that can be measured is about 10 m. However, the
precision depends on the starting picture and can be
increased if a higher magnification is used during the
first stage.
Finally, this method of grain boundary detection
may be called semi-automatic in the sense that
segmentation artefacts are manually corrected. This
sort of interactive method was tested by Heilbronner
(2000) and proved to be both accurate and fast
compared with the fully manual procedure. I did not
try to make a similar comparison for the present method
because it seems evident in both cases that it is still a
time-consuming and painstaking task. Nevertheless, for
simple textures (one or two phases, few fractures), this

21

technique is undeniably fast and accurate (see examples


below).
2.4. Analysis
2.4.1. Measure of length
There are many ways to measure the length and the
width of an object (Fig. 3a). Higgins (2000) reviewed
various methods and favoured the longest distance
between two points on the contour. However, this
objectively defined length is generally not the one the
petrographer would choose subjectively as it is not
always in the perceived main orientation of the object.
As the value of the aspect ratio is commonly associated
with the orientation of the shape, the length used in this
study is equal to the projection of the object in the
direction parallel to its major orientation or direction of
elongation (Fig. 3a). This is sometimes called the box
length. The width will be the projection in a perpendicular direction. The major orientation is determined by
calculating the moments of inertia of the shape around
the centroid (e.g., Mulchrone and Choudhury, 2004).
The nodes around the outline of the object are used for
the calculation. The principal directions are given by the
eigenvectors of the matrix of the moments. One
advantage of this method is to measure both length
and orientation at the same time.
Another commonly-used measure of length is the
long axis of the best ellipse fitting the object. However,
different methods exist to fit an ellipse to a shape (e.g.,
Mulchrone and Choudhury, 2004; Launeau, 2004).
Moments of inertia are very popular but again, different
results will be obtained depending on the way the
moments are calculated (boundary or region-based
methods). Moreover, the best-fitting ellipse can be
calculated with a minimisation algorithm, or with the
eigenvalues of the tensor. Ultimately, the size of the
ellipse can be adjusted, so as to give it the same area as
that of the object.
In order to illustrate this variety of methods, six
different measures of length were made on a set of
convex quadrangles (Fig. 3b). Three programs were
used: the MATLAB toolbox PolyLX of Lexa (2001), the
popular image-processing software ImageJ (Rasband,
2005), and the recent program SPO2003 by Launeau
(2004). PolyLX allows the user to compute the moments
of inertia of arcGIS polygons (boundary-based method)
and to determine the box length in the calculated
direction as described previously. For this purpose, the
routine aorten was modified and now gives both box
length and length of the major axis of the fitted ellipse
(aorten Major = 22e1, where e1 is the biggest

22

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

Fig. 3. Length and shape descriptors. (a) Definitions used in this study. (b) Quadrangles with a range of orientation and shape. A fitting-ellipse
obtained by the method of the moments (aorten routine of the PolyLX toolbox) is shown, together with the major semi-axis drawn at the center of
each object. (c) Compilation of different methods of length measurement applied on the previous quadrangles. The straight line has a slope of 1. (d)
The range of convexity values obtained for various regular and irregular shapes.

eigenvalue). The longest length was also computed with


PolyLX.
ImageJ gives the major axis of the best-fitting ellipse
calculated with a pixel-based method. The difference
between this and aorten is also that the best-fitting
ellipse is computed by equalising the second moments
of the shape and the ellipse. Moreover, the area of this
ellipse is normalised to the area of the object. SPO2003
provides an additional measurement of the major axis of
the best-fitting ellipse (pixel-based method, ellipse axes
given by eigenvalues, not area-normalised) and of the
box length.
The results are summarised on a plot showing the
length calculated with these methods vs. the box length
calculated with PolyLX (Fig. 3c). It can be seen that the
longest length is sometimes exactly equal to the box
length. This occurs when the shape is axisymmetric. The
SPO2003 box length is very close to the PolyLX box
length, but systematically slightly smaller. The difference may be due to the difference in image format,
vector-based for PolyLX and pixel-based for SPO2003.

The major axes of ellipses given by ImageJ and


SPO2003 are very similar, the small difference being
due to the normalisation. These two major axes are
almost always smaller than the box length, while aorten
Major is consistently longer than the box length.
However, it can be shown that aorten Major is
proportional to the other two major axes, as they are all
based on moments of inertia.
Finally, the choice of a type of measurement is
difficult and may depend on the application. The box
length was chosen in this study because it is easy to
implement and similar to the actual dimensions of subrectangular crystals like plagioclase. In addition, the
comparison with other methods shows that it gives
intermediate values, far from extremes.
2.4.2. Shape descriptors
Numerous shape descriptors are available. Shape
description has many applications in different domains
and this has resulted in a rather confused literature. A
descriptor may have different definitions depending on

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

the author. For example, compactness is often defined as


the ratio of squared perimeter to the area of an object. In
this case, it has a minimum at 4 for a circle and
approaches infinity for complex irregular objects.
However, Iivarinen et al. (1997) define compactness
as the ratio of the perimeter of a circle with equal area
to that of the original object to the original perimeter. In
this case, the parameter ranges between 0 and 1.
There are also descriptors with different names and
almost the same definition (e.g., ellipticity, elongation
and Grain Shape Index all refer to the same ratio
between area and length). A limited set of independent
shape descriptors is preferable because they allow an
efficient classification when used in combinations
(Iivarinen et al., 1997). In this study only two shape
descriptors are used: aspect ratio and convexity.
The most commonly used shape descriptor in
geology is the so-called aspect ratio (AR) between
length and width of an object. The aspect ratio has, for
example, various applications in structural geology as it
can be related to finite strain under certain assumptions
(Mulchrone, 2003). Moreover, knowing the average
axial ratio allows a better conversion of 2D measurements into true 3D Crystal Size Distributions (CSD,
Higgins, 2000). The average axial ratio can also be
compared with the bulk alignment factor (defined
below) to estimate the extent of recrystallisation of
igneous cumulates under compaction (Meurer and
Boudreau, 1998; Boorman et al., 2004).
The second shape descriptor used in this study is the
convexity. The convexity is a measure of the irregularity
of the shape. There are several ways to define the
convexity and a definition based on the boundary rather
than the area has been chosen because it is more
sensitive to small defects (Zunic and Rosin, 2004). The
convexity C is then:
C

Pconv
;
P

where Pconv is the perimeter of the convex hull of the


shape and P is the perimeter of the shape. The convex
hull is the smallest convex set that includes the shape
(Fig. 3a). The convexity varies between 0 and 1 and
equals 1 for a convex shape. Fig. 3d shows typical
convexity values computed for simple geometric
shapes. A euhedral crystal is generally convex outwards.
Reactive dissolution, pressure solution, embayment, and
bending are processes that may alter the shape and
reduce the convexity of a crystal (see discussion).
Area, perimeter, and convexity were computed
within ArcGIS. The length, width and orientation were
calculated with PolyLX (Lexa, 2001).

23

2.4.3. Strength of foliation and alignment factor


The alignment factor is calculated from the bulk
orientation tensor. In order to take into account the
elongation of each crystal, the technique has been
modified from Meurer and Boudreau (1998) and
Wheeler et al. (2003) as follows: the orientation n
(measured clockwise from an axis parallel to the side
edge of the image) and length Ln of crystal n (n from 1
to N) are used first to calculate an individual tensor
T (n):


cos2 an
cosan  sinan
n
T Ln 
:
cosan  sinan
sin2 an
The bulk orientation tensor is then:
Dij

N
1 X
n

T :
N n1 ij

The eigenvalues e1 and e2 (with e1 N e2) of this matrix


are then used to calculate a normalized alignment factor
AF:
AF 100 

e1 e2
:
e1

This number describes the degree of coherence of


grain orientations and ranges from 0 (no significant
alignment) to 100 (all the grains are aligned). Moreover,
the eigenvectors of matrix D give the principal
directions of the population.
In order to estimate the influence of the crystal
elongation on the AF parameter, two idealised
populations were studied (Fig. 4): a single population
comprising two identical rectangles separated by an
angle 2, and a mixed population comprising two
different rectangles (AR = 3 and AR = 1.1). A comparison is also made with the alignment factor AFmb
used by Meurer and Boudreau (1998), and Boorman
et al. (2004). This parameter does not take into
account the shape of the crystals and is based on the
normalised orientation tensor (Harvey and Laxton,
1980):


1
cos2 an
cosan  sinan
M 
:
cosan  sinan
sin2 an
N
If 1 is the highest eigenvalue of this matrix, then
AFmb 2  k1 50:
The comparison shows that AFmb does not depend on
the axial ratio of the crystals (Fig. 4c), which may be a
problem if passive deformation like compaction is to be

24

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

that can subsequently be used to classify the grains


into different populations. Spatial statistics then give
significant information on the texture, as explained
below.

Fig. 4. Variations of the alignment factors (AF and AFmb) for a single
population of two rectangles of identical axial ratio (a, AR = 3) and for
a mixed population of two rectangles with different ARs (b). The graph
(c) shows that the two populations give the same result with the use of
AFmb, whereas a distinction can be made with the proposed AF.

described (Launeau, 2004). To avoid this problem,


Boorman et al. (2004) used only the 40 longest grains.
One may alternatively use the proposed AF that gives
more importance to the direction of elongated crystals
and therefore provides high values for all in the case of
a mixed population. However, one should keep in mind
that this parameter is still not unique and does not allow
one to return to the original population. A rose diagram
must be provided to correctly estimate the range and
spread of crystal orientations.
Another independent estimate of the Shape Preferred Orientation (SPO) is performed with the
intercept method (Launeau and Robin, 1996): intercepts are counted along a set of lines, which scan the
image in every direction (0 to 180), at regular
intervals, each time the line crosses a grain boundary.
This method actually computes the direction of the
preferred grain-boundary orientations. The calculation
was performed with the program SPO2003 of Launeau
(2004). Interestingly, the great sensitivity of this
method may provide important secondary directions

2.4.4. Spatial statistics


One of the main advantages of using GIS software
over conventional drawing packages is the possibility of
assigning attributes to each polygon. The attributes of
the polygons are recorded in a table associated with the
vector file. Commonly used attributes are: phase, area
and perimeter, orientation, as well as various shape
descriptors, as described above. The results are
displayed directly on the digitised thin section in the
form of a map. Various kinds of maps can be produced,
showing the spatial distribution of a parameter with a
colour code. More sophisticated interpolation maps can
also be computed: the value of a parameter is assigned to
the centre of each grain and the values between these
points are interpolated according to the Inverse Distance
Weighting algorithm (IDW). IDW assumes that each
measured point has a local influence that diminishes
with distance. It weights the points closer to the
prediction location greater than those farther away. In
this study, weights are simply proportional to the inverse
distance. This creates a surface that smoothes the
previous patchwork maps and makes it easier to detect,
for example, clusters of small grains or zones of highly
convex grains.
Maps are a convenient way to visualize the data.
However, one may prefer to summarize the information
into a single number to compare different samples. The
average is commonly used but, unfortunately, it may not
reflect the actual heterogeneity of a population.
Classification into bins allows the identification of
different populations within the sample. One can next
combine several parameters in order to bring to light
some significant correlation in the data. For example, a
population may be defined as the grains whose aspect
ratio is higher than 1.5 and length less than 1 mm.
However, a bias may be introduced if the classification
is done arbitrarily. In order to choose class limits
objectively, natural breaks (also called smart quantiles)
are used in this study: the features are divided into
classes whose boundaries are set where there are
relatively big jumps in the data values. This algorithm
is a one-dimensional example of the K-means clustering
method (e.g., Weisstein, 2005). Given a desired number
of classes, K, the natural breaks method partitions the
data into K subsets that minimize the sum of the
spreads within each subset. The spread is measured as
the sum of squares of the residuals, which are the

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

25

Fig. 5. Quartzite. (a) RGB stack of grey-scale images taken at three different orientations of crossed polars (0, 30, and 60). (b) Result of automatic
boundary detection. Truncated grains at the edges of the image were removed. Polygons are coloured according to their length.

differences between a value and the average value of the


subset. An iterative procedure is used to find the
minimum. The resulting classes do not have the same
size, nor the same number of values. This is a
compromise method between Equal Interval (equalsized classes, different numbers of values in each class)
and Quantile (unequal-sized bins, same number of
values).
The different populations are then displayed individually, showing their spatial distribution. The resulting
pattern can then be quantified by calculating the ratio R
(Jerram et al., 1996), which is the ratio between the
mean nearest neighbour distance (NND) of objects in
the sample and the mean NND expected for a random
distribution of points with the same population density
as the sample. The mean NND for the sample, rA, is
defined as
P
r
rA
N

where r is the NND, and N is the number of individuals


measured. The mean NND for a random distribution of
points, rE, is defined as
1
rE p
2 q
where is the density of the observed distribution.
Finally, R is defined as
R

rA
:
rE

The value of R is combined with the porosity (in this


case, the proportion of grains that are not in the studied
population) to decide if a distribution of points is
random, clustered, or ordered. The next section will
show that SDP analysis and statistical analysis can be
coupled in a relevant manner.

26

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

3. Examples
3.1. Quartzite
A fine-grained quartzite from the Isle of Islay
(Scotland) was selected as a first test of the method.
The purpose is to show the possibilities of GIS software
in petrography, not to address fully a geological issue.
The sample comes from the Harker collection at the
University of Cambridge (sample no. 41685) and
consists of almost pure quartz with b 1% of muscovite
(Fig. 5a). The rock presents a weak foliation defined by
the Shape Preferred Orientation (SPO) of quartz and by
the muscovite flakes.
Automatic segmentation was applied on a stack of
three grey-scale pictures taken at different orientations

of crossed polars (the red, green and blue channels


correspond to an angle of 0, 30 and 60, respectively,
Fig. 5a). The simplicity of the thin section makes it
possible to analyse directly the entire segmented image,
without any further manual correction (Fig. 5b).
However, the presence of areas with very small grains
resulted in a slightly oversegmented image because of
the occurrence of muscovite and some alteration in these
areas. In addition, some crystals may present subgrains,
which have been considered as distinct grains.
The length ranges between 0.002 and 0.92 mm (Fig.
5b) and the width between 0.002 and 0.6 mm. A CSD
plot was calculated with the width measurements with
the program CSDCorrections 1.36 of Michael Higgins
(Higgins, 2000) on 4500 grains representing the upper
half of the image. The result shows a gently concave-

Fig. 6. Crystal size distribution and classification by orientation. (a) CSD plot for the grains of the upper half of the picture. The shape number was set
at 0.5, half way between a cube and an ellipsoid. A foliation intensity of 0.5, together with an aspect ratio 1 : 1 : 1.2, was chosen to take into account the
weak fabric. (b) Rose diagram of grain orientation. Only the largest crystals (length N 0.0795 mm) are plotted. (c) Rose diagram of grain boundary
directions calculated by the intercept method with the program SPO2003 after grain identification. The thick line at 120 is the main direction. (df)
Maps showing the spatial distribution of three classes of grains defined from the secondary directions at 100, 125 and 167.

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

upwards curve for the intermediate and large grain sizes


(Fig. 5c). The plot shows also a minor excess of small
grains (width b 0.044 mm), which is related to the
already-mentioned oversegmentation in that part of the
spectrum. Consequently, it is difficult to tell more about
this population of small crystals, so the next investigation must be restricted to the larger grains. The grains
were therefore classified with the natural-breaks method
into 3 classes (Fig. 5b): small (length b 0.0795 mm),
medium (0.0795 b length b 0.1834) and big (length N
0.1834 mm). The larger grains consist of medium and
big grains.
As the foliation is defined by the larger grains, the
data can still be used to address the following question:
what is the SPO of this weakly foliated rock? The AF
value of 43 indicates a moderate alignment around the
calculated principal direction at 124. This preferential
orientation can also be seen on a rose diagram (Fig. 6a).
However, only a very broad peak can be defined around
110150 (the standard deviation is 40). A more
significant estimate of the SPO is performed with the
intercept method. The result shows a principal orientation around 120 and five secondary directions: 20,
50, 100, 125 and 167 (Fig. 6b). The regular
organization of these directions every 30 or so suggests
a control by the quartz crystallography (hexagonal
symmetry) during deformation. This feature, together
with the presence of subgrains and very small grains
may be the sign that rotation recrystallisation occurred.
This process is defined by Jessell et al. (2004) as the
formation of sub-grains by the relative rotation of part of
a crystal lattice with respect to its neighbour, as a result
of the progressive addition of dislocations of the same
sign to a sub-grain wall.
The SPO can be further investigated by coupling
textural analysis and spatial statistics. The three
secondary directions of the intercept method at 100,
125 and 167 suggest that three equal-sized classes
centred on these values can be defined. Three maps were
produced by displaying only the grains whose orientation falls in a given class (Fig. 6ce). These maps show
that each population is fairly scattered, with a few
groups of touching crystals. In order to quantify this
assumption, further statistical treatment can be applied
to each population individually: the R value equals 1.0
for the 3 groups, showing that their spatial distribution is
clustered (regardless of the porosity, Jerram et al., 1996).
The 116145 population shows this clustering particularly well because it is denser (Fig. 6d). Bands of
similarly orientated crystals can be observed, suggesting
localized accommodation of the deformation. However,
this should not be confused with an SC fabric where

27

different domains of homogeneous SPO can be clearly


defined (Passchier and Trouw, 1996).
This example illustrates how the combination in a
Petrographic Information System of several quantities
measured with different methods can be used to
discriminate distinct populations and reveal a distribution pattern. This rock is indeed weakly foliated along a
general direction around 130 but this description masks
the presence of two scattered populations of crystals that
are orientated differently. An EBSD analysis would
provide complementary data on the crystallographic
orientations of the crystals and on the grain boundary
misorientations, which can be used to distinguish
subgrains from grains. However, the complete investigation and interpretation of this sample is beyond the
scope of this article.
3.2. Troctolite
For this example, two thin sections of a single sample
of troctolite from the Tertiary layered intrusion of the
Isle of Rum, Scotland, were analysed. The sample
(RMC022) was collected by Mark Hallworth (Cambridge University) from Unit 9, on the northern slopes of
Hallival. The reader may refer, for example, to Emeleus
et al. (1996) for an introduction to Rum and to Bdard et
al. (1988), which is more focussed on Unit 9.
A cursory examination of the hand sample shows that
the rock has a well-defined magmatic foliation but no
obvious lineation. The two thin sections, named
RMC022Vand RMC022H, were cut normal and parallel
to the foliation, respectively. The rock is medium grained
and consists of olivine (14.5 vol.%, RMC022H content),
plagioclase (82 vol.%), clinopyroxene (2 vol.%), spinel

Fig. 7. Troctolite from Unit 9 of the Rum layered intrusion (sample


RMC022H).

28

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

Fig. 8. Troctolite. (ab) RGB stacks of grey-scale images taken at three different orientations of crossed polars (0, 30, and 60). (a) RMC022V,
normal to foliation. The dashed contour shows the analysed area. (b) RMC022H, parallel to foliation. (cd) Maps of grain boundaries after automatic
segmentation and manual correction. (c) RMC022V (675 grains); (d) RMC022H (1662 grains). All the figures are at the same scale.

Fig. 9. Rose diagrams of orientations of plagioclase grains (RMC022H). The long axis is the main direction calculated with the method of Harvey and
Laxton (1980). The inner ellipse has an aspect ratio equal to the ratio of eigenvalues (Rf). The data are smoothed by a 15-wide Gaussian curve. (a) All
grains; (b) big grains only (length N 0.697 mm); (c) small grains (length b 0.696 mm). The rose diagrams were obtained with SPO2003 (Launeau,
2004).

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

(1 vol.%) and some hydrated phases (0.5 vol.%). Each


phase has its own specific size and shape type. Olivine
forms big rounded crystals, occasionally showing
pointed apophyses (Fig. 7). Plagioclase shows a wide
range of grain size and shape, the bigger laths defining
the foliation. Clinopyroxene is interstitial between
plagioclase or forms thin rinds separating olivine and
plagioclase (Fig. 7). Clinopyroxene is believed to
pseudomorph the final porosity of the solidifying rock
(Holness et al., 2005). Finally, spinel forms small
rounded crystals scattered in the thin section.
After segmentation and vectorization of the thin
sections, the grain outlines were carefully corrected
(Fig. 8). Plagioclase crystals were analysed in term of
orientation, size and shape.
The intensities of plagioclase SPOs in the two
sections are compared to confirm that no lineation can
be defined. The alignment factor AF is 82 in RMC022V
(because of the strong foliation) while it is only 7 in
RMC022H (no principal direction can be statistically
defined). Thus, the rock is well-foliated but not lineated.
The absence of lineation is confirmed by the rose of
directions (Fig. 9a), which shows that the low value for
the in-plane section is due to the presence of crystals of
all orientations. The AF value is also lowered by the
presence of two slightly predominant families of crystals
(at 70 and 160) that are roughly perpendicular to each
other.
Another important consequence of this rather strong
foliation is that, in the foliation plane, the biggest
crystals are cut preferentially in their longest dimension.
In other words, there is less probability in RMC022H of
intersecting big crystals through a corner and consequently there is more chance that a small intersection
belongs to a small crystal than to a big one. This
property allows one to analyse the crystal size
distribution without stereological corrections, and
therefore to explore the relationships between position
and crystal size.
The crystal size was classified into 2 categories
(small and big) with the natural-breaks algorithm
(Fig. 10ab). The modal proportion of small and big
crystals is 32% and 50%, respectively. Fig. 10b
shows that the big crystals form a continuous network
of touching crystals. The alignment factor AF for this
population is 10, in accordance with the low value
already calculated for the entire population. Moreover, the rose diagram of directions for big crystals
only (Fig. 9b) shows a clear organisation into two
perpendicular sets. Hence, the crystal framework is
composed of a mesh of sub-perpendicular crystal
chains that covers all the space. The chains define

29

pools where olivine crystals are present, or where


small crystals are concentrated in clusters of 3 to 20
crystals. This strong clustering is reflected in the low

Fig. 10. Maps of RMC022H plagioclases showing: (a) the population


of crystals smaller than 0.696 mm; (b) the population of crystals longer
than 0.697 mm; (c) the population of crystals with an axial ratio lower
than 1.5.

30

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

R-value of the population of small crystals (R = 1.0


for a content of 30 vol.%).
Clustering is also visible for the population of
crystals with low aspect ratio, as shown in Fig. 10c
where only crystals with AR 1.5 have been displayed.
The R value in that case is equal to 1.0 for a content of
27.5 vol.%. A comparison between Fig. 10a and c
shows that clusters of small crystals mostly correspond
to clusters of low-AR crystals.
The plagioclase crystals can also be classified
according to their convexity. A convexity map and an
interpolation map of the convexity values are shown in
Fig. 11. The interpolation map shows a geometric
pattern that suggests that the variations of convexity are
not random: zones with high-convexity crystals (green
blue zones in Fig. 11b) can be clearly distinguished from

zones of low convexity (redorange zones). These


zones of high convexity generally correspond to the
clusters of small crystals shown previously (highlighted
with boxes no. 1 in Fig. 11b). Low-convexity regions
are related either to large complex-shaped single
crystals, or to the presence of clinopyroxene (highlighted with boxes no. 2 in Fig. 11b).
Length measurements and shape descriptors can be
combined together in order to further refine the
classification of plagioclase crystals. For example, Fig.
12a shows the convexity distribution of the population
of bulky crystals (AR 1.5) presented previously. This
combination is possible because convexity and axial
ratio are two independent parameters, as shown by the
plot of convexity vs. axial ratio for all the plagioclase
crystals of RMC022H (Fig. 12b). The correlation

Fig. 11. (a) Spatial distribution of convexity in RMC022H. (b) Map of interpolated convexity. The grain boundaries are superimposed; phases other
than plagioclase are filled in white. Boxes numbered 1 show zones of high convexity; boxes numbered 2 show regions of low-convexity crystals
associated with clinopyroxene wedges.

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

31

coefficient R2 is equal to 0.0032. Conversely, convexity


and length seems much more dependent on each other
(Fig. 12c), as the correlation coefficient is in that case
0.31. Though this relationship is therefore not useful for
classification, it may reflect the occurrence of a textural
process that makes small crystals convex and big
crystals complex-shaped.
4. Discussion and conclusions
Since the pioneering work of Kretz (1969), patterns,
arrangements or frameworks of crystals have been
recently subject to increasing attention (Philpotts et al.,
1999; Jerram et al., 2003) and this is partly due to
improved techniques of visualisation. The potential
contribution of GIS software in this domain can be
summarised as follows: (1) the representation of crystals
by polygons extends the possibilities of analysis and
display; (2) the improved management of datasets makes
it easier to classify the crystals by linking together
location information, phase name and textural parameters. Thus, one can define a Petrographic Information System as an integrated method for drawing,
measuring, analysing, and displaying data related with
thin sections of rocks.
The main advantage of GIS software over other
programs of image processing and/or textural analysis
(e.g., ImageJ, SPO2003, CSDcorrections) is that the user
can still work on the image after the measurements. Most
programs provide only a table of measurements and the
link with the original geometric database (the grains) is
lost. Although it is important for textural quantification
to obtain single quantities like main orientation or
amount of clustering, a GIS program allows one to return
to the grain topology and identify exactly which
population of grains can be related to a given result.
To conclude, a recapitulation of the methods and
results presented in this article follows:

Fig. 12. (a) Map of plagioclase crystals with low axial ratio (AR 1.5,
see Fig. 10c) showing two populations classified according to the
convexity (natural breaks). (b) Plot of convexity vs. axial ratio for all
the plagioclase grains of RMC022H. (c) Plot of convexity vs. length
for the same crystals. The contours show density surfaces.

(1) Watershed segmentation was applied successfully


to the problem of automatic grain boundary
detection.
(2) The different methods of length measurement were
compared, and the box length was selected for its
convenience and relevance to plagioclase analysis.
(3) A shape descriptor called convexity was introduced. Its independence with another shape
descriptor (axial ratio) was demonstrated with an
example, showing that they can be used in
combination for shape classification.
(4) A new alignment factor which takes into account
the elongation of crystals was proposed.

32

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733

(5) A statistical algorithm called natural breaks,


commonly used for geographic applications, was
presented and its use illustrated with examples.
(6) Examples of maps obtained by crossing several
textural parameters were shown.
(7) The recognition of different populations of
crystals and the explanation of the spatial
distributions obtained are two different things.
The interpretation of the results requires powerful
computer models (like ELLE; Jessell et al., 2001)
that can simulate the complex coupling of
processes acting on a rock: crystal growth,
chemical reactions, solid-state diffusion, grain
boundary diffusion, grain boundary migration,
and solidliquid interface adjustment. Hence, the
same method of textural analysis can be applied to
rocks and models in order to compare them in a
relevant manner.
(8) As stated in the introduction, textural quantification requires objective measurements. Objectivity
can be improved by increasing the precision of
measurements, which has been done by perfecting
the methodology (use of high resolution pictures,
painless correction of errors by the use of a vector
format). Classification is also performed objectively by the appropriate algorithm. However, the
possibility of objective comparison is the key to
objective measurement. This article presents new
textural parameters and their range of variations
for basic shapes and two natural examples.
Comparison with numerical models would be a
step further. Thus, a better understanding of
textural processes is essential for a real objectivity
of textural quantification.
Acknowledgements
Scottish Natural Heritage granted permission to
conduct fieldwork on the Isle of Rum. I gratefully
acknowledge Steve Laurie who gave me access to the
Harker collection. Alan Boyle and Alan Boudreau are
thanked for insightful reviews that improved and
clarified the paper. This work was financially supported
by the European Community's Human Potential
Programme under contract HPRN-CT-2002-000211
(EUROMELT).
References
Bartozzi, M., Boyle, A.P., Prior, D.J., 2000. Automated grain boundary
detection and classification in orientation contrast images. Journal
of Structural Geology 22, 15691579.

Bdard, J.H., Sparks, R.S.J., Renner, R., Cheadle, M.J., Hallworth,


M.A., 1988. Peridotite sills and metasomatic gabbros in the
eastern layered series of the Rhum Complex. Journal of the
Geological Society (London) 145, 207224.
Berger, A., Roselle, G., 2001. Crystallization processes in migmatites.
American Mineralogist 86 (3), 215224.
Boorman, S., Boudreau, A., Kruger, F.J., 2004. The lower zone-critical
zone transition of the Bushveld Complex: a quantitative textural
study. Journal of Petrology 45 (6), 12091235.
Carlson, W.D., Denison, C., Ketcham, R.A., 1999. High-resolution Xray computed tomography as a tool for visualization and
quantitative analysis of igneous textures in three dimensions.
Electronic Geosciences 4 (3).
Emeleus, C.H., Cheadle, M.J., Hunter, R.H., Upton, B.G.J., Wadsworth, W.J., 1996. The Rum layered suite. In: Cawthorn, R.G.
(Ed.), Layered Intrusions. Elsevier Science, pp. 403439.
Goodchild, J.S., Fueten, F., 1998. Edge detection in petrographic
images using the rotating polarizer stage. Computers & Geosciences 24 (8), 745751.
Harvey, P.K., Laxton, R.R., 1980. The estimation of finite strain
from the orientation distribution of passively deformed linear
markers: eigenvalue relationships. Tectonophysics 70 (34),
285307.
Heilbronner, R., 2000. Automatic grain boundary detection and grain
size analysis using polarization micrographs or orientation images.
Journal of Structural Geology 22, 969981.
Heilbronner, R.P., Pauli, C., 1993. Integrated spatial and orientation
analysis of quartz c-axes by computer aided microscopy. Journal of
Structural Geology 15, 369382.
Higgins, M.D., 2000. Measurement of crystal size distributions.
American Mineralogist 85 (9), 11051116.
Holness, M.B, Cheadle, M.J., McKenzie, D., 2005. On the use of
changes in dihedral angle to decode late-stage textural evolution in
cumulates. Journal of Petrology 46, 15651583.
Iivarinen, J., Peura, M., Srel, J., Visa, A., 1997. Comparison of
combined shape descriptors for irregular objects. In: Clark, A.F.
(Ed.), 8th British Machine Vision Conference, BMVC'97, Essex,
Great Britain, pp. 430439.
Jessell, M., Bons, P., Evans, L., Barr, T., Stwe, K., 2001. Elle: the
numerical simulation of metamorphic and deformation microstructures. Computers & Geosciences 27, 1730.
Jessell, M., Bons, P., Urai, J., 2004. The Online Microstructure Course.
http://www.microstructure.uni-tuebingen.de/moodle/.
Jerram, D.A., Cheadle, M.J., Hunter, R.H., Elliott, M.T., 1996. The
spatial distribution of grains and crystals in rocks. Contributions to
Mineralogy and Petrology 125 (1), 6074.
Jerram, D.A., Cheadle, M.J., Philpotts, A.R., 2003. Quantifying the
building blocks of igneous rocks: are clustered crystal frameworks
the foundation? Journal of Petrology 44 (11), 20332051.
Kretz, R., 1969. On the spatial distribution of crystals in rocks. Lithos
2, 3966.
Launeau, P., Cruden, A.R., Bouchez, J.L., 1994. Mineral recognition
in digital images of rocksa new approach using multichannel
classification. Canadian Mineralogist 32, 919933.
Launeau, P., Robin, P.-Y.F., 1996. Fabric analysis using the intercept
method. Tectonophysics 267, 91119.
Launeau, P., 2004. Evidence of magmatic flow by 2-D image analysis
of 3-D shape preferred orientation distributions. Bulletin de la
Socit Gologique de France 175 (4), 331350.
Lexa, O., 2001. PolyLXthe MATLAB toolbox for quantitative
analysis of microstructures. Deformation, Rheology and Tectonics
Conference, Noordwijkerhout, Netherlands.

J. Barraud / Journal of Volcanology and Geothermal Research 154 (2006) 1733


McEwan, I.K., Sheen, T.M., Cunningham, G.J., Allen, A.R., 2000.
Estimating the size composition of sediment surfaces through
image analysis. Proceedings of the Institution of Civil Engineers.
Water, Maritime and Energy 142 (4), 189195.
Meurer, W.P., Boudreau, A.E., 1998. Compaction of igneous
cumulates: Part II. Compaction and the development of igneous
foliations. Journal of Geology 106, 293304.
Mulchrone, K.F., 2003. Application of Delaunay triangulation to the
nearest neighbour method of strain analysis. Journal of Structural
Geology 25 (5), 689702.
Mulchrone, K.F., Choudhury, K.R., 2004. Fitting an ellipse to an
arbitrary shape: implications for strain analysis. Journal of
Structural Geology 26 (1), 143153.
Passchier, C.W., Trouw, R.A.J., 1996. Microtectonics. Springer
Verlag. 325 pp.
Perona, P., Malik, J., 1990. Scale-space and edge detection using
anisotropic diffusion. IEEE Transactions on Pattern Analysis and
Machine Intelligence 12, 629639.
Perring, C.S., Barnes, S.J., Verrall, M., Hill, R.E.T., 2004. Using
automated digital image analysis to provide quantitative petrographic data on olivine-phyric basalts. Computers & Geosciences
30 (2), 183195.
Philpotts, A.R., Brustman, C.M., Shi, J.Y., Carlson, W.D., Denison, C.,
1999. Plagioclase-chain networks in slowly cooled basaltic
magma. American Mineralogist 84 (1112), 18191829.

33

Rasband, W.S., 2005. ImageJ, U. S. National Institutes of Health,


Bethesda, Maryland, USA, http://rsb.info.nih.gov/ij/.
Tarquini, S., Armienti, P., 2002. Quick determination of crystal size
distributions of rocks by means of a color scanner. Image Analysis
and Stereology 22, 2734.
Thompson, S., Fueten, F., Bockus, D., 2001. Mineral identification
using artificial neural networks and the rotating polarizer stage.
Computers & Geosciences 27 (9), 10811089.
van den Berg, E.H., Meesters, A.G.C.A., Kenter, J.A.M., Schlager, W.,
2002. Automated separation of touching grains in digital images of
thin sections. Computers & Geosciences 28 (2), 179190.
Weisstein, E.W., 2005. K-means clustering algorithm. From MathWorlda Wolfram Web Resource. http://mathworld.wolfram.
com/K-MeansClusteringAlgorithm.html.
Wheeler, J., Jiang, Z., Prior, D.J., Tullis, J., Drury, M.R., Trimby, P.W.,
2003. From geometry to dynamics of microstructure: using
boundary lengths to quantify boundary misorientations and
anisotropy. Tectonophysics 376 (12), 1935.
Zunic, J., Rosin, P.L., 2004. A new convexity measure for polygons.
IEEE Transactions on Pattern Analysis and Machine Intelligence
26 (7), 923934.

You might also like