<s>
Histogram	B-Algorithm
equalization	I-Algorithm
is	O
a	O
method	O
in	O
image	B-Algorithm
processing	I-Algorithm
of	O
contrast	O
adjustment	O
using	O
the	O
image	O
's	O
histogram	B-Algorithm
.	O
</s>
<s>
Through	O
this	O
adjustment	O
,	O
the	O
intensities	O
can	O
be	O
better	O
distributed	O
on	O
the	O
histogram	B-Algorithm
utilizing	O
the	O
full	O
range	O
of	O
intensities	O
evenly	O
.	O
</s>
<s>
Histogram	B-Algorithm
equalization	I-Algorithm
accomplishes	O
this	O
by	O
effectively	O
spreading	O
out	O
the	O
highly	O
populated	O
intensity	O
values	O
which	O
are	O
used	O
to	O
degrade	O
image	O
contrast	O
.	O
</s>
<s>
In	O
particular	O
,	O
the	O
method	O
can	O
lead	O
to	O
better	O
views	O
of	O
bone	O
structure	O
in	O
x-ray	B-Library
images	O
,	O
and	O
to	O
better	O
detail	O
in	O
photographs	O
that	O
are	O
either	O
over	O
or	O
under-exposed	O
.	O
</s>
<s>
So	O
in	O
theory	O
,	O
if	O
the	O
histogram	B-Algorithm
equalization	I-Algorithm
function	O
is	O
known	O
,	O
then	O
the	O
original	O
histogram	B-Algorithm
can	O
be	O
recovered	O
.	O
</s>
<s>
Histogram	B-Algorithm
equalization	I-Algorithm
often	O
produces	O
unrealistic	O
effects	O
in	O
photographs	O
;	O
however	O
it	O
is	O
very	O
useful	O
for	O
scientific	O
images	O
like	O
thermal	B-Algorithm
,	O
satellite	B-Application
or	O
x-ray	B-Library
images	O
,	O
often	O
the	O
same	O
class	O
of	O
images	O
to	O
which	O
one	O
would	O
apply	O
false-color	B-Application
.	O
</s>
<s>
Also	O
histogram	B-Algorithm
equalization	I-Algorithm
can	O
produce	O
undesirable	O
effects	O
(	O
like	O
visible	O
image	B-Algorithm
gradient	I-Algorithm
)	O
when	O
applied	O
to	O
images	O
with	O
low	O
color	O
depth	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
applied	O
to	O
8-bit	O
image	O
displayed	O
with	O
8-bit	O
gray-scale	O
palette	B-Data_Structure
it	O
will	O
further	O
reduce	O
color	O
depth	O
(	O
number	O
of	O
unique	O
shades	O
of	O
gray	O
)	O
of	O
the	O
image	O
.	O
</s>
<s>
Histogram	B-Algorithm
equalization	I-Algorithm
will	O
work	O
the	O
best	O
when	O
applied	O
to	O
images	O
with	O
much	O
higher	O
color	O
depth	O
than	O
palette	B-Data_Structure
size	O
,	O
like	O
continuous	O
data	O
or	O
16-bit	O
gray-scale	O
images	O
.	O
</s>
<s>
There	O
are	O
two	O
ways	O
to	O
think	O
about	O
and	O
implement	O
histogram	B-Algorithm
equalization	I-Algorithm
,	O
either	O
as	O
image	O
change	O
or	O
as	O
palette	B-Data_Structure
change	O
.	O
</s>
<s>
The	O
operation	O
can	O
be	O
expressed	O
as	O
P(M(I )	O
)	O
where	O
I	O
is	O
the	O
original	O
image	O
,	O
M	O
is	O
histogram	B-Algorithm
equalization	I-Algorithm
mapping	O
operation	O
and	O
P	O
is	O
a	O
palette	B-Data_Structure
.	O
</s>
<s>
If	O
we	O
define	O
a	O
new	O
palette	B-Data_Structure
as	O
P'=P(M	O
)	O
and	O
leave	O
image	O
I	O
unchanged	O
then	O
histogram	B-Algorithm
equalization	I-Algorithm
is	O
implemented	O
as	O
palette	B-Data_Structure
change	O
or	O
mapping	O
change	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
if	O
palette	B-Data_Structure
P	O
remains	O
unchanged	O
and	O
image	O
is	O
modified	O
to	O
I'=M( I	O
)	O
then	O
the	O
implementation	O
is	O
accomplished	O
by	O
image	O
change	O
.	O
</s>
<s>
In	O
most	O
cases	O
palette	B-Data_Structure
change	O
is	O
better	O
as	O
it	O
preserves	O
the	O
original	O
data	O
.	O
</s>
<s>
Modifications	O
of	O
this	O
method	O
use	O
multiple	O
histograms	B-Algorithm
,	O
called	O
subhistograms	O
,	O
to	O
emphasize	O
local	O
contrast	O
,	O
rather	O
than	O
overall	O
global	O
contrast	O
.	O
</s>
<s>
Examples	O
of	O
such	O
methods	O
include	O
adaptive	B-Algorithm
histogram	I-Algorithm
equalization	I-Algorithm
,	O
contrast	O
limiting	O
adaptive	B-Algorithm
histogram	I-Algorithm
equalization	I-Algorithm
or	O
CLAHE	O
,	O
multipeak	O
histogram	B-Algorithm
equalization	I-Algorithm
(	O
MPHE	O
)	O
,	O
and	O
multipurpose	O
beta	O
optimized	O
bihistogram	O
equalization	O
(	O
MBOBHE	O
)	O
.	O
</s>
<s>
A	O
signal	O
transform	O
equivalent	O
to	O
histogram	B-Algorithm
equalization	I-Algorithm
also	O
seems	O
to	O
happen	O
in	O
biological	B-General_Concept
neural	I-General_Concept
networks	I-General_Concept
so	O
as	O
to	O
maximize	O
the	O
output	O
firing	O
rate	O
of	O
the	O
neuron	O
as	O
a	O
function	O
of	O
the	O
input	O
statistics	O
.	O
</s>
<s>
Histogram	B-Algorithm
equalization	I-Algorithm
is	O
a	O
specific	O
case	O
of	O
the	O
more	O
general	O
class	O
of	O
histogram	B-Algorithm
remapping	O
methods	O
.	O
</s>
<s>
The	O
back	O
projection	O
(	O
or	O
"	O
project	O
"	O
)	O
of	O
a	O
histogrammed	O
image	O
is	O
the	O
re-application	O
of	O
the	O
modified	O
histogram	B-Algorithm
to	O
the	O
original	O
image	O
,	O
functioning	O
as	O
a	O
look-up	O
table	O
for	O
pixel	O
brightness	O
values	O
.	O
</s>
<s>
For	O
each	O
group	O
of	O
pixels	O
taken	O
from	O
the	O
same	O
position	O
from	O
all	O
input	O
single-channel	O
images	O
,	O
the	O
function	O
puts	O
the	O
histogram	B-Algorithm
bin	O
value	O
to	O
the	O
destination	O
image	O
,	O
where	O
the	O
coordinates	O
of	O
the	O
bin	O
are	O
determined	O
by	O
the	O
values	O
of	O
pixels	O
in	O
this	O
input	O
group	O
.	O
</s>
<s>
In	O
terms	O
of	O
statistics	O
,	O
the	O
value	O
of	O
each	O
output	O
image	O
pixel	O
characterizes	O
the	O
probability	O
that	O
the	O
corresponding	O
input	O
pixel	O
group	O
belongs	O
to	O
the	O
object	O
whose	O
histogram	B-Algorithm
is	O
used	O
.	O
</s>
<s>
being	O
the	O
total	O
number	O
of	O
gray	O
levels	O
in	O
the	O
image	O
(	O
typically	O
256	O
)	O
,	O
n	O
being	O
the	O
total	O
number	O
of	O
pixels	O
in	O
the	O
image	O
,	O
and	O
being	O
in	O
fact	O
the	O
image	O
's	O
histogram	B-Algorithm
for	O
pixel	O
value	O
i	O
,	O
normalized	O
to	O
 [ 0 , 1 ] 	O
