Professional Documents
Culture Documents
Lect 4
Lect 4
Array/matrix operations
Linear/nonlinear operations
Linearity:
Arithmetic Operations – single pixel operations
• Image averaging, image subtraction, image multiplication
Set and logic operations
Spatial operations
• Single pixel operations and neighborhood operations
Image transformation
Probabilistic methods
Set Operations Based on Intensities
Foreground/background
• Binary image: 0/1
• Fuzzy set: [0,1]
• Determined by
• Transformation function T
• Input intensity value
• Not depend on other pixels and position
Neighborhood Operations
Image smoothing
g ( x, y ) =
1
f ( r, c)
mn ( r ,c )S xy
Other examples:
•Interpolation
•Image filtering
Geometric Spatial Transformations – Rubber
Sheet Transformation
( x, y ) = T {(v, w)}
Affine transform:
x v t11 t12 0 v
y = T w = t 0 w
21 t 22
1 1 t31 t32 1 1
Inverse mapping
v x
w = T −1 y
1 1
Geometric Spatial Transformations
z1
z = z2
z
3
D( z, a) = z − a = ( z1 − a1 )2 + ( z2 − a2 )2 + ... + ( zn − an )2
Forward
transformation
kernel
M −1 N −1 u = 0,1,..., M − 1
T (u, v ) = f ( x, y )r ( x, y , u, v ),
x =0 y =0 v = 0,1,..., N − 1
M −1 N −1 x = 0,1,..., M − 1
f ( x, y ) = T (u, v ) s( x, y , u, v )
u =0 v =0 y = 0,1,..., N − 1
Inverse
transformation
kernel
Fourier Transforms and Filtering
Fourier Transform
Separable kernel : r ( x, y , u, v ) = r1 ( x, u ) r2 ( y , v )
Symmtric kernel : r ( x, y , u, v ) = r1 ( x, u ) r1 ( y , v )
− j 2 ( ux / M + vy / N )
r ( x , y , u, v ) = e
1 j 2 ( ux / M + vy / N )
s ( x , y , u, v ) = e
MN
Probability Methods
L −1
nk
p( zk ) =
MN
, p( z
k =1
k ) =1
Probability Methods
L −1 L −1
m = z k p ( z k ), = ( z k − m) 2 p ( z k )
2
What do they mean?
k =1 k =1
L −1
n ( z ) = ( z k − m) n p ( z k ) nth moment of z
k =1
Reading: Chapter 3.
Spatial Domain
g(x,y)=T [f(x,y)]
→ spatial filter
1x1 Neighborhood → Intensity Transformation
→ Image Enhancement
Contrast stretch
s = cr
• More versatile than log
transformation
• Performed by a lookup
table
Power-Law (Gamma) Transformations
Washed-out appearance
was reduced by a large
gamma value
Piecewise-Linear Transformation Functions:
Contrast Stretching
Piecewise-Linear Transformation Functions:
Intensity-Level Slicing
An Example of Intensity-Level Slicing
Piecewise-Linear Transformation Functions:
Bit-Plane Slicing
An Example
Use for Image Compression
original
Histogram
h(rk ) = nk
Normalized histogram
p (rk ) = nk / MN
255
p(r ) = 1
k =0
k