Professional Documents
Culture Documents
Spatial Domain
pixel
Spatial Domain
g(x, y) = T[f(x, y)]
Basic implementation
on a single image
f(x, y)
(100,150)
T compute
the average
intensity of the 3x3
neighborhood
g(x, y) = (20+55+62+34+70+77+67+72+74)/9
(Figure from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 3rd Edition.
Gray-Level Transformation
Pixels (x, y) 1 x 1
s = g(x, y) r = f(x, y)
s = T(r)
Image Negatives
s=L-1-r
(0, 0) s = L 1 r
= 256 1 0 = 255
(0, 1) s = L 1 r
= 256 1 10 = 245
(1, 0) s = L 1 r
= 256 1 200 = 55
(1, 1) s = L 1 r
= 256 1 255 = 0
image negatives
negative
Log Transformation
s = c * log (1 + r)
c r >= 0
Figure 3.3
pixel
pixel
Fourier spectrum ( 4)
0 106
pixel 106
c = 1
s = c * log (1 + r)
= 1 * log (1 + 106 )
= 6
0-255 c
255/6
Log Transformations
Fourier Spectrum
0 1.5x106
(Figure from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 3rd Edition.
log transformation
0
c = 1
6.2
8
s=
c*r
power law
MRI image
0.4
3 4
Piecewise-Linear Transformation
Functions
contrast stretching, intensity
slicing, bit-plane slicing
Contrast Stretching
low-contrast images
sensor
Contrast Stretching
Figure 3.10(a)
contrast stretching (r1, s1) (r2, s2)
transformation function
r1 = s1 r2 = s2 linear function
r1 = r2 , s1 = 0 s2 = L-1
threshold function binary image
Intensity-level slicing
Gray-level slicing
highlight
Bit-plane slicing
8 8 0
( ) 7 ()
bit plane,
194 11000010
bit plane
bit plane 4
original image
higher-order bit plane
nth plane 2n-1 bit plane 8
128 bit plane 7 64 bit plane
8 7