<s>
In	O
image	B-Algorithm
processing	I-Algorithm
and	O
photography	O
,	O
a	O
color	B-General_Concept
histogram	I-General_Concept
is	O
a	O
representation	O
of	O
the	O
distribution	O
of	O
colors	O
in	O
an	O
image	O
.	O
</s>
<s>
For	O
digital	O
images	O
,	O
a	O
color	B-General_Concept
histogram	I-General_Concept
represents	O
the	O
number	O
of	O
pixels	B-Algorithm
that	O
have	O
colors	O
in	O
each	O
of	O
a	O
fixed	O
list	O
of	O
color	O
ranges	O
,	O
that	O
span	O
the	O
image	O
's	O
color	B-Algorithm
space	I-Algorithm
,	O
the	O
set	O
of	O
all	O
possible	O
colors	O
.	O
</s>
<s>
The	O
color	B-General_Concept
histogram	I-General_Concept
can	O
be	O
built	O
for	O
any	O
kind	O
of	O
color	B-Algorithm
space	I-Algorithm
,	O
although	O
the	O
term	O
is	O
more	O
often	O
used	O
for	O
three-dimensional	O
spaces	O
like	O
RGB	O
or	O
HSV	O
.	O
</s>
<s>
For	O
monochromatic	O
images	O
,	O
the	O
term	O
intensity	O
histogram	B-Algorithm
may	O
be	O
used	O
instead	O
.	O
</s>
<s>
For	O
multi-spectral	O
images	O
,	O
where	O
each	O
pixel	B-Algorithm
is	O
represented	O
by	O
an	O
arbitrary	O
number	O
of	O
measurements	O
(	O
for	O
example	O
,	O
beyond	O
the	O
three	O
measurements	O
in	O
RGB	O
)	O
,	O
the	O
color	B-General_Concept
histogram	I-General_Concept
is	O
N-dimensional	O
,	O
with	O
N	O
being	O
the	O
number	O
of	O
measurements	O
taken	O
.	O
</s>
<s>
If	O
the	O
set	O
of	O
possible	O
color	O
values	O
is	O
sufficiently	O
small	O
,	O
each	O
of	O
those	O
colors	O
may	O
be	O
placed	O
on	O
a	O
range	O
by	O
itself	O
;	O
then	O
the	O
histogram	B-Algorithm
is	O
merely	O
the	O
count	O
of	O
pixels	B-Algorithm
that	O
have	O
each	O
possible	O
color	O
.	O
</s>
<s>
The	O
color	B-General_Concept
histogram	I-General_Concept
may	O
also	O
be	O
represented	O
and	O
displayed	O
as	O
a	O
smooth	O
function	O
defined	O
over	O
the	O
color	B-Algorithm
space	I-Algorithm
that	O
approximates	O
the	O
pixel	B-Algorithm
counts	O
.	O
</s>
<s>
Like	O
other	O
kinds	O
of	O
histograms	B-Algorithm
,	O
the	O
color	B-General_Concept
histogram	I-General_Concept
is	O
a	O
statistic	O
that	O
can	O
be	O
viewed	O
as	O
an	O
approximation	O
of	O
an	O
underlying	O
continuous	O
distribution	O
of	O
color	O
values	O
.	O
</s>
<s>
Color	B-General_Concept
histograms	I-General_Concept
are	O
flexible	O
constructs	O
that	O
can	O
be	O
built	O
from	O
images	O
in	O
various	O
color	B-Algorithm
spaces	I-Algorithm
,	O
whether	O
RGB	O
,	O
rg	O
chromaticity	O
or	O
any	O
other	O
color	B-Algorithm
space	I-Algorithm
of	O
any	O
dimension	O
.	O
</s>
<s>
A	O
histogram	B-Algorithm
of	O
an	O
image	O
is	O
produced	O
first	O
by	O
discretization	O
of	O
the	O
colors	O
in	O
the	O
image	O
into	O
a	O
number	O
of	O
bins	O
,	O
and	O
counting	O
the	O
number	O
of	O
image	O
pixels	B-Algorithm
in	O
each	O
bin	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
Red	O
–	O
Blue	O
chromaticity	O
histogram	B-Algorithm
can	O
be	O
formed	O
by	O
first	O
normalizing	O
color	O
pixel	B-Algorithm
values	O
by	O
dividing	O
RGB	O
values	O
by	O
R+G+B	O
,	O
then	O
quantizing	O
the	O
normalized	O
R	O
and	O
B	O
coordinates	O
into	O
N	O
bins	O
each	O
.	O
</s>
<s>
A	O
two-dimensional	O
histogram	B-Algorithm
of	O
Red-Blue	O
chromaticity	O
divided	O
into	O
four	O
bins	O
(	O
N	O
=	O
4	O
)	O
might	O
yield	O
a	O
histogram	B-Algorithm
that	O
looks	O
like	O
this	O
table	O
:	O
</s>
<s>
A	O
histogram	B-Algorithm
can	O
be	O
N-dimensional	O
.	O
</s>
<s>
Although	O
harder	O
to	O
display	O
,	O
a	O
three-dimensional	O
color	B-General_Concept
histogram	I-General_Concept
for	O
the	O
above	O
example	O
could	O
be	O
thought	O
of	O
as	O
four	O
separate	O
Red-Blue	O
histograms	B-Algorithm
,	O
where	O
each	O
of	O
the	O
four	O
histograms	B-Algorithm
contains	O
the	O
Red-Blue	O
values	O
for	O
a	O
bin	O
of	O
green	O
(	O
0-63	O
,	O
64-127	O
,	O
128-191	O
,	O
and	O
192-255	O
)	O
.	O
</s>
<s>
The	O
histogram	B-Algorithm
provides	O
a	O
compact	O
summarization	O
of	O
the	O
distribution	O
of	O
data	O
in	O
an	O
image	O
.	O
</s>
<s>
The	O
color	B-General_Concept
histogram	I-General_Concept
of	O
an	O
image	O
is	O
relatively	O
invariant	O
with	O
translation	O
and	O
rotation	O
about	O
the	O
viewing	O
axis	O
,	O
and	O
varies	O
only	O
slowly	O
with	O
the	O
angle	O
of	O
view	O
.	O
</s>
<s>
By	O
comparing	O
histogram	B-Algorithm
signatures	O
of	O
two	O
images	O
and	O
matching	O
the	O
color	O
content	O
of	O
one	O
image	O
with	O
the	O
other	O
,	O
the	O
color	B-General_Concept
histogram	I-General_Concept
is	O
particularly	O
well	O
suited	O
for	O
the	O
problem	O
of	O
recognizing	O
an	O
object	O
of	O
unknown	O
position	O
and	O
rotation	O
within	O
a	O
scene	O
.	O
</s>
<s>
Importantly	O
,	O
translation	O
of	O
an	O
RGB	O
image	O
into	O
the	O
illumination	O
invariant	O
rg-chromaticity	O
space	O
allows	O
the	O
histogram	B-Algorithm
to	O
operate	O
well	O
in	O
varying	O
light	O
levels	O
.	O
</s>
<s>
What	O
is	O
a	O
histogram	B-Algorithm
?	O
</s>
<s>
A	O
histogram	B-Algorithm
is	O
a	O
graphical	O
representation	O
of	O
the	O
number	O
of	O
pixels	B-Algorithm
in	O
an	O
image	O
.	O
</s>
<s>
In	O
a	O
more	O
simple	O
way	O
to	O
explain	O
,	O
a	O
histogram	B-Algorithm
is	O
a	O
bar	O
graph	O
,	O
whose	O
X-axis	O
represents	O
the	O
tonal	O
scale(black at the left and white at the right )	O
,	O
and	O
Y-axis	O
represents	O
the	O
number	O
of	O
pixels	B-Algorithm
in	O
an	O
image	O
in	O
a	O
certain	O
area	O
of	O
the	O
tonal	O
scale	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
graph	O
of	O
a	O
luminance	O
histogram	B-Algorithm
shows	O
the	O
number	O
of	O
pixels	B-Algorithm
for	O
each	O
brightness	O
level(from black to white )	O
,	O
and	O
when	O
there	O
are	O
more	O
pixels	B-Algorithm
,	O
the	O
peak	O
at	O
the	O
certain	O
luminance	O
level	O
is	O
higher	O
.	O
</s>
<s>
What	O
is	O
a	O
color	B-General_Concept
histogram	I-General_Concept
?	O
</s>
<s>
A	O
color	B-General_Concept
histogram	I-General_Concept
of	O
an	O
image	O
represents	O
the	O
distribution	O
of	O
the	O
composition	O
of	O
colors	O
in	O
the	O
image	O
.	O
</s>
<s>
It	O
shows	O
different	O
types	O
of	O
colors	O
appeared	O
and	O
the	O
number	O
of	O
pixels	B-Algorithm
in	O
each	O
type	O
of	O
the	O
colors	O
appeared	O
.	O
</s>
<s>
The	O
relation	O
between	O
a	O
color	B-General_Concept
histogram	I-General_Concept
and	O
a	O
luminance	O
histogram	B-Algorithm
is	O
that	O
a	O
color	B-General_Concept
histogram	I-General_Concept
can	O
be	O
also	O
expressed	O
as	O
“	O
Three	O
Luminance	O
Histograms	B-Algorithm
”	O
,	O
each	O
of	O
which	O
shows	O
the	O
brightness	O
distribution	O
of	O
each	O
individual	O
Red/Green/Blue	O
color	O
channel	O
.	O
</s>
<s>
A	O
color	B-General_Concept
histogram	I-General_Concept
focuses	O
only	O
on	O
the	O
proportion	O
of	O
the	O
number	O
of	O
different	O
types	O
of	O
colors	O
,	O
regardless	O
of	O
the	O
spatial	O
location	O
of	O
the	O
colors	O
.	O
</s>
<s>
The	O
values	O
of	O
a	O
color	B-General_Concept
histogram	I-General_Concept
are	O
from	O
statistics	O
.	O
</s>
<s>
In	O
general	O
,	O
as	O
the	O
color	O
distributions	O
of	O
the	O
foreground	O
and	O
background	O
in	O
an	O
image	O
are	O
different	O
,	O
there	O
might	O
be	O
a	O
bimodal	O
distribution	O
in	O
the	O
histogram	B-Algorithm
.	O
</s>
<s>
For	O
the	O
luminance	O
histogram	B-Algorithm
alone	O
,	O
there	O
is	O
no	O
perfect	O
histogram	B-Algorithm
and	O
in	O
general	O
,	O
the	O
histogram	B-Algorithm
can	O
tell	O
whether	O
it	O
is	O
over-exposure	O
or	O
not	O
,	O
but	O
there	O
are	O
times	O
when	O
you	O
might	O
think	O
the	O
image	O
is	O
over	O
exposed	O
by	O
viewing	O
the	O
histogram	B-Algorithm
;	O
however	O
,	O
in	O
reality	O
it	O
is	O
not	O
.	O
</s>
<s>
The	O
formation	O
of	O
a	O
color	B-General_Concept
histogram	I-General_Concept
is	O
rather	O
simple	O
.	O
</s>
<s>
From	O
the	O
definition	O
above	O
,	O
we	O
can	O
simply	O
count	O
the	O
number	O
of	O
pixels	B-Algorithm
for	O
each	O
256	O
scales	O
in	O
each	O
of	O
the	O
3	O
RGB	O
channel	O
,	O
and	O
plot	O
them	O
on	O
3	O
individual	O
bar	O
graphs	O
.	O
</s>
<s>
In	O
general	O
,	O
a	O
color	B-General_Concept
histogram	I-General_Concept
is	O
based	O
on	O
a	O
certain	O
color	B-Algorithm
space	I-Algorithm
,	O
such	O
as	O
RGB	O
or	O
HSV	O
.	O
</s>
<s>
When	O
we	O
compute	O
the	O
pixels	B-Algorithm
of	O
different	O
colors	O
in	O
an	O
image	O
,	O
if	O
the	O
color	B-Algorithm
space	I-Algorithm
is	O
large	O
,	O
then	O
we	O
can	O
first	O
divide	O
the	O
color	B-Algorithm
space	I-Algorithm
into	O
certain	O
numbers	O
of	O
small	O
intervals	O
.	O
</s>
<s>
Then	O
,	O
by	O
counting	O
the	O
number	O
of	O
pixels	B-Algorithm
in	O
each	O
of	O
the	O
bins	O
,	O
we	O
get	O
the	O
color	B-General_Concept
histogram	I-General_Concept
of	O
the	O
image	O
.	O
</s>
<s>
Given	O
the	O
following	O
image	O
of	O
a	O
cat	O
(	O
an	O
original	O
version	O
and	O
a	O
version	O
that	O
has	O
been	O
reduced	O
to	O
256	O
colors	O
for	O
easy	O
histogram	B-Algorithm
purposes	O
)	O
,	O
the	O
following	O
data	O
represents	O
a	O
color	B-General_Concept
histogram	I-General_Concept
in	O
the	O
RGB	O
color	B-Algorithm
space	I-Algorithm
,	O
using	O
four	O
bins	O
.	O
</s>
<s>
Nowadays	O
,	O
some	O
cameras	O
have	O
the	O
ability	O
to	O
show	O
the	O
3	O
color	B-General_Concept
histograms	I-General_Concept
when	O
we	O
take	O
photos	O
.	O
</s>
<s>
We	O
can	O
examine	O
clips	O
(	O
spikes	O
on	O
either	O
the	O
black	O
or	O
white	O
side	O
of	O
the	O
scale	O
)	O
in	O
each	O
of	O
the	O
3	O
RGB	O
color	B-General_Concept
histograms	I-General_Concept
.	O
</s>
<s>
To	O
conclude	O
,	O
when	O
taking	O
photos	O
with	O
a	O
camera	O
that	O
displays	O
histograms	B-Algorithm
,	O
always	O
keep	O
the	O
brightest	O
tone	O
in	O
the	O
image	O
below	O
the	O
largest	O
scale	O
255	O
on	O
the	O
histogram	B-Algorithm
in	O
order	O
to	O
avoid	O
losing	O
details	O
.	O
</s>
<s>
The	O
main	O
drawback	O
of	O
histograms	B-Algorithm
for	O
classification	O
is	O
that	O
the	O
representation	O
is	O
dependent	O
of	O
the	O
color	O
of	O
the	O
object	O
being	O
studied	O
,	O
ignoring	O
its	O
shape	O
and	O
texture	O
.	O
</s>
<s>
Color	B-General_Concept
histograms	I-General_Concept
can	O
potentially	O
be	O
identical	O
for	O
two	O
images	O
with	O
different	O
object	O
content	O
which	O
happens	O
to	O
share	O
color	O
information	O
.	O
</s>
<s>
Conversely	O
,	O
without	O
spatial	O
or	O
shape	O
information	O
,	O
similar	O
objects	O
of	O
different	O
color	O
may	O
be	O
indistinguishable	O
based	O
solely	O
on	O
color	B-General_Concept
histogram	I-General_Concept
comparisons	O
.	O
</s>
<s>
Put	O
another	O
way	O
,	O
histogram-based	O
algorithms	O
have	O
no	O
concept	O
of	O
a	O
generic	O
'	O
cup	O
 '	O
