Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 -...

111
monday tuesday wednesday thursday friday volumes segmentation grain size shape & strain FFT & ACF 9:00 session 1 1 st day start at 10:00 introduction overview course organization image model point operations POP segmentation by POP grain size 3D to 2D size distributions GSD grain size mapping (Lazy grain size map) raster to outline (Lazy digitize) digitizing artefacts (scasmo) spatial frequency Fourier transforms FFT frequency filtering 10:30 break 11:00 session 2 digital images Image SXM intro look-up tables (Lazy LUTs) scale - calibrate re-size LAB SESSION make stack: phase map - grain map - gb map segmentation & structural filtering (Lazy erode dilate) 2D to 3D Kaleidagraph: prepare histograms stripstar examples particle shape, axes particle orientation (paror) bulk fabric Kaleidgraph: plot results autocorrelation function (ACF) (Lazy ACF) 12:30 lunch break 13:30 session 3 pre-process: noise filter background corrections (Lazy lighting) segmentation by LUT copy - image math contiguous phase stack neighbourhood operations NOP averaging filters gradient filters segmentation by NOP (Lazy grain boundaries) fractal GSDs GSD mapping (Lazy D-map) surface orientation (surfor) bulk fabric - strain individual shapes of particles (ishapes) various shape factors open session special topics projects 15:00 break 15.30 session 4 volume estimation (Lazy LUTs) stereology basics Image SXM: Analyze menu Kaleidagraph: plot data LAB SESSION grain size analysis LAB SESSION: surfor and paror analyses discussion final wrap-up course evaluation 17:00 end of day Image Analysis in Geosciences where? University of Minnesota Renée Heilbronner when? April, 27 - May, 1, 2015 TWIN CITIES WORKSHOP This short course is designed to familiarize the participants with methods of image processing and to provide sufficient background to be able carry out a number of different microstructural analyses. Two basic types of image analysis are introduced: - direct analysis of images without segmentation, - analysis of segmented images (bitmaps), best fit objects or outlines. Depending on the audience, additional special techniques may be introduced at any point in the course. WEB INFO http://earth.unibas.ch/micro/ SCHEDULE TEXT BOOK Heilbronner, R. and Barrett, S.D.: ‘Image Analysis in Earth Sciences’, Springer Verlag, Heidelberg, 2013. ISBN 978-3-642-10342-1 SOFTWARE Image SXM (Mac) and/or ImageJ / Fiji (Mac and PC) Spreadsheet Program Plot Software

Transcript of Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 -...

Page 1: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

monday tuesday wednesday thursday friday

volumes segmentation grain size shape & strain FFT & ACF

9:00session 1 1st day start at 10:00

introductionoverviewcourse organization

image modelpoint operations POPsegmentation by POP

grain size3D to 2Dsize distributions GSDgrain size mapping(Lazy grain size map)

raster to outline(Lazy digitize)digitizing artefacts(scasmo)

spatial frequencyFourier transformsFFTfrequency filtering

10:30 breakbreakbreakbreakbreak

11:00session 2

digital imagesImage SXM introlook-up tables(Lazy LUTs)scale - calibratere-size

LAB SESSIONmake stack: phase map - grain map - gb mapsegmentation &structural filtering(Lazy erode dilate)

2D to 3DKaleidagraph:prepare histogramsstripstarexamples

particle shape, axesparticle orientation(paror)bulk fabricKaleidgraph:plot results

autocorrelation function (ACF)(Lazy ACF)

12:30 lunch breaklunch breaklunch breaklunch breaklunch break

13:30session 3

pre-process: noise filter background corrections(Lazy lighting)segmentation by LUTcopy - image mathcontiguous phase stack

neighbourhood operations NOPaveraging filtersgradient filterssegmentation by NOP(Lazy grain boundaries)

fractal GSDsGSD mapping(Lazy D-map)

surface orientation(surfor)bulk fabric - strainindividual shapes of particles (ishapes)various shape factors

open session special topicsprojects

15:00 breakbreakbreakbreakbreak

15.30session 4

volume estimation(Lazy LUTs)stereology basics

Image SXM: Analyze menuKaleidagraph:plot data

LAB SESSIONgrain size analysis

LAB SESSION:surfor and paror analyses

discussionfinal wrap-upcourse evaluation

