IMAGE ANALYSIS IN EARTH [email protected], www.unibas.ch/earth/micro
LECTURES
• Applications of image analysis techniques to naturally and experimentally deformed rocks
• Quantitative analysis of crystallographic preferred orientations using Optical Orientation Imaging
•••• Introduction & pre-processing• Segmentation I & volume analysis• Segmentation II & grain size analysis• Shape analysis• Autocorrelation function
SHORT COURSE
IMAGE ANALYSIS versus IMAGE PROCESSING
image processing: image image
source: results:
IMAGE ANALYSIS versus IMAGE PROCESSING
image analysis: image number(s)
source: results:
0 %
5 %
10 %
15 %
20 %
25 %
30 %
h(r)(%)
0
50
100
150
200
250
300
350
0 10 20 30 40 50
y = 4.3885 + 6.8524x R= 0.98784
RADIUS
PERIPHERY
1
2
3
4
software
NIH Image (OS9) / Scion Image (PC)
software
NIH Image (OS9) / Scion Image (PC)
NIH Image is a public domain image processing and analysis program for the Macintosh.
It was developed at the Research Services Branch (RSB) of the National Institute of Mental Health (NIMH), part of the National Institutes of Health (NIH).
A free PC version of Image, called Scion Image for Windows, is available from Scion Corporation.
There is also ImageJ, a Java program inspired by Image that "runs anywhere".
software
NIH Image (OS9) / Scion Image (PC)
BASIC FEATURES
free
widely supported
= basically mono / index color≠ RGB
macros (Pascal)
software
5
6
7
8
NIH Image (OS9) / Scion Image (PC)
Image can acquire, display, edit, enhance, analyze and animate images. It reads and writes TIFF, PICT, PICS and MacPaint files, providing compatibility with many other applications, including programs for scanning, processing, editing, publishing and analyzing images. It supports many standard image processing functions, including contrast enhancement, density profiling, smoothing, sharpening, edge detection, median filtering, and spatial convolution with user defined kernels.
Image can be used to measure area, mean, centroid, perimeter, etc. of user defined regions of interest. It also performs automated particle analysis and provides tools for measuring path lengths and angles. Spatial calibration is supported to provide real world area and length measurements. Density calibration can be done against radiation or optical density standards using user specified units. Results can be printed, exported to text files, or copied to the Clipboard.
A tool palette supports editing of color and gray scale images, including the ability to draw lines, rectangles and text. It can flip, rotate, invert and scale selections. It supports multiple windows and 8 levels of magnification. All editing, filtering, and measurement functions operate at any level of magnification and are undoable.
software
links
THE SOFTWARE
NIH Image original for Macintosh OS9author: Wayne Rasband (source = Pascal)
Scion Image version for PC / Windows
Image SXM NIH Image adapted/expanded for OSXauthor: Steve Barrett
imageJ Java versionauthor: Wayne Rasband
links
DOWNLOADS AND INFO
NIH Image http://rsb.info.nih.gov/nih-image/
Scion Image http://www.scioncorp.com
Image SXM http://reg.ssci.liv.ac.uk/
imageJ http://rsb.info.nih.gov/ij/
on-line manual for NIH Image/Scion Image + Image SXMhttp://rsb.info.nih.gov/nih-image/manual/contents.html
macros and docus for NIH Image/Scion Image + Image SXMftp://rsbweb.nih.gov/pub/nih-image/macros/ftp://rsbweb.nih.gov/pub/nih-image/documents/
links
9
10
11
12
NIH Image web-manual: contents.html
links
HOME PAGEDeformation and microstructure analysishttp://www.unibas.ch/earth/micro/
links
HOME PAGEDeformation and microstructure analysishttp://www.unibas.ch/earth/micro/
links
COURSE MATERIAL
http://www.unibas.ch/earth/micro/course/workshop.html
links
13
14
15
16
introduction
FILE: open / import fileopen:formatted file(file size in header)
import:raw data file(have to set file size)
Introduction to NIH Image / Scion Image
FILE: save / export filesave:formatted file(choose format)(file name extension!)
export:raw data file(choose file type)
Introduction to NIH Image / Scion Image
FILE: get info
Introduction to NIH Image / Scion Image
17
18
19
20
WINDOWS: LUT - Tools - Map - Info - Histogram
Windows (always open):
LUTlook-up table
Tools MapB Brightness (offset)C Contrast (slope)
InfoX,Y: LocationValue: Grey value
0 = white255 = black
Additional window:
Histogram (⌘H)no. of pixels / grey value
Introduction to NIH Image / Scion Image
EDIT: select / copy / cut / paste
Select (use selection tool or Select All (⌘A))
Copy (⌘C)
Cut (⌘X) Move Selection(use cursor or arrows)
Paste (⌘V) Draw boundary (⌘B)(draws line along active selection)
Introduction to NIH Image / Scion Image
FILE / EDIT: make grey scale
EDIT:
Select All (⌘A)
Draw Scale
PLOT PROFILE:
Tools: Select horizontal traceby pressing shift key
HISTOGRAM (⌘H)
shows 50 pixels for every grey value
FILE:
New...width = 254height = 50
Aim:create scale withall grey levels (G)
Background:theoretically:( 0 < G < 255)= 256 = 28 grey values
but 0 and 255 arereserved entries=> (256-2) grey values=> width = 254
Introduction to NIH Image / Scion Image
EDIT: scale/rotate
EDIT:
Scale and Rotate (⌘E)Interpolation method: left: bilinear (smooth) right: nearest neighbor
Introduction to NIH Image / Scion Image
21
22
23
24
EDIT: flip horizontal/vertical - Invert
EDIT:
Scale and Rotate (⌘E)scale: 0.50rotate: 45°
EDIT:
Flip horizontal
EDIT:
Invert
Introduction to NIH Image / Scion Image
look-up tables (LUT)
LUT: use tool or option tool
MAP: use B / C
OPTION: Look-up tableLUT optionsThresholdDensity slice
PROCESS: Enhance contrastEqualize
MACRO: Lazy starter LUTs etc.
NOTE: LUT operations do not affect grey values of image
look-up tables (LUT)
input
output
Look-up Tables
0 input gray value1 grayscale = default = 1:12 System LUT3 Rainbow4 Spectrum5 Fire-1, LUT option 16grayscales
5 4 3 2 1
0
Map / LUTTransfer curve
image is not changed
LUTs - transfer curve - contrast
look-up tables (LUT)
25
26
27
28
look-up tables (LUT)
EDIT: open oolite400.tif
LUT: use tool or option tool
look-up tables (LUT)
MAP: use B / C
look-up tables (LUT)
OPTION: Look-up table
look-up tables (LUT)
rainbow
29
30
31
32
OPTION: LUT options
look-up tables (LUT)
OPTION: Threshold
look-up tables (LUT)
OPTION: Density slice
look-up tables (LUT)
PROCESS: Enhance contrast
look-up tables (LUT)
33
34
35
36
PROCESS: Equalize
look-up tables (LUT)
Lazy starter LUTs
SPECIAL: Load macro "Lazy starter LUTs”
macro 'Invert LUT [I]';var i:integer;begin for i:=1 to 254 do begin RedLUT[i]:=255-RedLut[i]; GreenLUT[i]:=255-GreenLut[i]; BlueLUT[i]:=255-BlueLut[i]; end; UpdateLUT;end;
macro 'Log Transform';var i,v:integer; scale:real;BEGIN scale := 255.0 / ln(255.0); for i:=1 to 254 DO begin v := 255-round(ln(i) * scale); RedLUT[i]:=v; GreenLUT[i]:=v; BlueLUT[i]:=v; end; UpdateLUT;END;
etc.....
macro: Lazy starter LUTs
Plot LUT [P]
R
G
B
input (index): optical density:0 = white 255 = blackoutput: brightness:255 = white 0 = black
macro: Lazy starter LUTs
37
38
39
40
Plot LUT [P]
R
G
B
R Y G C B M R
macro: Lazy starter LUTs
Invert LUT [I]
macro: Lazy starter LUTs
Log transform
macro: Lazy starter LUTs
Gamma transform...
macro: Lazy starter LUTs
41
42
43
44
Square transform
macro: Lazy starter LUTs
Parabolic transform
macro: Lazy starter LUTs
Square root transform
macro: Lazy starter LUTs
Sine transform
macro: Lazy starter LUTs
45
46
47
48
Half-sine transform
macro: Lazy starter LUTs
Posterize...
macro: Lazy starter LUTs
Colour strips
macro: Lazy starter LUTs
Make four ramp LUT
macro: Lazy starter LUTs
49
50
51
52
Change One LUT Entry
macro: Lazy starter LUTs
Change LUT from ... to ...
macro: Lazy starter LUTs
pre-processing
1. record image
2. segment
3. analyze
4.
...not so easy...
GENERAL IDEA:
pre-processing
53
54
55
56
1. record image
2. pre-process1. contrast
2. background
3. sharpen
4. scale
3. segment
4. analyze
scale, bckg, +yellow (-blue), sharpen
scale, bckg, sharpen
crop, scale, +yellow (-blue)
scale, +red (-cyan)
pre-processing
CONTRAST: SPECIAL 1D LUT calibration
BACKGROUND: PROCESS Subtract background- 1D horizontal- 1D vertical- 2D rolling ball- 2D remove streaks
PROCESS Image Math
SPECIAL Lazy lighting
SHARPEN: PROCESS SmoothSharpen
SCALE: ANALYZE Set scale...
pre-processing
CONTRAST: SPECIAL 1D LUT calibration
pre-processing
applyLUT
SCALE: ANALYZE Set scale...
pre-processing
57
58
59
60
BACKGROUND: PROCESS Subtract background- 1D horizontal- 1D vertical- 2D rolling ball- 2D remove streaks
pre-processing
Lazy lighting
macro: Lazy lighting
SPECIAL: Load macro "Lazy lighting”
histogram left [A] histogram right [Z]Determine average brightness
macro: Lazy lighting
61
62
63
64
histogram top [T] histogram bottom [B]
macro: Lazy lighting
Determine average brightness
correct top-bottom [F]Correct linear brightness trend
macro: Lazy lighting
select center [S] correct light [C]Correct radial brightness trend
macro: Lazy lighting
Results of background correction
macro: Lazy lighting
65
66
67
68
Top Related