Application Oriented Image Analysis
Lecture 2 - Digitization Maria Axelsson,
[email protected]
Reading instructions
Chapters for this lecture
2.2 – 2.6 in Gonzalez-Woods
2007-10-17
Maria Axelsson,
[email protected]
1
Questions
What is a digital image? How are resolution, sampling and quantization related? What is connectivity in a digital image? How can we measure distances in a digital image? ...
2007-10-17
Maria Axelsson,
[email protected]
2007-10-17
Maria Axelsson,
[email protected]
2
Signals for digital imaging
Visible light
IR and UV light X-ray
Radio waves
Gamma rays Microwaves
Tomography Magnetic Resonance Imaging
Electrons
Ultrasound ...
Not based on EM waves
Radar
2007-10-17
Digital camera Light microscope Confocal microscope
Scanning electron microscopy
Maria Axelsson,
[email protected]
Digital image - f(x,y) pixel - picture element x
y
⎛ ⎜ ⎜ ⎜ ⎜ ⎝
f ( 0,0)
f ( 0,1)
f ( 0,2 )
f (1,0)
f (1,1)
f (1,2 )
f ( 2 ,0) f ( 3,0)
f ( 2 ,1) f ( 3,1)
f ( 2 ,2 ) f ( 3,2 )
2007-10-17
f ( 0,3) ⎞ ⎟ f (1,3) ⎟ f ( 2 ,3)⎟ ⎟ f ( 3,3) ⎠
2 3 0 1 0 3
1 1 2 2 1 1
2 3
2 2
Maria Axelsson,
[email protected]
3
Sensors for digital imaging
To image something we need sensors that can capture the energy of the signal. There are specific types of sensors for all different signals that can be imaged Some important categories are
Single sensor
2007-10-17
Sensor strips
Sensor arrays
Maria Axelsson,
[email protected]
Sensors for digital imaging (cont)
The output from each sensor is a positive finite value proportional to the recieved energy The continious value needs to be possible to represent in a computer, it needs to be digitized.
Digitizing the coordinate values is called sampling
Digitizing the amplitude values is called quantization
2007-10-17
Maria Axelsson,
[email protected]
4
Resolution
Spatial resolution - sampling
Grey level resolution – quantization
2007-10-17
Maria Axelsson,
[email protected]
Sampling
Uniform sampling
Non-uniform sampling
Closer where it is necessary, eye.
Image size
Square grid, Rectangular grid, Hexagonal grid
128 x 128, 256 x 256, 512 x 512, 1024 x 1024
The sampling is normally determined by the sensor arrangement 2007-10-17
Maria Axelsson,
[email protected]
5
Spatial grids
Square Rectangular Hexagonal (Common) (z-direction in medical) (Theory)
2007-10-17
Maria Axelsson,
[email protected]
Sampling example
512
128
256
64
2007-10-17
32
Maria Axelsson,
[email protected]
6
Grey level resolution
Min = 0 Max = 2n – 1 Levels = 2n n
Levels
Comments
1
2
Binary
5
32
Eye
8
256
Common
16
65536
Medical
2007-10-17
2007-10-17
Maria Axelsson,
[email protected]
256
128
64
32
16
8
4
2
Maria Axelsson,
[email protected]
7
Dimensions
Image, 5-dimensions, f(x,y,z,t,b)
x, y, z – spatial
t – time b – spectral
2007-10-17
Maria Axelsson,
[email protected]
Volume – f(x,y,z)
HIV volume
Slice 40 2007-10-17
Slice 50
Slice 60
Maria Axelsson,
[email protected]
8
Spectral image – f(x,y,b)
Color image
Red
Blue
Green
2007-10-17
Maria Axelsson,
[email protected]
Neighbours Pixel p with coordinate (x,y)
N4(p): 4-neighbour ( x , y − 1) ( x − 1, y )
( x + 1, y ) ( x , y + 1)
2007-10-17
N8(p): 8-neighbour ( x − 1, y − 1) ( x , y − 1) ( x + 1, y − 1) ( x − 1, y ) ( x + 1, y ) ( x − 1, y + 1) ( x , y + 1) ( x + 1, y + 1) Maria Axelsson,
[email protected]
9
Connectivity, adjacency
Connection between pixels. 4- or 8-connectivity.
p and q 4-connected if q is in N4(p) with similar grey level. p and q 8-connected if q is in N8(p) with similar grey level
2007-10-17
Maria Axelsson,
[email protected]
Connectivity, examples
4-connectivity
2007-10-17
8-connectivity
Maria Axelsson,
[email protected]
10
Path
Sequence of adjacent pixels between A and B. A path can be 4- or 8-connected.
2007-10-17
Maria Axelsson,
[email protected]
Connected components
Object
Path between every pixel pair.
4- or 8-connectivity.
2007-10-17
Maria Axelsson,
[email protected]
11
Labeling
Giving each object a label. 4- or 8-connectivity.
Binary image 2007-10-17
Labeled image Maria Axelsson,
[email protected]
Algorithm
A – pixel of interest Pass 1
Pass 2
If A = 1 Give equivalent labels If B=0 AND C=0 one label. new label If B=1 (or C=1), let A=label of the B (C) If B=1 AND C=1 with same label let A= label of B If B=1 AND C=1 with different label let A=label of B, update equivalence table 2007-10-17
Maria Axelsson,
[email protected]
12
Exampel
Pass 1 2007-10-17
Pass 2 Maria Axelsson,
[email protected]
Measuring distance
Euclidean, square root of two
City-block, infinity (2 steps req. gives dist. 2)
Chessboard, one
2007-10-17
Maria Axelsson,
[email protected]
13
Reading instructions
Chapters for next lecture Point processes
3.1 – 3.4 in Gonzalez-Woods
2007-10-17
Maria Axelsson,
[email protected]
14