Professional Documents
Culture Documents
3: Image Enhancement
in the Spatial Domain
T: operator
* T operates over
neighborhood of (x,y)
Point processing
1x1 neighborhood
Gray level transformation, or point processing
s = T(r)
contrast thresholding
stretching
Neighborhood processing
A larger predefined neighborhood
Ex. 3x3 neighborhood
mask, filters, kernels, templates, windows
Mask processing or filtering
Some Basic Gray Level Transformations
•Lookup table
•Functional form
Image negatives
Photographic negative 負片
Suitable for images with dominant black
areas
Original mammogram(乳房X光片)
Log transformations
s = c log(1+r)
Compress the dynamic
range of images with
large variation in pixel
values
Example: Log transformations
log(fft2(I)) : log of Fourier transform
log
=0.6
=0.4 =0.3
Power-law: >1
Expand light
gray levels
=3
=4 =5
Piece-wise linear transformations
control point
Advantage: the
piecewise function
can be arbitrarily
complex
Contrast
stretching
1
0
0
1
0
1
0
0
Ex. 15010 bit-planes of an image
(gray level 0~255)
Bit-plane slicing: example
For image
compression
7 6
5 4 3
2 1 0
Arithmetic/logic operations
Logic operations
Image subtraction
Image averaging
Logic operations
Logic operations: pixel-wise AND, OR, NOT
The pixel gray level values are taken as
string of binary numbers
Ex. 193 => 11000001
AND
A or B
OR
Image subtraction
f:original(8 bits) h:4 sig. bits
Difference image
g(x,y)=f(x,y)-h(x,y)
scaling
difference image
Image subtraction: scaling the
difference image
g(x,y)=f(x,y)-h(x,y)
f and h are 8-bit => g(x,y) [-255, 255]
1. (1)+255 (2) divide by 2
• The result won’t cover [0,255]
2. (1)-min(g) (2) *255/max(g)
注射碘液
拍攝影像
與原影像
相減
Image averaging
Noisy image g(x,y)=f(x,y)+η(x,y)
original noise
E g ( x, y ) f ( x, y ) 期望值接近原圖
1 2
2
g ( x, y )
( x, y ) K 2
K
original Gaussian
noise
averaging averaging
K=8 K=16
averaging averaging
K=64 K=128