17:00 end of dayend of dayend of dayend of dayend of day

Image Analysis in Geosciences

where?University of Minnesota

Renée Heilbronner

when?April, 27 - May, 1, 2015

TWIN CITIES WORKSHOPThis short course is designed to familiarize the participants with methods of image processing and to provide sufficient background to be able carry out a number of different microstructural analyses.

Two basic types of image analysis are introduced: - direct analysis of images without segmentation, - analysis of segmented images (bitmaps), best fit objects or outlines.

Depending on the audience, additional special techniques may be introduced at any point in the course.

WEB INFOhttp://earth.unibas.ch/micro/

SCHEDULE

TEXT BOOKHeilbronner, R. and Barrett, S.D.: ‘Image Analysis in Earth Sciences’, Springer Verlag, Heidelberg, 2013.ISBN 978-3-642-10342-1

SOFTWAREImage SXM (Mac) and/or ImageJ / Fiji (Mac and PC)Spreadsheet ProgramPlot Software

Page 2: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

DAY 1 - 'look at the data'• scale, calibrate, re-size, visualize• histograms, profiles, LUTs• morphological operations• from element maps to phase maps• volume estimates

DAY 2 - 'image analysis basics'• segmentation image → bitmap

POP, NOP, edge detectors• image analysis of segments, best fit ellipses• re-direct sampling• property mapping• texture mapping

DAY 3 - 'all about grain size'• 2D grain size / grain size distribution• 3D grain size / grain size distribution• fractal grain size distribution

DAY 4 - 'all about shape'• paror - orientation of particles• surfor - orientation of surface• ishapes - shapedescriptors

DAY 5 - 'spatial aspects'• FFT - spatial frequencies• ACF - neighbourhood relations• spatial distributions

Page 3: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

scheduleMonday Tuesday Wednesday Thursday Friday

9 204 121

10 121 204 121 121 209

11 121 204 121 209

12 121 121 209

13 121

14 121 121 20914121

121121

121 209

15121

121121

121 20915121

121204

121 209

16121

121204

121 20916121

121204

121 209

17121 204

17

Page 4: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

the software

Page 5: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Image SXM (Pascal)MacOSX - software used in workshop: http://www.liv.ac.uk/~sdb/ImageSXM/

Image SXM is a version of the public domain image analysis software NIH Image that has been extended to handle the loading, display and analysis of scanning microscope images. Image SXM supports SAM, SCM, SEM, SFM, SLM, SNOM, SPM and STM images

Page 6: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Fiji - imageJ (Java)can be used with Mac and PC: http://fiji.sc/wiki/index.php/Fiji

Page 7: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

FABRIC and GRAINSIZEFortran programs: paror, surfor, ishapes, stripstarhttp://earth.unibas.ch/micro → Software Download

http://earth.unibas.ch/micro → Textbook: corrected figures

Page 8: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Additional softwareSpread sheet

Raster graphics

Kaleidagraphhttp://www.synergy.com/KaleidaGraph 4.5 for Windows and Macintosh

SciDAVis - Scientific Data Analysis and Visualizationhttp://scidavis.sourceforge.net/

Adobe Photoshophttp://www.adobe.com

gimp - GNU image manipulation programcan be used with Mac and PC: http://www.gimp.org/

Page 9: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

day 1

Page 10: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

seeing images

Page 11: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

what is an image ?

René Magritte: La trahison des images (1928–1929)

Page 12: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

now you see it ....

... but the computer does not

Page 13: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

... now you don’t

... but the computer does

Page 14: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

what the computer ‘sees’ ...

... is not what we see

Page 15: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

image analysis

Page 16: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

image analysis ←→ image processing

image → image

image → number

Page 17: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

type 1 - direct image analysis

2550

no. o

f pix

els

grey value

grey

val

ue

traverse 5000 px

ACF

Page 18: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

type 2 - analysis of segments

peri

met

er (

px)

d equivalent

π3.99

px

px

px

Page 19: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

type 3 - analysis of best-fit ellipses

0.65

1.00

px

(°)

Page 20: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

type 4 - analysis of outlines

0.83

90°

180°

90°

180°

particle ODF

surface ODF

Page 21: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

digital image

Page 22: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

the digital image

Page 23: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

analog - digital discretization

