Post on 28-Mar-2015
5th Intensive Course on Soil Micromorphology
Naples 2001
12th - 14th September
Image Analysis
Lecture 8
Introduction to Binary Morphology
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
•Erosion/Dilation
•Opening/Closing
•Kernel Shapes
Applications in Particle / Void Size Distribution
Introduction to Binary Morphology Methods
Requires Segmentation of Image into Binary Form
(may require manual editting).
Foreground pixels are coded 1 - background 0
i.e. Particles 1 (white), voids 0 (black)or Voids 1 (white), particles 0 (black)
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Erosion
strips one layer of foreground pixels at edges of particles
criteria
based on number of surrounding background pixels
can be any number 1 - 8
pixel of interest is redwhite - foregroundblack - background
a) 8 pixels b) 7 pixels
c) 6 pixels d) 5 pixels
e) 4 pixels f) 3 pixels
g) 2 pixels h) 1 pixel
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
a) foreground pixel removed for all criteria.
h) foreground pixel removed only if criteria is set to 1 pixel.
a) 8 pixels
h) 1 pixel
Criteria may also specify that diagonal erosion is (or is not permitted).
Erosion not permitted if diagonals not allowed in (j)
i) j)
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
4 - point connectivity 8 - point connectivity
Connectivity:
4 - point connectivity
allows connection only up/down and side to side
8 - point connectivity
allows connection on diagonals
In 4 - point connectivity, foreground and background are uniquely separated.
In 8 - point connectivity is background or foreground continuous across diagonal? Both are not possible
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Erosion of original by one layer
criterion - a single touching background pixel
4 - point connectivity8 - point connectivity
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Erosion by 2 and 3 layers
4 - point connectivity
Some residual parts of largest particle remain.
Erosion by 2 and 3 layers
8 - point connectivity
All foreground features will disappear.
Until particles disappear the residues are less rough
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Dilation
- the reverse of erosion
Once again similar criteria apply
8 - point connectivity
4 - point connectivity
Individual features will merge
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
X
X
X
X X
X
X
X X
8 - point connectivity erosion
Equivalent to passing a 3 x 3 kernel over binary image.
Where central point of kernel hits background, all pixels covered by kernel are set to background
X
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
4 - point connectivity erosion
Equivalent to passing a 3 x 3 kernel over binary image.
Where central point of kernel hits background, all pixels covered by kernel are set to background
X
X
X X
X X
X
X
X X
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Non-standard Kernels may be used for special effects
X
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Consider effect of one erosion followed by one dilation.
This is known as an “OPENING”
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Red: Residual after erosion
Yellow: Recovered after dilation
Blue: Complete particles lost
Green: Roughness lost on large particles
Using careful housekeeping it is
possible to identify proportion of
particles lost completely and
“roughness” lost from large
particles.
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
2 cycles of erosion
(8 - point connectivity)
2 cycles of erosion followed by 2 cycles of dilation
(8 - point connectivity)
Components of “opening” - see next slide
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Light Green: Roughness cycle 1
Dark Green: Roughness cycle 2
Red: Residue after 2 cycles
Yellow: Recovery cycle 1
Orange: Recovery cycle 2
Blue: Particles lost cycle 1
Purple: Particles lost cycle 2
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
2 cycles of 3 x 3 kernel are equivalent to 1 cycle by a 5 x 5 kernel.
Can be used for efficiency
Alternative kernel for 5 x 5 which approximates more closely to a circle (i.e. corner pixels are omitted)
Kernel for 3 cycles giving a good approximation to a circle / octagon).
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Standard Kernels for 9 x 9 array
These 4 shapes can be propagated to any size
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Procedure for feature size analysis
•Erode n cycles•Dilate n cycles
•Determine pixels lost as roughness
•Determine pixels lost from particles which disappear
n = 1
Are particle residues left
Yes
No
n = n + 1
Summarise results
Schematic Representation of one erosion and one dilation
Grey Level Image Binary Version
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
BINARY MORPHOLOGY
• During successive opening, features tend towards circles.
• At each stage, protrusions are lost and this loss is related to the shape and roughness of grains.
• Finally, the remaining feature is lost and this is related to the size of the feature.
• Careful housekeeping is needed to differentiate between two types of loss, but procedure is well established in some branches of microscopy.
The difficulty in achieving a reliable threshold makes the
method generally unsuitable for analysing images of cores.
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Binary Morphology used to determine Particle size Distribution
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Roundness
Often defined relating to sharpness of asperities on a grain
Sometimes roundness is defined by drawing circles,
but when exactly should on draw a circle?
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Grain is successively “opened” with different radii.
The lighter colours (yellow) show parts lost first.
Ultimately remainder of grain disappears when inscribed circle is as shown in blue.
If octagonal or square “structuring” elements are used, then grain degenerates to these shapes.
5th Intensive Course on Soil Micromorphology - Naples 2001Image Analysis - Lecture 8: Binary Morphology
Grain is successively subjected to “opening” of different radii.
The edge of the grain are shown in colour where light colours (e.g. yellow represent areas lost first - i.e. sharp), and dark colours (e.g. dark blue are lost last.
Can be used as a more objective measure of roundness.