Cumulative Histogram Equalization
Cumulative Histogram Equalization
Start
Load Image
Build New image By replacing original gray value with the new gray level
Get The Histogram and Cumulative histogram of new image to compare them with originals
End
Formula:
S S min * ( L 1) 0.5 S ' ! round 1 S min
L=No of Intensity Level Here L=8 Here S min = 0
Cumulative Histogram
Old Intensity 0 1 2 3 4 5 6 7 New Intensity 2 3 5 5 7 7 7 7 3 7 7 5
New Image
3 5 5 5
7 5 7 5
7 2 2 2
New Histogram
No of Pixel
6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 No of Pixel
Last step
y Show Graphic Result
2 1 0 0 1 3 A! 4 1 4
Intensity Range 0-4
B!
0 0 0 0 0 0 2 1 0 0 0 0 1 3 0 0 4 1 4 0 0 0 0 0 0
B!
0 0 0 0 0 0 2 1 0 0 0 0 1 3 0 0 4 1 4 0 0 0 0 0 0
matrix For 0=6/9 For 1=2/9 For 2=1/9 For 3=0 For 4=0
y Find Cumulative Distribution of each value y For 0= 6/9*4=3 y For 1=6/9+2/9=8/9*4=4 y For 2=9/9*4=4 y For 3=4 y For 4=4
B!
0 0 0 0 0
0 2 0 4 0
0 1 1 1 0
0 0 3 4 0
0 0 0 0 0
Final Result
4 3 3 2 2 4 4 3 4