X

Y

x

y

x

y

g

X

Y

G

Page 24: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

pixel = picture element

bit or byte

1 bit image:! bitmap

8 bit (byte) image:! greyscale! monochrome

Abbreviations:

bit! bbyte! B, kB, MB, GB

Bits and bytes 28 = 2560 1

2 = 2 values1bit

or

1 1 1 0 1 0 0 1

2 = 256 values8byte

example (decimal = 233):

27 2

6 2

5 2

4 2

3 2

2 2

1 2

0

D 9

161 160 162 = 256 values

digits: 0123456789ABCDEFhexadecimal

Page 25: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

R G B C M Y

400-500 nm

500-600 nm

600-700 nmwav

elen

gth

color systems

additivelight mixing

subtractivepigment mixing

Page 26: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

inspecting the imagepresenting the data

Page 27: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

element maps

quartz! SiO2

plagioclase! Na0.8Ca0.2Al1.2Si2.8O8

K-feldspar! KAlSi3O8

muscovite! K(Al)2AlSi3O10OH2

biotite! K(Fe,Mg)3AlSi3O10OH2

apatite! Ca10(PO4)6(OH)2

Al Ca Fe K Mg Na Si

qtz ++

pl + ++ ±

kfs + ++ ±

ms + - + ± -

bt ++ ++ ++ -

ap ++

Al

Ca

Fe

K

Mg

Na

Si

Page 28: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

scale and calibrate25 px = 100 µmscale XY

calibrate ZFiji

SXM

Page 29: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

compare maps

Mg < Fe

Fe

Mg

Mg - Fe

Mg / Fe

Image SXMProcess Image Math...

Page 30: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

compare maps

K - Si

K mean 37%

Si mean 63%

Si - K real

Si - K

K inverted

Image SXMProcess Image Math...

Page 31: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

differenceFijiProcess Image Calculator...Operation: Difference

Fe

Mg

K

Si

Page 32: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

from element maps to phase maps

RGB = Al - K - Na RGB = Al - Fe - K

RGB = Al - K - Na grouped RGB = Al - Fe - K grouped

Page 33: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

exerciseRGB phase maps

Page 34: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

exercise

1. open color edx maps - make gray scale2. observe histograms - profiles3. scale - calibrate4. pre-process - median - mean shift (ImageJ)

5. combine to stack6. make RGB - play with contrast - invert etc.

7. open maps again8. make binary: 2 levels9. combine to stack - RGB - etc.

10. use Lazy LUT: three levels11. combine to stack - RGB - etc.

Page 35: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

LUT & POP segmentation

Page 36: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

LUT to POP - ThresholdG

Vvi

ew

GVmatrix

Page 37: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

LUT to POP - Density Slice

Apply LUT (⌘L) - SXM onlyG

Vvi

ew

GVmatrix

Page 38: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

LUT to POP - Density SliceG

Vvi

ew

GVmatrix

Apply LUT (⌘L) - SXM only

Page 39: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

LUT → GVnew = f (GVold) → POP

Apply LUT

Point operation: GVnew = f (GVold)

GVnew = 1(=255) if (lower<GVold<upper)GVnew = 0 if GVold<lowerGVnew = 0 if GVold>upper

GVold GVnew

GV

new

GVold

GV

view

GVmatrix

POP

Page 40: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

pre-processlook at the data

Page 41: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

detail of mylonitic granite! SEM / BSE contrastimage size: ! 1424 x 1080 px! 1px = 0.24 µmresolution:! 100 grey values (of 256)! ~7 bit

Page 42: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

white biotite

light grey K- feldspar

light grey muscovite black boundaries, etc.

micrograph of mylonitic granite (Truzzo) 1424 x 1080 pixel SEM / Back scatter electron contrast

grey plagioclase dark grey quartz

Page 43: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

1 - biotite

2 - K- feldspar

3 - muscovite

4 - plagioclase

5 - quartz

6 -boundaries, holes, etc.

all phases

all phases

1 2 3 4 5 6

Page 44: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Profiles

1 - biotite

2 - K- feldspar

3 - muscovite

4 - plagioclase

5 - quartz

6 - boundaries, holes, etc.

Page 45: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

pre-processnoise removal

Page 46: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

pre-process: extract region of interest (ROI)