,	O
and	O
a	O
model	O
of	O
a	O
red	O
and	O
white	O
cup	O
is	O
no	O
use	O
when	O
given	O
an	O
otherwise	O
identical	O
blue	O
and	O
white	O
cup	O
.	O
</s>
<s>
Another	O
problem	O
is	O
that	O
color	B-General_Concept
histograms	I-General_Concept
have	O
high	O
sensitivity	O
to	O
noisy	O
interference	O
such	O
as	O
lighting	O
intensity	O
changes	O
and	O
quantization	O
errors	O
.	O
</s>
<s>
High	O
dimensionality	O
(	O
bins	O
)	O
color	B-General_Concept
histograms	I-General_Concept
are	O
also	O
another	O
issue	O
.	O
</s>
<s>
Some	O
color	B-General_Concept
histogram	I-General_Concept
feature	O
spaces	O
often	O
occupy	O
more	O
than	O
one	O
hundred	O
dimensions	O
.	O
</s>
<s>
Some	O
of	O
the	O
proposed	O
solutions	O
have	O
been	O
color	B-General_Concept
histogram	I-General_Concept
intersection	O
,	O
color	O
constant	O
indexing	O
,	O
cumulative	O
color	B-General_Concept
histogram	I-General_Concept
,	O
quadratic	O
distance	O
,	O
and	O
color	O
correlograms	B-Application
.	O
</s>
<s>
Although	O
there	O
are	O
drawbacks	O
of	O
using	O
histograms	B-Algorithm
for	O
indexing	O
and	O
classification	O
,	O
using	O
color	O
in	O
a	O
real-time	O
system	O
has	O
several	O
advantages	O
.	O
</s>
<s>
Further	O
research	O
into	O
the	O
relationship	O
between	O
color	B-General_Concept
histogram	I-General_Concept
data	O
to	O
the	O
physical	O
properties	O
of	O
the	O
objects	O
in	O
an	O
image	O
has	O
shown	O
they	O
can	O
represent	O
not	O
only	O
object	O
color	O
and	O
illumination	O
but	O
relate	O
to	O
surface	O
roughness	O
and	O
image	O
geometry	O
and	O
provide	O
an	O
improved	O
estimate	O
of	O
illumination	O
and	O
object	O
color	O
.	O
</s>
<s>
Usually	O
,	O
Euclidean	O
distance	O
,	O
histogram	B-Algorithm
intersection	O
,	O
or	O
cosine	O
or	O
quadratic	O
distances	O
are	O
used	O
for	O
the	O
calculation	O
of	O
image	O
similarity	O
ratings	O
.	O
</s>
<s>
This	O
is	O
the	O
reason	O
that	O
all	O
the	O
practical	O
implementations	O
of	O
content-based	B-Application
image	I-Application
retrieval	I-Application
must	O
complete	O
computation	O
of	O
all	O
images	O
from	O
the	O
database	O
,	O
and	O
is	O
the	O
main	O
disadvantage	O
of	O
these	O
implementations	O
.	O
</s>
<s>
Another	O
approach	O
to	O
representative	O
color	O
image	O
content	O
is	O
two-dimensional	O
color	B-General_Concept
histogram	I-General_Concept
.	O
</s>
<s>
A	O
two-dimensional	O
color	B-General_Concept
histogram	I-General_Concept
considers	O
the	O
relation	O
between	O
the	O
pixel	B-Algorithm
pair	O
colors	O
(	O
not	O
only	O
the	O
lighting	O
component	O
)	O
.	O
</s>
<s>
A	O
two-dimensional	O
color	B-General_Concept
histogram	I-General_Concept
is	O
a	O
two-dimensional	O
array	O
.	O
</s>
<s>
These	O
arrays	O
are	O
treated	O
as	O
matrices	O
,	O
each	O
element	O
of	O
which	O
stores	O
a	O
normalized	O
count	O
of	O
pixel	B-Algorithm
pairs	O
,	O
with	O
each	O
color	O
corresponding	O
to	O
the	O
index	O
of	O
an	O
element	O
in	O
each	O
pixel	B-Algorithm
neighborhood	O
.	O
</s>
<s>
For	O
comparison	O
of	O
two-dimensional	O
color	B-General_Concept
histograms	I-General_Concept
it	O
is	O
suggested	O
calculating	O
their	O
correlation	O
,	O
because	O
constructed	O
as	O
described	O
above	O
,	O
is	O
a	O
random	O
vector	O
(	O
in	O
other	O
words	O
,	O
a	O
multi-dimensional	O
random	O
value	O
)	O
.	O
</s>
<s>
The	O
correlation	O
coefficient	O
may	O
also	O
be	O
used	O
for	O
color	B-General_Concept
histogram	I-General_Concept
comparison	O
.	O
</s>
<s>
The	O
idea	O
of	O
an	O
intensity	O
histogram	B-Algorithm
can	O
be	O
generalized	O
to	O
continuous	O
data	O
,	O
</s>
<s>
say	O
audio	O
signals	O
represented	O
by	O
real	O
functions	O
or	O
images	O
represented	O
by	O
functions	O
with	O
two-dimensional	O
domain	B-Algorithm
.	O
</s>
<s>
Let	O
(	O
see	O
Lebesgue	O
space	O
)	O
,	O
then	O
the	O
cumulative	O
histogram	B-Algorithm
operator	O
can	O
be	O
defined	O
by	O
:	O
</s>
<s>
The	O
(	O
non-cumulative	O
)	O
histogram	B-Algorithm
is	O
defined	O
as	O
its	O
derivative	B-Algorithm
.	O
</s>
