Histogram ion Slides
-
Upload
pradeep-bora -
Category
Documents
-
view
221 -
download
0
Transcript of Histogram ion Slides
-
8/2/2019 Histogram ion Slides
1/13
Histogram Equalisation
The algorithm Given an image as below, derive the intensity mapping that will as best
as possible equalise the image histogram. The image histogram is asshown on the right. There are 8 possible grey scale levels from 0 to 7.
44444
3454335553
3454344444
f(I)
I
005146000
76543210
-
8/2/2019 Histogram ion Slides
2/13
Step 1: calculate the cumulative
frequency distribution
005146000f(I)
252525206000Cuf
I 76543210
Idea is to derive an intensity mapping that will make the CuF
turn into
a straight ramp.
-
8/2/2019 Histogram ion Slides
3/13
Step 2: Compare with the CuF of
an equalised histogram
005146000f(I)
252525206000Cuf
Feq
I
33334333
76543210
In this case the Equalised (ideal) histogram needs to have 25/8
pels in each bin = 3.125 but only integer numbers of pels are
possible (its frequency after all). So Ive added in one to make
it ok.
-
8/2/2019 Histogram ion Slides
4/13
Step 2: Compare with the CuF of
an equalised histogram
252525206000Cuf
33334333Feq
2522191613963CuFeq
005146000f(I)
I 76543210
-
8/2/2019 Histogram ion Slides
5/13
Step 2: Design the mapping
252525206000Cuf
33334333Feq
2522191613963CuFeq
005146000f(I)
I 76543210
For each intensity in the original image, find an intensity in the
transformed image that has as close as possible, the same amount
of Cumulative frequency.
-
8/2/2019 Histogram ion Slides
6/13
Step 2: Design the mapping
0025206000Cuf
33334333Feq
2522191613963CuFeq
005146000f(I)
I 76543210
So for intensity 0, this has Cuf 0, and the closest in the xformed ima
Is a CuFreq of 3. So Intensity 0 in input maps to intensity 0 in outpu
-
8/2/2019 Histogram ion Slides
7/13
Step 2: Design the mapping
252525206000Cuf
33334333Feq
2522191613963CuFeq
005146000f(I)
I 76543210
Intensity 1 in input maps to Intensity 0 in output.
[Sometimes you can decide not to map into previously used
intensities]
-
8/2/2019 Histogram ion Slides
8/13
Step 2: Design the mapping
252525206000Cuf
33334333Feq
2522191613963CuFeq
005146000f(I)
I 76543210
For each intensity in the original image, find an intensity in the
transformed image that has as close as possible, the same amount
of Cumulative frequency.
13
02
01
00
Output IInput I
-
8/2/2019 Histogram ion Slides
9/13
Step 2: Design the mapping
252525206000Cuf
33334333Feq
2522191613963CuFeq
005146000f(I)
I 76543210
4 -> 5
5413
02
01
00
Output IInput I
-
8/2/2019 Histogram ion Slides
10/13
Step 2: Design the mapping
252525206000Cuf
33334333Feq
2522191613963CuFeq
005146000f(I)
I 76543210
5 ->7
75
5413
02
01
00
Output IInput I
-
8/2/2019 Histogram ion Slides
11/13
Step 2: Design the mapping
252525206000Cuf
33334333Feq
2522191613963CuFeq
005146000f(I)
I 76543210
And so on
7776
75
5413
02
01
00
Output IInput I
-
8/2/2019 Histogram ion Slides
12/13
The new histogram
501400060F(EQ)
25202066660Cu(EQ)
2522191613963CuFeq
252525206000Cuf
33334333Feq
005146000f(I)
I 76543210
7776
75
5413
02
01
00
Output IInput I
Output histogram only use4 bins!
-
8/2/2019 Histogram ion Slides
13/13
The result
44444
34543
35553
34543
44444
55555
15751
17771
15751
55555
77
76
75
54
1302
01
00Output IInput I
Original Equalised