1.
Linear (negative and identity transformation)
2. Logarithmic (log and inverse-log transformation)
3. Power law (nth and nth root power transformation)
Image identity
sr
Image negative
s L 1 r
For 8-bit image ; s 255 r
Log transformation
s c log(1 r )
Where c = constant; r0
Power law transformation
s cr
where
c & are positive constants
correction Dark levels have to be stretched
<1
correction Dark levels have to be compressed
>1
Piecewise linear transformation function
Gray level slicing
Use to HIGHLIGHT a specific range of gray levels
which are often desired in an image
Bit plane slicing
Inner pixel gray levels can be explored
by doing bit plane slicing
Histogram Processing
The histogram of a digital image with gray levels
in the range [0,L-1] is a discrete function
h( rk ) nk
where rk = kth gray level
nk = number of pixels in the image
having gray level value rk
Normalization:
h( rk ) nk
p( rk )
n n
n = total number of pixels in the image
p( rk ) = probability of occurrence of gray level
rk
p(r ) 1
k
k
p(rk) =h(rk)/n
rk = 255
p(r ) 1
k
k
Uniformly distributed
histogram yields
HIGH CONTRAST IMAGE
Hence, histogram
processing requires the
stretching of gray level
uniformly over the entire
gray level range.
This is histogram equalization
Histogram
p(r)
r =1
Histogram equalization
p(s)
s
0 1
1. Requires the distribution of histogram peaks
uniformly over the entire gray level range
2. Equalize the height of the peaks
Let us define the gray level values (r) to be
Continuous and
Normalized between [0,1]
r0 Black
r 1 White
For any r, the transformation
s T (r ) ; 0 r 1
Let us require that the transformation
function T(r) should satisfy
1. T(r) is single valued and monotonically
increasing in the interval 0 r 1
2. 0 T(r) 1 for 0 r 1
s
T(r) Single valued
and
monotonically increasing
r
s T(r) Not single valued
Inverse transformation of the T(r) will not
give the original image
Non-monotonic transformation function
T(r)
s
r
Transformation Transformation
from black white from white black
Hence the requirements:
1. T(r) should be single valued which ensures the
inverse transformation will exists
The monotonicity condition preserves the
increasing order from black to white in the
output image
2. Condition (b) guarantees the output gray levels
will be in the same range as that of input range
The gray levels (r or s) in an image
random variable in the interval [0,1]
pr (r ) & ps ( s ) are the PDFs of random
variables r and s, respectively
From the PDF theory of the random variable:
ps ( s ) ds pr (r ) dr
To make the histogram uniform:
Put, ps ( s ) 1
ds pr ( r ) dr
s r
ds p ( ) d
0 0
r
r
s p ( ) d T (r )
0
r
r
s T (r )
0
pr ( ) d
Hence, the transformation function (T(r)) is equal
to the CDF of random variable, r
a)T(r) is singled valued and monotonically
increasing function. Hence the first condition
is satisfied.
b) Values of T(r) or s lie in the range [0,1]
For discrete values,
nk
pr ( rk ) , k 0, 1, ..... L 1
n
k
sk T ( rk ) p (r )
j 0
r j
k nj
sk T ( rk ) n
j 0
, for k 0, 1, ...., L 1
This will do the histogram equalization
AUTOMATICALLY
Image averaging
Noisy image can be enhanced by averaging it
over a set of images
A noisy image (g(x,y)) can be expressed as
g( x , y ) f ( x , y ) ( x , y )
where
f ( x, y) Original image
( x, y) Noise
If the noise (x,y) is uncorrelated, then
The expected value of the noise (x,y) = 0
The expected covariance of the
two random variables = 0
{ gi ( x , y )} Represents a set of noisy image
The average image is formed by,
K
1
g( x , y )
K
g ( x, y)
i 1
i
1 K K
K i 1
fi
i 1
i
Take expectation either side
1 K K
E ( g ) E ( f i ) E ( i )
K i 1 i 1
f i is a constant and same for all the images
E{ f i } f i
&
E{i } 0
E{ g( x, y )} f ( x, y )
K=8 K=16
K=64 K=128