Professional Documents
Culture Documents
Binary
Gray Scale
Color
Binary Images
Y
1 1 1 1
Row 1
q
X
0: Black Row q
0 0 0 0 0
1: White p
Gray Level Image
10 5 9
100
Gray Scale Image
Color Image
Red, Green, Blue Channels
Image Histogram
Image Noise
Light Variations
Camera Electronics
Surface Reflectance
Lens
Image Noise
Gaussian Noise
n2
n x, y e 2 2
Image Derivatives & Averages
Definitions
df f ( x) f ( x x)
lim x 0 f ( x) f x
dx x
ds dv
v speed a acceleration
dt dt
Examples
y x2 x4 y sin x e x
dy dy
2 x 4 x3 cos x (1)e x
dx dx
Discrete Derivative
df f ( x) f ( x x)
lim x 0 f ( x)
dx x
df f ( x) f ( x 1)
f ( x)
dx 1
df
f ( x) f ( x 1) f ( x)
dx
Discrete Derivative
Finite Difference
df
f ( x) f ( x 1) f ( x) Backward difference
dx
df
f ( x) f ( x 1) f ( x) Forward difference
dx
df
f ( x 1) f ( x 1) f ( x) Central difference
dx
Example
f ( x) 10 15 10 10 25 20 20 20
f ( x) 0 5 5 0 15 5 0 0
f ( x) 0 5 10 5 15 20 5 0
Derivative Masks
Given function f ( x, y )
f ( x, y )
fx
Gradient vector f ( x, y ) f (xx, y )
fy
y
Gradient magnitude f ( x , y ) f x2 f y2
fx
Gradient direction tan 1
fy
Derivatives of Images
1 0 1 1 1 1
1 1
Derivative masks f x 1 0 1 f y 0 0 0
3 3
1 0 1 1 1 1
10 10 20 20 20 0 0 0 0 0
10 10 20 20 20 0 10 10 0 0
I 10 10 20 20 20 I x 0 10 10 0 0
10 10 20 20 20 0 10 10 0 0
10 10 20 20 20 0 0 0 0 0
Derivatives of Images
10 10 20 20 20 0 0 0 0 0
10 10 20 20 20 0 0 0 0 0
I 10 10 20 20 20 I y 0 0 0 0 0
10 10 20 20 20 0 0 0 0 0
10 10 20 20 20 0 0 0 0 0
Correlation
f h f k , l hi k , j l
k l
f Image
f Kernel
f
h
f1 f2 f3 h1 h2 h3 f * h f1h1 f 2 h2 f 3 h3
f4 f5 f6 h4 h5 h6 f 4 h4 f 5 h5 f 6 h6
f7 f8 f9 h7 h8 h9 f 7 h7 f 8 h8 f 9 h9
Convolution
f * h f k , l hi k , j l
k l
h
f Image h7 h8 h9 h1 h2 h3
X flip
h Kernel h4 h5 h6 h4 h5 h6
h1 h2 h3 h7 h8 h9
f Y flip
f1 f2 f3 h9 h8 h7 f * h f1h9 f 2 h8 f 3 h7
f4 f5 f6 h6 h5 h4 f 4 h6 f 5 h5 f 6 h4
f7 f8 f9 h3 h2 h1 f 7 h3 f 8 h2 f 9 h1
Convolution
f 1 1
h
f h f ( x i, y i )h(i, j )
x i 1 j 1
x
-1,0 0,1 1,1
Mean
n
I I In I i
I 1 2 i 1
n n
Weighted mean
n
w I w2 I 2 wn I n w I i i
I 11 i 1
n n
Gaussian Filter
x2 ( x2 y 2
g ( x) e 2 g ( x, y ) e 2 2
2
10 30 10
f p
20 11 20 5.7
11 9 1
1 3 0 1 0 -1
2 10 2 1 0.1 -1 = 5
4 1 1 1 0 -1
Image Kernel Filter Output
0 0 0
* 0 1 0
0 0 0
0 0 0
* 0 0 1
0 0 0
1 1 1
1
* 1 1 1
9
1 1 1
1 1 1 1 1
1 1 1 1 1
1
* 1 1 1 1 1
25
1 1 1 1 1
1 1 1 1 1
2.4
0.3
8 8
6
4.8
4 4
0.3
0
original pixel offset filtered
Filtering Gaussian
*
After Averaging
Gaussian Noise