Page 47: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

detail( 8x )

SEM scanning artifactas recorded

6 - boundaries, holes, etc.1 - biotite 2 - K- feldspar

3 - muscovite4 - plagioclase

5 - quartz

1 2 3 4 5 6

Page 48: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

smoothing

1 - biotite 2 - K- feldspar

3 - muscovite4 - plagioclase

5 - quartz 6 - boundaries, holes, etc.

1 2 3 4 5 6

Page 49: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

ranking filters: Median

1 - biotite 2 - K- feldspar

3 - muscovite4 - plagioclase

5 - quartz 6 - boundaries, holes, etc.

1 2 3 4 5 6

Page 50: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Mean shift (imageJ - http://rsb.info.nih.gov/ij/plugins/mean-shift.html)

1 - biotite 2 - K- feldspar

3 - muscovite4 - plagioclase

5 - quartz 6 - boundaries, holes, etc.

1 2 3 4 5 6

Page 51: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

scale calibratere-size

Page 52: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

scale and calibrate ≠ re-size

scaling:! x = scaling factor · X ! y = scaling factor · Y ! scaling factor defines true size of pixel

calibrating:! gv = calibration · GV ! calibration defines true value of GVX, Y, GV = integerx, y, gv = real, but still discrete values ! image size (X· Y· depth) is unchanged

why scale ?• create image with certain pixel size: e.g.1024· 1024 for ACF or FFT• create image with certain resolution: e.g.10 px = 1 µm• create series of images with identical true size: e.g. 10 · 6 mm2

why calibrate ?• create image with certain pixel size: e.g.1024· 1024 for ACF or FFT• create image with certain resolution: e.g.10 px = 1 µm• create series of images with identical true size: e.g. 10 · 6 mm2

Page 53: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

why re-size ?

achieve given magnification: e.g 2 px / µmcheck scale ! (= 1.46 px/µm) => factor = 2 / 1.46 = 1.37click ⌘E! Horizontal Scale = 1.37 (Vertical Scale is the same)

achieve given matrix size: e.g. shortest dimension ≥ 512, 1024, ... (for FFT or ACF)select ROI! (= 412 px high) => factor = 512 / 412 = 1.25click ⌘E! Horizontal Scale = 1.25 (Vertical Scale is the same)

achieve complete histogram / noise reduction without changing size:click ⌘E! Horizontal Scale = 1.25 bicubicclick ⌘E! Horizontal Scale = 0.80 bicubic interpolation

original enhanced re-sizedenhanced re-sized

Page 54: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

scale (X,Y)

select line tool

place line on scale

Analyze

Page 55: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

calibrate (Z)

Analyze1. Reset2. Measure 2 sites3. Calibrate...

! scaled! calibrated

Page 56: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

remove scaling calibration

Analyze

press <alt> key

Page 57: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Edit

re-size imageNN (2x)

bilin (2x)

bicub (2x)

original (1x)

( ⌘E )

( ⌘A )

NN

bilin

bicub

Page 58: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

changing image size

image size = 712· 5042.06 px = 1 µm

image size = 356· 2521.03 px = 1 µm

changing image size affects scalingbut does not change real size

Page 59: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

change of image size BILINEAR

0.64x bilin

original

Page 60: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

change of image size BICUBICoriginal

0.64x bicubic

Page 61: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

0.8x 0.8x bilin

progressive change of image sizeoriginal

Page 62: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

size change by 'equal temperament'

M =! desired final magnifications = ! number of stepsm =! magnification at each step

chromatic scale: halftone 'magnification' √ 2 = 1.05946 (12 halftones/octave)12

Johann Sebastian Bach

'Das wohl-temperierte Klavier'

(wikipedia)

m = √ Ms

m = √ 0.5 = 2 times 0.707 2

m = √ 4 = 5 times 1.3195 5

Page 63: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

0.5x bilin

0.7x 0.7x bilin

cascadedirect

original

progressive change of image size

Page 64: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Profiles

2 - K- feldspar3 - muscovite

4 - plagioclase 5 - quartz

1 - biotite

6 - holes etc.

original

Page 65: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Profiles

2 - K- feldspar3 - muscovite

4 - plagioclase 5 - quartz

1 - biotite

6 - holes etc.

x 1.25 bilinx 0.80 bilin

Page 66: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Profiles

2 - K- feldspar3 - muscovite

4 - plagioclase 5 - quartz

1 - biotite

6 - holes etc.

x 1.25 bilinx 0.80 bilinsmoothed

Page 67: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

background corrections

Page 68: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Image SXM! menu item! action

Process! Subtract Background:!! 1D horizontal! line by line! 1D vertical! column by column! 2D rolling ball! subtract smooth topography

SPM! Compensations:! Line-by-line constant! Line-by-line linear! Line-by-line quadratic

Process! Image Math:! flatten ! Division! (divide by background image)

Macros! Lazy lighting! flatten! ! (subtract ideal background)

background corrections

Page 69: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

original 1D horizontal 1D vertical

Rolling Ball FAST Rolling Ball

Radius = 200image size 325· 250

Process... Subtract Background

Page 70: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

original Line-by-line constant Line-by-line linear

Line-by-line quadratic 1x hor 1x rotated

image size 325· 250

SPM... Compensation

Page 71: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

camera LUT applied:cirpolCAL

circular polarization background divide real:cirpol / background

subtract real: cirpolCAL - backCAL

camera LUT applied:backCAL

Process... Image Math

Page 72: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

backgroundoblique illumination

central light dome

model background

Page 73: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Lazy lighting

Page 74: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

correct top-bottom [F]Correct linear brightness trend

Lazy lighting

Page 75: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

select center [S] correct light [C]Correct radial brightness trend

Lazy lighting

Page 76: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

grey level slicinglive segmentation

Page 77: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

density slicing tool

Density Slicing

Page 78: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Density Slicing = Threshold in imageJ

Page 79: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Density Slicing/Threshold in imageJ

Page 80: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Density Slicing/Threshold in imageJ

0 and 255 can be selected(≠ Image SXM)

Page 81: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

grad

ient

2 - K- feldspar

Density Slicing

Page 82: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

3 - muscovite

Density Slicing

Page 83: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

scanning artefact

4 - plagioclase

Density Slicing

Page 84: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

5 - quartz

Density Slicing

Page 85: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

boundaries, holes, etc.

Density Slicing

Page 86: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

?!➡

1 - biotite

Density Slicing

Page 87: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

1 - biotite

Density Slicing

Page 88: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

add 1

1 - biotite

Density Slicing

Page 89: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

separate phases

Lazy LUT

Page 90: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

separate phases

Lazy LUT

Page 91: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

separate phases

Lazy LUT

Page 92: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

volume estimation

Page 93: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

live segmentation

25 78 106 158 200

qtzplmskfsbt rest

gb

grey level

Page 94: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

direct phase area estimate

plagioclase

pl

qtz gbkfs ms bt

Page 95: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

stereology basics

Page 96: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

+ ++ +

+ ++ +

+ ++ +

+ ++ +

point counting A

A!=! A / Atotal != area fraction

PP! =! P / Ptotal ! = point fraction

AA!=! PP

black : grey : white = 37.5 : 25 : 37.5 (%)

counting pixels A

A!=! A / Atotal ! = area fraction

##!=! # / #total ! = pixel fraction

AA!=! ##

black : grey : white = 33.03 : 27.12 : 39.84 (%)

determine estimate area fraction (%)

Page 97: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

find volume %

x

y

α

Atot

z

y

Δz

Vtot

ΔV

α

VV

= Vphase α / Vtotal

find volume fraction from area fraction Aα of phase α in image (x-y plane)

Page 98: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

! Volume of phase α:ΔVα = Aα(z) Δz ! (1)! ΔVα in slice Δz (→Cavallieri)Vα = Σ ΔV = ∫ dVα = ∫ Aα(z) dz! (2)! Vα = ΣΔV = area under curve Aα(z)∫ Aα(z) dz = Z·Āα! (3) ! area under curve = mean area Āα times ZVα = Z·Āα! (4) ! combine equation (2) and (3)Vtot = Z· Atot! (5)! total volume

! Volume fraction of phase α:Vα / Vtot = (Z·Āα) / Vtot! (6)! dividing by total volume(Z·Āα) / Vtot = Āα /(Vtot/ Z)! (7)! rewrite (6)Vα / Vtot = Āα / Atot! (8)! rewrite (6) ⇒ VV = AA

z

Atot

Aα(z)

dzz

y

Δz

Vtot

ΔV

α

y

α

Atot

xZ

Page 99: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

Basic stereologic equation:

VV = AA = LL = PP! (dimensionless)

(for proof, see Underwood, 1970, Quantitative Stereology, Addison-Wesley)

determine volume %

Also:! S V = (4/π)· LA = 2PL! (mm-1)

! L V = 2PA! (mm -2)

! P V = 1/2· LVSV! (mm -3)

Page 100: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

pixel fraction ## = AAAA = VV

volume % = area % = pixel %

7.25bt

20.75kfs

2.23ms

40.41pl

29.38qtz

100.0sum

area%= vol%

Page 101: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

error estimation

Page 102: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

- distribution of phase is random - location of phases independent of each other ! (= diluted system)- (regular) grid point spacing >> cross sectional

area of phase (systematic point count)

σ(PP) / PP = 1/√Pα

(Underwood, 1970)

! P = total number of points on grid! Pα = total number of points on phase α

error for point counting

Page 103: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

error for area measurement by pixel#

(1) quick and dirty estimation:

- must not set Pα = # of pixel !!!- assume constant size of a, i.e., σ(a) = 0- replace Pα with number of cross sections N (one estimated value N for all phases)

! N = total number of cross sectional areas

relative error:σ(AA) / AA ≈ 1/√N

Page 104: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

error for area measurement by pixel#

(2) for constant size of cross sectional areas:

- assume constant size of a: σ(a) = 0- replace Pα with number of cross sections Nα

! Nα! number of α-areas

relative error:σ(AA) / AA = 1/√Nα

Page 105: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

error for area measurement by pixel#

relative error:σ(AA)/AA= 1/√Nα· √([σ(a)/ā]2+1)

(3) for variable size a:

- assume constant size of a: σ(a) > 0- replace Pα with number of cross sections Nα

! Nα! number of α-areas! a! size of α-areas! ā! average size of α-areas

Page 106: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

count or estimate number of particlesN = 167N ≠ #px = 710· 500 = 355'000

example

167

Page 107: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

for all phases N = 167error = 1 / √ ( N) = 1 / √ (167) = 7.8 %⇒ quartz content = 29.4 ± 2.3 %

σ(AA) / AA = 1/√Nerror from number of cross sectional areas

for individual phases (example quartz: N = 47)error = 1 / √ ( Nα) = 14.6 %⇒ quartz content = 29.4 ± 4.3 %

7.25bt

20.75kfs

2.23ms

40.41pl

29.38qtz

100sum

area%

error for area measurement (pixel#)

Page 108: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

error from standard deviation of areas

σ(AA)/AA= 1/√Nα· √([σ(a) / ā]2 + 1)

for individual phases (example quartz: N = 47)error = 1/√Nα· √([σ(a) / ā]2 + 1) = 14.6 % · √(0.4342 + 1)error = 14.6 % · 1.41 = 20.6 %⇒ quartz content = 29.4 ± 6.1 %

error for area measurement (pixel#)7.25bt

20.75kfs

2.23ms

40.41pl

29.38qtz

100sum

area%

Page 109: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

error estimates for phases

phase area

(%)

particles

N

rel. error

1/√N

1/√Ntot

±(%)

1/√Nphase

±(%)

1/√Nphase √([σ(a)/ā]2+1)

±(%)

bt 7.25 15 0.258 0.56 1.87 4.00

kfs 20.73 32 0.177 1.60 3.67 5.82

ms 2.23 7 0.378 0.17 0.84 1.21

pl 40.41 66 0.123 3.13 4.97 9.11

qtz 29.38 47 0.146 2.27 4.29 6.06

all 100.00 167 0.077 7.74 7.74 12.96

±(%) = ± phase percentage

Page 110: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

exercisestereology

Page 111: Image Analysis in Geosciences - micro.earth.unibas.ch• fractal grain size distribution DAY 4 - 'all about shape' • paror - orientation of particles • surfor - orientation of

exercise

1. open Truzzo2. pre-process (noise) - background - re-size - crop3. save

4. Lazy LUT: separate phases (Z-space)5. measure area% (live)

6. make phase stack7. morphological filtering

8. estimate phase%9. determine errors