Image Enhancement Histogram Processing
Image Enhancement Histogram Processing
Image enhancement
Histogram Processing
Introduction
• Histogram
– Discrete Function
– number
of pixels of gray level
– Normalization of histogram: where n :
total number of pixels
– : probability of grey level , k=0,1…..L-1
– Histogram plots : : vs or vs
Histogram
Gr No.of
ey pixels
Le
vel
0 30 0.3
1 20 0.2
2 10 0.1
)
3 15 0.15
4 10 0.1
5 3 0.03
6 2 0.02
7 10 0.1
Images with Histograms
• Dark Image
– Concentration of gray
levels at Low side of gray
scale
• Bright Image
– Concentration of gray
levels at high side of
histogram
• Low contrast
– Concentration of gray
levels at center of gray
scale
• High contrast
– Occupy Broad range of
gray scale
– Pixels distribution is
uniform
Linear Stretching
• Dynamic range of gray levels is
obtain by linear stretching of
histogram
• Shape of histogram is not altered
•
Example
• Do Histogram stretching
to have grey level range[0,7]
0 1 2 3 4 5 6 7
0 0 40 50 70 20 10 0
19x10=190
Example
• Do Histogram stretching
to have grey level range[0,7]
0 1 2 3 4 5 6 7
0 0 40 50 70 20 10 0
• Solution:
r=2: s=0, r=3: s=1.75=2, r=4: s=3.5=4,
r=5: s=5.2=5, r=6: s=7
Modified Histogram
0 1 2 3 4 5 6 7
40 0 50 0 70 20 0 10 Note X-axis 0…….7
Example
0 1 2 3 4 5 6 7
100 90 80 60 0 0 0 0
0 1 2 3 4 5 6 7
100 0 90 0 0 80 0 60