Post on 03-Jun-2018
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
1/32
Introduction toQuantitative Image
Analysis
J.H.L. Voncken, R. Ephraim. K-H.A.A. Wolf
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
2/32
Introduction to
Quantitative Image Analysis
J.H.L. Voncken, R. Ephraim, K-H.A.A. Wolf
REVISED VERSION
September 2004
Delft University of Technology
Faculty of Civil Engineering and Geosciences
Department of Applied Earth Sciences
Sponsored By :
Onderwijs Stimuleringsfonds T.U. Delft (O.S.F.)
Projectnumber :TA-96-30
Leica B.V. Rijswijk, Cambridge
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
3/32
Table of Contents.
1. Introduction ---------------------------------------------------------------------------------------------- 2
1.1. The Subject. -------------------------------------------------------------------------------------- 2
1.2. Aim ------------------------------------------------------------------------------------------------ 31.3. Structure of the Course. ------------------------------------------------------------------------- 3
2. Technique ------------------------------------------------------------------------------------------------ 3
2.1. Images ----------------------------------------------------------------------------------------------- 3
2.2. Image Processing ---------------------------------------------------------------------------------- 4
2.2.1. General ----------------------------------------------------------------------------------------- 4
2.2.2. Erosion and dilation : two basic operations ---------------------------------------------- 5
2.2.3. More Terminology ---------------------------------------------------------------------------- 7
3.The Software Package. --------------------------------------------------------------------------------- 9
3.1. Starting the program . ----------------------------------------------------------------------------- 9
3.2. The Main Menu. ---------------------------------------------------------------------------------- 103.3. The Menus ----------------------------------------------------------------------------------------- 10
4. Image Examples from Practical Work. ------------------------------------------------------------- 11
4.1. The first image example ------------------------------------------------------------------------- 11
4.2. The second image example. --------------------------------------------------------------------- 13
4.3. The third image example. ------------------------------------------------------------------------ 15
4.4. The fourth image example. ---------------------------------------------------------------------- 16
5. Some special operations ----------------------------------------------------------------------------- 19
5.1. Logical Operators --------------------------------------------------------------------------------- 19
5.2. Skeleton -------------------------------------------------------------------------------------------- 19
5.3. Pruning --------------------------------------------------------------------------------------------- 20
5.4. The Skiz -------------------------------------------------------------------------------------------- 215.5. Practical Example: Tortuosity------------------------------------------------------------------- 22
6. Specific subjects, related to Raw Materials Technology, Petrophysics/Petroleum
Engineering, and Engineering Geology --------------------------------------------------------------- 23
6.1. Image Analysis Steps in Liberation Analysis ------------------------------------------------- 23
6.2. Permeability calculation from porespace detection ------------------------------------------ 25
6.3. Introduction to size measurement --------------------------Error! Bookmark not defined.
6.3.1. Size measurement in muckpiles --------------------------Error! Bookmark not defined.
Appendix : Prints of the Images from the Exercises ---------------------------------------------- 27
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
4/32
2
1. Introduction
1.1. The Subject.
As the title indicates, this course is meant to introduce you to Quantitative ImageAnalysis, the computerised processing and analysing of images. Quantitative Image Analysis
in general means the processing of images by computer, and the measurement of interesting
features in these images.
Processing of images may be necessary to stress some features in the image, or to
simplify the image, or to recognise patterns, or to restore flawed images (image
reconstruction).
Measurement can be done of many parameters : length, area, brightness, shape etc., of
objects in an image. Visual properties are transformed into numerical values. Special
techniques make it possible to show again these results as images.
Quantitative Image Analysis is a technique, which has been applied already for a longtime in the following fields :
in astronomy, for the processing and reconstruction of optical-telescope and radio-telescope images of the universe.
in earth survey for the processing and reconstruction of satellite images.
in industry, in process control.
in administrative and financial business, for reading hand-written documents or, forinstance, for checking signatures.
in the petroleum industry, for the determination of the properties of reservoir rocks..
Within the Department of Applied Earth Sciences, Quantitative Image Analysis is used quite
often. In some disciplines, (Petrophysics, Raw Materials Technology/Recycling), Image
Analysis is a fairly common technique. Below are some examples to give you an idea of
applications :
A mineralogist will use microscopic images of rocks and will be interested to getinformation out of these images. Such information may be the number of grains
with a minimum specified grain size of a valuable mineral, or the degree of
intergrowth of such a mineral with another mineral.
If one studies reservoir rocks, one may be interested in the size and shape of poresin the rock, or the shape of the grains, or the orientation of elongated grains in the
texture.
If one studies separation processes in raw materials technology, one may beinterested in studying the path traversed by a particle in a specific separation
device, and how particles with a specific predefined shape behave in the separation
process.
If one studies the behaviour of pellets and sinters in a blast furnace process, onemay be interested in the degree of crack formation as a result of a phase
transformation at high temperature.
When studying construction materials one may be interested in the analysis ofcertain specified structural features in microscopic images (for instance the
orientation of microcracks).
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
5/32
3
1.2. Aim
The aim of the course is to introduce you to the quantitative study of images and the
possibilities to retrieve information from images.
In this course, you will learn the basic principles and terminology of image processing and
analysis. You will learn to study images with dedicated software, using simple examples fromcurrent research in the Department.
The software package, which is used, is not the only one of its kind. The types of
processing, which are shown during the course are to be found in every other package,
irrespective of its manufacturer. We use the package QWIN (Quantimet for Windows) by
LEICA, a company which you may know from their microscopes used in mineralogical
practical courses.
1.3. Structure of the Course.
The course takes three halve days. During the first day, instruction will be given on theprinciples of quantitative image handling, and the structure of the software to be used. The
first and second day examples of image analysis will be treated, and you will practice yourself
with the software package. During the third day a specific problem for a certain field of
interest (Petrophysics, Mineral Processing, Engineering Geology) will be worked through.
2. Technique
2.1. Images
The sources of images may be diverse :
The image may be made with a photocamera or a videocamera, (which may, for instance,be mounted on a microscope).
Digitised electron microscope images may be used.
Single images from a movie may be used. Movies are used if one studies for instance themovement of particles in a certain device.
To save images digitally, software standards are needed. Presently, a couple of dozen
of image standards, or in the jargon: image formatsare available. It will be dependent on the
In this manual different fonts are used to indicate different types of terminology :
file extensions are in thisFONT(e.g. .TIF)
terminology used in Image Analysis and Image Processing is printed inItalics : e.g.erosion, perimeter, feret.
commands, menu names, etc., from the software package are in this font. For instance:File Menu, Calibrate, Image Plane
Questions are printed in bold + italics
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
6/32
4
type of image and the use of the image what type of image formatwill be chosen. A line
drawing will be coded differently than a photographic picture, and a line drawing will also
yield a smaller datafile (less Kilobytes). If one chooses to use a photographic image for
detailed analysis, a higher quality image will be required than that needed for use as a small
illustration in a text. This will affect the choice of type of image format and required
resolution of the image (size of datafile).One of the most common image formats is the so-called tagged image file format:
TIFF. It is very well suited for photographic material : images with grey levels or colour, in
contrast to vector (line) drawings. Files of this type have the extension .TIF. For line drawings
for instance the image format of Microsofts drawing program Paintbrush is well known.
Files of this type have the extension .PCX . For graphic and Internet application, one
encounters files of the type .GIF and .JPG. To explain how these formats work, however, is
considered to be beyond introduction level.
2.2. Image Processing
2.2.1. General
When an image is digitised, it is converted in ones and zeros. The image is therefore
divided in a fixed number of picture elements, calledpixels. The brightness of a pixel is
expressed in a series of 8 ones or zeros, (eight bits= 1 byte) . That yields 256 different
brightness values, called grey values, from byte 00000000=blackto byte 11111111=white. A
digitised image consists of a 2D-matrix of pixels, in which for every pixel a code is stored
which indicates the grey valueof the pixel . This can be seen in the picture set on the next
page.Changes may be brought about by transforming a pixel value to another one : (for
instance 2 x the original pixel value 2 x as bright ). This is an example ofpoint processing.
It is also possible to relate the value of a pixel to neighbouring pixels : neighbourhood
processing. The latter type of processing yields a number of very powerful image processing
techniques which can be subdivided into :
Mathematical Morphology.Here the relationship between the pixel to be processed andthe neighbouring pixels is very simple. Such operations are generally carried out very fast
and now easily controllable. They all are based on the basic operations called erosionand
dilation. During erosion the value of the pixel is lowered in relation to the neighbourhood,
and during dilation the value is increased. Convolution.Here the relationship between the pixel to be processed and the neighbouring
pixels is complex. This group of techniques is applied for instance in filters to improve the
quality of images :
- stressing borders between grey values : sharpen
- or its reverse :smoothing
- or detecting the edge of an image object : edge detection.
Finally, the total image may be seen as just a set of data. One may apply Fourier-analysis to
detect fixed signal fluctuations in the set of data, which may then be enhanced or suppressed.
This is for instance applied in the elimination of noise in the image.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
7/32
5
Figure 1. A digitised image
The digitised microphotograph on the top of the page shows part of a pore texture. The lower
left image is a magnification of the rectangle, whereas the lower right photograph is again a
magnification, now showing the pixels
2.2.2. Erosion and dilation : two basic operations
With respect to the fundamental importance of erosionand dilationa more
detailed explanation is worthwhile.Erosion, as the name already indicates, acts as if the outer
pixels are peeled off the image object.Dilationis exactly the opposite. In the figure you see
two objects existing of squares, which are supposed to be pixels. During erosion every pixel is
removed which has a border with the background.Sometimes a distinction is made between
pixels bordering the background on side only (4-connected) or pixels bordering the
background with side AND a corner (8-connected). Dilation does the opposite : around the
object a layer of pixels is added. However a dilation after an erosion does not necessarily yield
the original object !
Just try it using a pencil on the objects in the figure (see separate sheet) and notice thedifference. (N.B. : Try only4-connected erosion and dilation).
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
8/32
6
Use another colour for the pixels added during dilation.
Figure 2. Two objects consisting of squares, representing pixels in an image object. Conduct
the operations explained above crossing out or adding the intended squares and study the
result.
N.B. : Application of one or more operations may CHANGE the image because objects
CHANGE THEIR SHAPE. One should always remember this and always RETAIN A
COPY OF THE ORIGINAL IMAGE, and if complicated operations are carried out,
even copies of intermediate phases in the processing by storing them in different image
memories.
In image analysis, an UNDO-option often is NOT present,or works only in very specified cases !!
A combination of erosion followed by dilation is called Open. Dilation followed by erosion is
called Close. Erosion, dilation, Open and Close are standard operations from the group of
Mathematical Morphology. Many much more complicated operations in this group are based
on these rather simple operations. An example is the operation called segmentation, which is
based on a clever combination of Opens and Closes.
Segmentationseparates objects, which, although unrelated, touch each other in the
image. The program would detect such contacting objects as oneobject, which is undesirable.
Famous example: touchinggrainsin an image of a collection of loosemineral grains.
You will encounter such a problem in the course. The principles of erosion, dilationand
segmentationwill be explained more in detail during the course.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
9/32
7
2.2.3. More Terminology
Feature Count Point( FCP ) : an object is scanned in such a way that pixels are countedfrom the top left corner to the bottom right corner row by row. The last scanned pixel
of an object at the position the furthest down and right is the Feature Count Point. The
FCP determines the co-ordinates of the object in the program. The Feature Count Pointmay be (slightly) differently defined in software by other manufacturers.
Image frame: the frame indicating the part of the image to be taken into account inprocessing. This frame may set to be the boundary of the entire image, but one may also
select a portion of an image.
Measure frame: as image frame, but this frame now encloses the portion of the imagewhere the objects to be measured are. Objects with their FCP outside the measure frame
are ignored in measurements.
Feret: measure of length in an indicated direction. The lengthof an object is the longestferet, and the breadthis the shortest feret. (Widthis used instead of breadth if the 0 feret
is meant). In practice, the operation, which calculates the feret, works in such a way,however, that embayments in the section of the objects are nottaken into account. One
may imagine the feret as a size determined by a pair of sliding callipers (Nederlands :
schuifmaat). See Figure 3 for a visualisation. When determining the length and breadth of
the objects, the computer calculates the ferets for all 360 directions, and takes out the
longest and the shortest, calling them length and breadth (or width).
N.B. : Ferets have a direction !
Figure 3. Three ferets determined on the same grain. Figure 3A gives the 0 feret, Figure 3B
gives the 45 feret. Figure 3C gives the 90 feret.Embayments are not taken into account.
aspect ratio: the ratio of the longest and the shortest feret.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
10/32
8
perimeter: (real) circumference, or the total length of the border of the detected objectwithin the measurement frame
roundness: a shape factor defined as roundnessperimeter
area=
2
4 1064 .
This shape factor yields the value of 1 for a circle.
orientation: direction of the longest feret.
convex area: the surface of a polygon circumscribing the object (feature), formed bytangents (Nederlands : raaklijnen) to its boundary .
Figure 4. Concept of convex perimeter.
convex perimeter: the length of the polygon circumscribing the object (feature), formedby tangents (Nederlands : raaklijnen) to its boundary . This is similar to the length of a
piece of string stretched around the feature.
Curve length: The length of the longest side of a rectangle having the same area andperimeter as the measured feature :
CurveLengthPerimeter Perimeter x area
=+ 2 16
4
2.3. Analysis.
Properties of an image may be analysed on two levels :
Grey level: Measurements are carried out directly on the image , for instance to determinethe brightness distribution in the image.
Binary level: first by means of a process called detection, pixels which belong to a certain
brightness range are traced . For instance, this may consists of the pixels corresponding topore space in the image of a porous rock, or pixels, which correspond to a certain mineral
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
11/32
9
in the rock. The image isolated in this way is stored separately. This image is called
binary, because during detection it is determined if a pixel does (value=1) or does not
(value=0) match the criterion. In the memory of the computer, certain parts are reserved
for such binary images. These parts of the memory are called binary images.
The newly formed image consists solely of pixels having the value 1 or 0 . Also this image
may be processed by the techniques which are mentioned above. Figure 5 shows anexample of a binary image consisting of 4 objects (for instance grains), for which a large
number of parameters can be determined. They may be length, aspect ratio, area, shape
direction, roundness, etc. The image does not contain grey level variations, as the pixels
have the value 1 or 0.
Figure 5. A binary image.
3. The Software Package.
First you will have to learn how to work with the software. You will need the manual supplied
by the manufacturer. There are two manuals supplied, called LEICA QWIN USER Guide and
LEICA QWIN REFERENCE GUIDE. You will need the first. The Reference Guide may
inform you about background of software routines and software settings. The name of theprogram is QWIN.
3.1. Starting the program .
Double-click on the Qwin icon. If a question appears about image drivers, just click ok.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
12/32
10
3.2. The Main Menu.
The main menu is composed of the following items :
File
Edit Image
Binary
Measure
QUIPS
Utilities
Peripherals
Add-Ins
Window
Help
The menus File, Image, Binaryand Measurewill be used most. QUIPSis a menu forprogramming macros.
3.3. The Menus
Description of the menus you may find from the Helpmenu in theLeica QWIN User Guide..Carefully read the descriptions of the menus File, Image, Binary, andMeasure.
DO NOT CHANGE ANY SETTING WITHOUT INSTRUCTION FROM THE STAFF TO DO SO !
3.4. The Shortkeys
The following key combinations can help you judging the results on screen:
Ctrl-B toggles the Binary overlay image on and off (proving that the binary image
does not merge with the underlying grey or colour image but is a real separate
overlay!)
Ctrl-G toggles the Grey or Colour image on and off
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
13/32
11
4. Image Examples from Practical Work.
A few examples may perhaps clarify the theoretical considerations from the previous
sections. The examples are taken from research within the faculty and are from various
disciplines. There are examples from research in raw materials technology (particles on asieve, roundness of grains in a heavy mineral separate), Petrophysics (pore structure of a
reservoir rock and of a compact of sintered fines from underground coal gasification). You
will practice on these images, and in this way learn to use the software and understand more
about the fundamental principles of image analysis explained in previous sections.
4.1. The first image example
Subjects : detection, remove noise with open-procedure, determination of roundness.
The image you will work on shows a microscopical image of diamond grains. We will try tomeasure the roundness of these grains.
Go to File menu. Click on Open..Choose as Files of type: TIFF (*.tif)Choose as Output:Image0Select a filename by clicking on it. Click then on Open.
In this case open the image : diamant.tif. You will find it in the folder that isindicated during the oral introduction.
The diamond grains must be identified for the computer as being the objects ofinterest. This procedure is called detection. You will find this routine in the Imagemenu. First choose binary 0 as output binary. The computer identifies
automatically if you are dealing with a grey level image or colour image. Detect the
diamond crystals
by clicking in them with the mouse, or
by moving the scroll bar in the menu window, or
by moving the vertical dotted lines in the histogram.
The computer may automatically detect initially certain grey levels when you enter
this menu, because it automatically uses the setting from the use. Never use
autodetect during this course, except (perhaps) in the later specialised exercises.
When you operate detect, you will notice that you can only capture all grains if you
accept the appearance of numerous tiny disturbances in the image. You can remove
using erosionand dilation.
To do so, proceed as follows :
select Binary / Binary Amend
select for binary input binary image No. 0
select for binary output a binary image different from binary No. 0 (otherwise you
will overwrite it and remember : there is no undo!!).In table 1 you will find angeneral example of the way to proceed.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
14/32
12
Table 1.
Input Output
0 1
1 2
2 3
3 4
etc. etc.
Choose for the number of cycles : 3 (but you may experiment with fewer or morecycles. A good choice for comparison is to try cycles = 10 or 11. You can judge the
effect yourself. Clearly you get an undesirable distortion of your grains).
select Open(remember that this is a combination of anErosionfollowed by aDilation)
Study the result.Did the grains change their shape a little or much ?Toggle
between the original image and the new one by clicking on the input and outputBinary selection.
Now the resulting grains will be measured:
go toMeasure
select Measure Feature
select the binary image in which you stored the processed image ofthe diamonds.
choose Select Parameters.
Click None
chooseRoundness, XFCP, YFCP click OK
click Measure
click Parameters, right of the Labelbutton and select Number. The computerwill number the objects in the image.
click Label, and find out which grains are measured. The program did not takesome grains into account (why not ?)
statistics of the measurement you will find in the bottom part of the resultswindow.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
15/32
13
4.2. The second image example.
Subjects : detection, touching objects, segmentation, aspectratio, roundness.
4.2.1 IntroductionIlmenite (FeTiO3) is an important raw material for the production of TiO2(white
pigment) . Ilmenite occurs in heavy mineral sands. The image ilmeniet.tif shows an
electronmicroscope image of ilmenite grains. The grains are all more or less rounded. Suppose
one would like to know roundnessandflatness. It is possible to have flat(tened) grains, which
are more or less rounded. In cross-section, the flattening is measured as the aspect ratio. We
will now attempt to determine roundness and aspect ratio in this image. Furthermore, we may
calibrate this image, as a micron bar is provided. On the other hand, the micron bar may not
be an object in the measurement. Therefore we have to change the measure frame.
In the image ilmeniet.tif we will see that not all grains have the same greylevel. Also
the greylevel changes per grain : the grains are not homogeneous. The ilmenite is partlyweathered and yielded anatase (TiO2), and leucoxene (amorphous mass, consisting of Fe, Ti
en O). This inhomogenity is not very important at the moment.
open the file ilmeniet.tif in the same folder as the previous file (diamant.tif)
read the introduction about ilmenite.We must detect all grains. However, first we will have to change the measure
frame. In general, the default setting is okay, but this image contains an
information bar (with the micron bar and picture number). This information bar
must be excluded from measurements.
Click Measure, then Frames.
Select frame:Measure
With the mouse, draw in the image a rectangle as large as possible, in such a waythat no unwanted parts of the image (micron bar, picture number) are included.
The dialog box gives you information about the size of the frame.
Click OK.
The micron bar makes a calibration possible : how large is the object in real units (instead
of pixels) ?
Click on Measure and selectCalibration
In Optionschoose Localand the Unitsof your micron bar
Click on the button Calibrate. With the mouse, draw a line over the micron bar as precisely as possible, and enter
the real value in the window entry.
Click on Apply, then on Close, then on OK.
Detect all grains (which grey value??)with the ImageDetect-option.Try to get as few holes as possible in the binary equivalent of the grains.
When all grains have been detected we see that there are touching grains. This is a
recurring problem with measurements on separate objects (features).It is difficult toavoid this completely when preparing a sample. We will have to separate the grains in
a digital way, called segmentation. This is possible, but, as in all image analysesoperations, it has its consequences. We will see that this operation harms the image a
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
16/32
14
bit in this case. In another example image you will encounter an astonishingly drastic
effect of this method. Segmentation is a smart combination of erosion and dilation.
Check if the detected imageis placed in binary image 0
SelectBinary. Choose now Segment.
Choose for Maximum Cycles: 3, using the arrow keys, and for Stepsizeand
Filter: 1 Check that the output binary imageis not equal to 0 (zero). See also the
previous example and table 1.
Click on Segment. The operation will now be carried out.
By looking alternately at the original and the processed image, we discover thatalmost all touching grains are separated, but also that grains are cut in two halfs
incorrectly. This is a result of irregularities in the original grains and it can never
be prevented completely. In the present case, only a few grains of the hundreds that
were processed are affected in an incorrect way. The effect will, in this instance,
have little influence. However, a little bit further in the course you will encounter
an example where the result is quite the opposite......... The real measurement will be carried out on the resultant image stored in
binary 1. Select now Measureand then Measure Feature. Select the followingparameters: Area, Perimeter, Roundness, Aspect Ratio. Click on OKand thenon Measure.
Study the result. Is the diversity in roundness and aspect ratio values incorrespondence with your expectations or not (i.e. do you think all grains are
just as rounded and flattened, or is this not so according to your feeling, and
does it show somehow in the measurement?).
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
17/32
15
4.3. The third image example.
Subjects : improve image quality, aspect ratio.
The image zeef.tifshows white round particles (disk shaped) on a sieve. You can see that this
image is not of a very good quality. It is however possible to identify the bright particles withease. We will practice two things here, image enhancement and automatic distinction between
discs in horizontal and vertical position.
First, lets try to improve the image quality. We will have to make the image brighter, and to
be able to see how many particles are on the sieve we will have to make them more
distinguishable from the sieve.
Carry out the following :
Open the file zeef.tif
choose Image, Image Transform
Choose Wsharpen(White Sharpen), cycles = 3 compare the resultant image with the original image stored in image 0.
Now we will try to measure the particles on the sieve. If you do this on the enhanced image,
you will notice that when you detect particles, you will detect very easily parts of the sieve
too,. Here it will be better to detect on the original image. (Did you keep a copy of it ?)
After detection open in Measure Feature theSelect Parametersdialog
Hit the none button
mark now: Aspect ratio, XFCP and YFCP and hitOK
AfterMeasure click on: Label
Try to evaluate which particles are lying (almost) flat on the sieve. Try this bycontrolling the aspect ratio. When the particles are lying (almost) flat, this ratioshould be close to one. Take 1.25 as a boundary value in the following way:
SelectMeasure, thenFeature Accept
You will see a table similar to this one:
Accept From To
Click on the first Null button and in the table that pops up, select Aspect Ratio.Click OK, and in the above table insert in the fromand tofields the values 1.0 and1.25 respectively.
Then click OK
Null
Null
Null
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
18/32
16
If you do it correctly, you will find that probably 4 particles match the criterion,visible by their binary color
The image zeef.tif is one single image out of a video of the movement of particles with
a predefined shape on a sieve. The camera stored 24 pictures each second!
Every step you made by hand can be programmed, and this results in what is called amacro.This makes fully automated analyses of the movie possible. Later it may be
statistically analysed how many of the particles were, in a specific part of the sieving
process, on the sieve. This says something on the kinetics of the sieving process. If a
high percentage of particles is lying flat on the sieve the screening kinetics will be
lower than when the particles are more vertical.
4.4. The fourth image example.
Subjects :Image enhancement, measuring the spatial characteristics of pore space and grain
boundaries
Methodology : processing binary images for pore characterisation, grain segmentation and
grain contact measurements.
In our Department, research is done on the behaviour of granular rock under high pressure and
temperature in order to define compaction behaviour and pore characteristics in relation to
permeability.
The following example is a digitised microscopical image of rubble (from 1 -5 mm in sizeafter heating to 800C and compaction to 3.9Mpa). By measuring properties of the sample
before and after treatment, the behaviour of the grain aggregates can be analysed.
open the file 395.tifin output Colour 0.
The blue area is the pore space, filled with a blue stained epoxy resin. The white spots
are tiny quartz grains. The remaining space is silt rubble.
An example of image enhancement is the suppression of white spots of a certain size
click on image and chooseImage Transform
Choose asinputColour0 and as outputColour1 Change Cyclesto 1
Click on FillwhiteThis is another example of the application of smart combinations of erosion
and dilation, now on a colour image
Choose as outputColour2, increase Cycles to 3 and click again on Fillwhite
Compare Colour 0, 1 and 2
Detecting the porespace:Click on Imageand Choose Detect. As the computer may use a default setting
from a previous session of detect, you must overwrite this to start with your own. Ifthe tic-mark Accumulateis set, UNSETit now first !
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
19/32
17
In the Colour Detectwindow choose Input Image 0, Output Binary 1(if youchoose output binary 0, the default overlay colour will be blue, giving a visibility
problem with the blue pore space), Colour Space RGB. Adjust Marginto 8.
Tic mark the field left to Accumulate.
Point the mouse cursor in the blue area (the pore space) and click.
All pixels with the same colour as the pointed one will be coloured red, e.g. theywill be pixels with value 1 in the Output Binary image 1.
Continue pointing to blue stained area until all porespace is red.Hint: toggle red on and off with Ctrl-B, to check the result.
The red area describes the pore space. By inverting the binary image, the resultinggrain area is described:
Click on Binaryand choose Binary Logical.
Choose as InputA Binary1 and as OutputC Binary 2.
Tic mark Invert A
Click on COPY A. Binary image 2 (green) now is the grain area.
By analysing the grain shape it is obvious that the grains are intergrown.Separating them and subtracting the result from the original image leaves the
grain contacts
Click Binaryand choose Binary Segment.
Fill in Filter: 20and adjust Maximum Cyclesto 14.
Choose as InputBinary2 and as OutputBinary3.
Choose as Operator: Disc
Click on Segmentand watch the result after a few seconds.
Experiment with Filter and Maximum Cyclessettings for the best result.
When you study the result, you will notice that the system has tried to separate thegrains according to their shape. Because of the very random shape, it did not
succeed well in this case. In practice much time-consuming manual editing of this
image is needed before reliable measuring is possible.
Now the edited version can be loaded instead:
Click Binaryand choose Binary Logical
Choose as OutputC: Binary2 and click READ C
double-click on the file 395o.bin
Choose as OutputC: Binary3 and click READ C
double-click on the file 395s.bin
Choose as InputA: Binary2, as InputB: Binary3 and as OutputC: Binary4
Remove eventually tic marks in InvertA or InvertB by clicking in the appropriatebox
Click on A XOR B
As a result of the logical XOR operation, the grains contact are left in binary image4.
At this moment, the following binary images are available for measurements (table
2)
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
20/32
18
binary
image
subject Result of
1 porespace detection of
porespace
2 grain area inversion to grains
area3 separated grains separation of grains
4 grains contacts XOR : contact are
left
Table 2.
Measuring porosity:Click Measureand choose Measure Field
Choose as Input: Binary1
Click Params
Choose only Area Percentby putting a tic mark in the box Click OK
Click MEASUREand watch the result
Measuring grain parameters:Click in the menu list above the image: Measureand chooseMeasure Feature
Choose as Binary Image: Binary3and as Grey Image: Colour0
Click Select Parametersand select only Length, Breadth, Perimeter,Roundness, Aspect Ratio, X FCP and Y FCP (the latter are the co-ordinates ofeach grain).
Click OK
Click Parameter, select Number, and clickOK If the feature numbers do not appear, click onLabel
Click MEASUREand study the result (each feature number is placed below thefeature in the image).
Why will some grains not be measured ? How can this be influenced ?
Measuring grain contacts:Choose as Binary Image: Binary4
Click Parameters and select only Length, Breadth, Curve Length, Orientation,X FCP and Y FCP
ClickOK
Click MEASURE Studying the results, which complication can be observed?Hint : study the difference between length and curvelength in some cases.
What is the meaning of high breadth values for these contacts?
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
21/32
19
5. Some special operations
5.1. Logical Operators
Because binary images consist of pixels with values 1 and 0, it is possible to use Booleanlogical rules for adding and subtracting those images.
The logical condition NOT must in this case be interpreted as inverted, so, first every pixel
that is set (value=1) is converted to unset (value=0).
Starting with input images A and B and output image C, the following operations are possible
(Figure 5):
Figure 5
5.2. Skeleton
Skeletonizing is a special kind of erosion, creating conditional thinning of the features in an
image. Like erosion, thinning reduces the feature size, and in general skeletonizing is
constructed to reduce the feature to a single pixel width., thus thinning the feature to its
central framework (Figure 6).
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
22/32
20
Figure 6
Exhaustive skeletonizationis a function which carries out the procedure described above not
step by step, but at once.
Unlike erosion, most forms of the skeleton do not change the number of features (objects) in
the image and also preserve the relationships of features being inside one another (such as a
feature located in a hole of another feature). This behaviour is described as apreservation of
homotopy. Thus: erosion and dilation do not preserve homotopy, since features can easily
disappear or join together during erosion or dilation, while skeletons do preserve homotopy,so that you can be assured that the number of features before and after skeletonization is the
same.
5.3. Pruning
Very often skeletonized features contain many branches or dendrites. These may represent
actual branches in the features, or they may be caused by the digital nature of the pixel grid. In
any case, these dendrites can lead to too many branches.
To reduce these effects, the skeleton can beprunedby iteratively removing the end points. In
fact, this operation can be seen as a conditional erosion in which only those pixels areremoved that have one side connected to its neighbour.
Alsopruningcan be exhaustive,in which case no branches are left, only loops.
In figure 7 from to bottom a feature is visible with its skeleton and the result of a few
iterations of pruning.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
23/32
21
Figure 7
5.4. The Skiz
The skeleton by influence zone, or skiz, is a combination of the above mentioned operations:
After detection of the features in the original image
- inversion of the image
- exhaustive skeleton of the inverted image- exhaustive pruning of the skeleton
Figure 8 shows a group of features and the boundary lines formed by the skiz operation. Each
feature thus resides in its own influence zone of set pixels, which is separated from adjacent
features influence zones by a single pixel boundary.
Figure 8
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
24/32
22
5.5. Practical Example with special operations: Tortuosity
In a reservoir rock bearing water, oil and/or gas a flow path of the medium can be described.
This will always be a winding path in between the grain texture. Tortuosity describes that path
as the ratio between the actual flow path length (La) and the minimum length between the twoends of the path (L):
=
L
La
Now, try to construct a flow path using some of the techniques mentioned in chapter 5:
Openthe file 00.tif
Choose Measure Frames
Click Frame Image
Draw a new Image Frame just within the original frame, dragging the mousestarting from upper left. (Ask example for the entire classroom)
Detect the pore space, using Binary 1 as the Output Binary (dont forget the darkblue pore boundary) and when ready, click OK
Restore the original image frame by double clicking in the image
In the Binary AmendDialogue Box make a Exhaustive White L TypeSkeletonof the original binary pore space, without overwriting it
From the Binarymenu choose Binary Editand choose your input and outputimages
From the Edit modeschoose Lineand as Line Width, 4
In the image mark the in- and outflow points by drawing a line across these points(hint: there is an Undobutton)
Click OK
In the Binary AmendDialogue Box use Exhaustive Prune on the image in whichyou had marked the in- and outlet
In the resultant image the drawn marker lines are still visible. Use the BinaryLogicalDialogue Box to get rid of them! WHY?
Study the result. Is it acceptable? Could this really be the three dimensional -flow path? How to overcome mismatches?
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
25/32
23
6. Specific subjects, related to Raw Materials Technology,Petrophysics/Petroleum Engineering, and Engineering Geology
To show more specific applications of image analysis in relation to your specialism, separate,
more elaborate tasks were developed for each of them.
Specialism :
Raw Materials Technology/Recycling : Liberation analysis.
Petrophysics/Petroleum Engineering : Permeability calculation from porespacedetection.
Engineering Geology : determining size distribution of aggregates in a muckpile
Raw Materials Technology
6.1. Image Analysis Steps in Liberation Analysis
You will use now an image of a milled Pb-Zn ore made using an electron microscope. You
can imagine that in order to extract Pb and Zn from the ore, ore particles must be separated
from each other and from (worthless) rock. This can be done by milling. To check the effectof a milling process, after milling the particles are subjected to microscopic study. If there are
still intergrown particles, one must try to quantify how many. This can also be done by image
analysis, using a complicated program, which applies various image analysis subroutines. By
doing the following exercise, you will find out about some fundamental concepts. A complete
finished operational program will be demonstrated on another (larger) machine.
The images to work with are 330.tif - 333.tif. The images contain mineral grains of different
grey values on a black background. The brightest (white) grains are galena, PbS. Second
brightest is sphalerite, ZnS. The remainder of the grains are silicates, which have no value as
an ore mineral. The galena and sphalerite should have become separated from each other, andfrom the rock fragments as a result of the milling process. This is not the case in all grains.
Liberation Analysis determines in how far this has happened.
The liberation degree is given as : total area of liberated material over total area measured.
Try to determine the liberation degree for the images 330 - 333, using also Microsoft Excel.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
26/32
24
To determine the liberation degree, the following steps are necessary :
You must measure the area of the galena grains, the sphalerite grains, and of the remainingrock grains. Also, it is necessary to determine the total area of (all) grains. The black
background is resin, and must be ignored. Care must be taken that the detection of phases
is such, that there is no overlap of the detected areas of the different phases, because as aresult all mineral grains will seem to be intergrown. Think of a smart order in which you
detect the phases, and use binary logicalcommands in order to obtain non-overlappingbinary images of the phases of interest (galena, sphalerite, rock).
As several grains contain small areas of different grey level due to disturbances (pits,cracks - the material has been milled), make sure that you ignore most of these
disturbances, as they will be recorded by the program as intergrowths. It will appear,
however, that this is not completely possible.
To measure intergrowths, coincidence measurementmay be used. This is a measurementtechnique in which the program identifies areas that are coinciding in two binary images.
In other words; two binary maps are created and measurements in the X,Y-coordinatescompared. Coincidence measurementis actually a smart combination of measurements
and binary logical commands, but as it occurs frequently in image analysis, it is present as
a complete programmed routine. It can be found in the menu Measure Feature / SelectParameters(coincidencesumand count).
For coincidence measurementto work, one must first measure the area of the mineralspecies studied, and secondly the total of grains. In this way it is determined whether the
area in a binary image is coinciding with the area of another binary image. If so, the
mineral phase investigated is intergrown.
Coincidencemeasurement gives the result in a window appearing on your screen. Youmay transfer data to Excel by copying it to the clipboard (use the copy function in the EditMenu of the Results windows) and pasting it in an Excel Worksheet. Actually, you only
need the statistical summary at the end of the result sheet. Question: what is the relevance
of the values 1 and 0?
Combine the results of the five images to get a final result. In reality, one may have tomeasure some 40 to 50 images in order to get a liberation degree, which does not vary
anymore when a new measurement is done.
Note :
Also touching grains of different minerals are taken to be intergrown. You may try
segmentation if you like, but use only two or three cycles, not more, not less.(Segmentation is actually quite rough when applied).
Grains being cut off by the measure frame, are also taken into account. Although actuallythis should NOTbe the case, for the sake of the exercise we will also ignore this problem.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
27/32
25
Petrophysics
6.2. Permeability calculation from pore space detection
A series of reservoir rock samples is measured on porosity and permeability.The results are plotted in figure 9
The following empirical relation is given :
Log K = C1 + C2*
With :
K = permeability (mD)
= porosity (ratio)
C1,C2 = constants
Two samples have been prepared for image analysis : 42.tif and 48.tif.
The viewfield of the microscope at the used magnification is 400 micron.Calibrate Qwin according to this information.
Define C1 and C2 from the graph.
Define for both pictures the bulk porosity:detect the pore space, use Measure Fieldfor porosity measurement choosing the bestparameter to represent porosity.
The bulk porosities measured in the laboratory are for 42.tif: 26 % and for 48.tif: 18 %. Do
they match with the image analysis results?Concerning the difference in measuring conditions, would you expect this result? What
are the most important influences in effect?
Find in the graph the related permeabilities according to your measured porosities.
The reservoir fluid has a high viscosity, so smaller pores are not involved in the fluidtransport (irreducible fluid). They found that all pores, smaller than 10 % of the average
pore size should be neglected for the pore-perm evaluation:
1. Separate the pore space into different pores by segmentationand eventually binary editingif necessary.
2. Measure the features such as: area, perimeter, length, width.3. Put the pore areas in a frequency distribution of the area (Measure Feature / Histogram/ Display). Experiment with the histogram properties for best results.
4. Read the average pore size, remove the pores with a size of (0.1 * average area) bydefining the correct From:field and, after clicking the Displaybutton, study the newhistogram result.
5. Measure the new porosity according to the defined boundarie conditions:Choose Measure Feature Accept, choose a new binary image, fill in the new areaboundaries, click Copy Accepted(only the pores representing the area boundaries arecopied into the chosen binary image), use Measure Fieldwith the new binary image tomeasure the porosity.
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
28/32
26
6. Recalculate the new permeability.Discuss the difference in permeability compared with the total-porosity-permeability:
which of the two are more reliable concerning the fluid flow condition in the reservoir?
When this 2-D permeability is considered, will the 3D-permeability probably be higher
or lower, and why ?
Figure 9
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
29/32
27
Appendix : Prints of the Images from the Exercises
Of image series sometimes only one picture is displayed (e.g. 330.tif)
Diamant.tif
Ilmeniet.tif
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
30/32
28
Zeef.tif
395.tif
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
31/32
29
330.tif
42.tif
8/12/2019 Inleiding-quanti Beeldanalyse Sept2011(1)
32/32
00.tif
48.tif