.	O
</s>
<s>
which	O
is	O
also	O
the	O
image	O
's	O
accumulated	O
normalized	O
histogram	B-Algorithm
.	O
</s>
<s>
We	O
would	O
like	O
to	O
create	O
a	O
transformation	O
of	O
the	O
form	O
to	O
produce	O
a	O
new	O
image	O
{y},	O
with	O
a	O
flat	O
histogram	B-Algorithm
.	O
</s>
<s>
Notice	O
that	O
maps	O
the	O
levels	O
into	O
the	O
range	O
[0,1],	O
since	O
we	O
used	O
a	O
normalized	O
histogram	B-Algorithm
of	O
 { x } 	O
.	O
</s>
<s>
The	O
above	O
describes	O
histogram	B-Algorithm
equalization	I-Algorithm
on	O
a	O
grayscale	O
image	O
.	O
</s>
<s>
However	O
,	O
applying	O
the	O
same	O
method	O
on	O
the	O
Red	O
,	O
Green	O
,	O
and	O
Blue	O
components	O
of	O
an	O
RGB	O
image	O
may	O
yield	O
dramatic	O
changes	O
in	O
the	O
image	O
's	O
color	B-Algorithm
balance	I-Algorithm
since	O
the	O
relative	O
distributions	O
of	O
the	O
color	O
channels	O
change	O
as	O
a	O
result	O
of	O
applying	O
the	O
algorithm	O
.	O
</s>
<s>
There	O
are	O
several	O
histogram	B-Algorithm
equalization	I-Algorithm
methods	O
in	O
3D	O
space	O
.	O
</s>
<s>
Trahanias	O
and	O
Venetsanopoulos	O
applied	O
histogram	B-Algorithm
equalization	I-Algorithm
in	O
3D	O
color	O
space	O
However	O
,	O
it	O
results	O
in	O
"	O
whitening	O
"	O
where	O
the	O
probability	O
of	O
bright	O
pixels	O
are	O
higher	O
than	O
that	O
of	O
dark	O
ones	O
.	O
</s>
<s>
Cumulative	O
distribution	O
function	O
)	O
should	O
be	O
replaced	O
by	O
"	O
cumulative	O
histogram	B-Algorithm
"	O
,	O
especially	O
since	O
the	O
article	O
links	O
to	O
cumulative	O
distribution	O
function	O
which	O
is	O
derived	O
by	O
dividing	O
values	O
in	O
the	O
cumulative	O
histogram	B-Algorithm
by	O
the	O
overall	O
amount	O
of	O
pixels	O
.	O
</s>
<s>
The	O
histogram	B-Algorithm
for	O
this	O
image	O
is	O
shown	O
in	O
the	O
following	O
table	O
.	O
</s>
<s>
The	O
general	O
histogram	B-Algorithm
equalization	I-Algorithm
formula	O
is	O
:	O
</s>
