L15 - HISTOGRAM PROCESSING - I - New
L15 - HISTOGRAM PROCESSING - I - New
Histogram of an Image
The histogram of a digital image with gray levels in the range
[0, L-1] is a discrete function h(rk) = nk, where rk is the kth gray
level and nk is the number of pixels in the image having gray
level rk. Or 255
h(r ) Total Number of
k 0
k pixel in the image.
So zk = G-1[T(rk)] = G-1(sk)
Histogram Matching - Implementation
1. Obtain the histogram of the given image
k
2.Compute T (rk ) pr (r j ) k 0,1,......., L 1
j 0
k
3.Compute G ( z k ) p z ( zi ) k 0,1,......., L 1
i 0
n (r ) rk m p (rk )
k 0
Histogram Statistics
m is the mean value of r
L 1
m rk p (rk )
k 0