Beruflich Dokumente
Kultur Dokumente
Histogram Processing
http://www.eri.harvard.edu/faculty/peli/proje
cts/enhancement.html
3
Introduction
Spatial domain (histogram based)
techniques
Histogram stretching
Histogram equalization
Histogram (specification) matching
Local and adaptive contrast
enhancement
What is a Histogram?
What is a Histogram?
Example of Histogram
Why Histogram?
Histogram Processing
Histogram Processing
2500
2000
1500
1000
500
50
100
150
200
16
x 10
4
3.5
3
2.5
2
1.5
1
0.5
0
0
50
100
150
200
250
17
Another Example
7000
6000
5000
4000
3000
2000
1000
0
0
50
100
150
200
250
Over-exposed image
18
No stretch
0
0
64
64
128
128
input values
172
255
display level
172
255
Linear Stretch
0
64
128
128
display level
172
255
64
Linear
Stretch
Minimum
Old DN
DN - MIN
DN = --------------- x 255
MAX - MIN
New DN
Linear Stretch
0
64
Maximum
ie. 172 in this example
128
EE465: Introduction to Digital Image
Processing
Histogram equalization
22
Histogram Equalization
x
y L h(t )
t 0
Uniform
Quantization
L
y s h(t )
t 0
Note:
h(t ) 1
t 0
http://en.wikipedia.org/wiki/Inverse_transform_sampling
23
Implementation
1.Calculate histogram
2.Form the cumulative histogram
3.Normalize the values- divide by total value
4.Multiply with maximum grey value - round off
5.Map original value to result (step4) one to one correspondance
24
Image Example
before
after
25
Histogram Comparison
3000
3000
2500
2500
2000
2000
1500
1500
1000
1000
500
500
50
100
150
200
before equalization
50
100
150
200
250
300
after equalization
26
Histogram Specification/Matching
Given a target image B, how to modify a given image A such that
the histogram of the modified A can match that of target image B?
histogram1
histogram2
S-1*T
T
?
27
Implementation
29
before
after
30
http://en.wikipedia.org/wiki/Adaptive_histogram_equalization
32
Thank you