<s>
In	O
computer	B-Application
vision	I-Application
,	O
a	O
saliency	B-Algorithm
map	I-Algorithm
is	O
an	O
image	O
that	O
highlights	O
the	O
region	O
on	O
which	O
people	O
's	O
eyes	O
focus	O
first	O
.	O
</s>
<s>
The	O
goal	O
of	O
a	O
saliency	B-Algorithm
map	I-Algorithm
is	O
to	O
reflect	O
the	O
degree	O
of	O
importance	O
of	O
a	O
pixel	B-Algorithm
to	O
the	O
human	O
visual	O
system	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
this	O
image	O
,	O
a	O
person	O
first	O
looks	O
at	O
the	O
fort	O
and	O
light	O
clouds	O
,	O
so	O
they	O
should	O
be	O
highlighted	O
on	O
the	O
saliency	B-Algorithm
map	I-Algorithm
.	O
</s>
<s>
Saliency	B-Algorithm
maps	I-Algorithm
engineered	O
in	O
artificial	O
or	O
computer	B-Application
vision	I-Application
are	O
typically	O
not	O
the	O
same	O
as	O
the	O
actual	O
saliency	B-Algorithm
map	I-Algorithm
constructed	O
by	O
biological	O
or	O
natural	O
vision	O
.	O
</s>
<s>
Saliency	B-Algorithm
maps	I-Algorithm
have	O
applications	O
in	O
a	O
variety	O
of	O
different	O
problems	O
.	O
</s>
<s>
Image	O
and	O
video	O
compression	O
:	O
The	O
human	O
eye	O
focuses	O
only	O
on	O
a	O
small	O
region	B-Algorithm
of	I-Algorithm
interest	I-Algorithm
in	O
the	O
frame	O
.	O
</s>
<s>
Image	O
and	O
video	B-Device
quality	I-Device
assessment	O
:	O
The	O
main	O
task	O
for	O
an	O
image	O
or	O
video	B-Device
quality	I-Device
metric	O
is	O
a	O
high	O
correlation	O
with	O
user	O
opinions	O
.	O
</s>
<s>
Image	B-Algorithm
retargeting	I-Algorithm
:	O
It	O
aims	O
at	O
resizing	O
an	O
image	O
by	O
expanding	O
or	O
shrinking	O
the	O
noninformative	O
regions	O
.	O
</s>
<s>
Therefore	O
,	O
retargeting	O
algorithms	O
rely	O
on	O
the	O
availability	O
of	O
saliency	B-Algorithm
maps	I-Algorithm
that	O
accurately	O
estimate	O
all	O
the	O
salient	O
image	O
details	O
.	O
</s>
<s>
Object	B-General_Concept
detection	I-General_Concept
and	O
recognition	O
:	O
Instead	O
of	O
applying	O
a	O
computationally	O
complex	O
algorithm	O
to	O
the	O
whole	O
image	O
,	O
we	O
can	O
use	O
it	O
to	O
the	O
most	O
salient	O
regions	O
of	O
an	O
image	O
most	O
likely	O
to	O
contain	O
an	O
object	O
.	O
</s>
<s>
Saliency	O
estimation	O
may	O
be	O
viewed	O
as	O
an	O
instance	O
of	O
image	B-Algorithm
segmentation	I-Algorithm
.	O
</s>
<s>
In	O
computer	B-Application
vision	I-Application
,	O
image	B-Algorithm
segmentation	I-Algorithm
is	O
the	O
process	O
of	O
partitioning	O
a	O
digital	O
image	O
into	O
multiple	O
segments	O
(	O
sets	O
of	O
pixels	B-Algorithm
,	O
also	O
known	O
as	O
superpixels	O
)	O
.	O
</s>
<s>
The	O
goal	O
of	O
segmentation	B-Algorithm
is	O
to	O
simplify	O
and/or	O
change	O
the	O
representation	O
of	O
an	O
image	O
into	O
something	O
that	O
is	O
more	O
meaningful	O
and	O
easier	O
to	O
analyze	O
.	O
</s>
<s>
Image	B-Algorithm
segmentation	I-Algorithm
is	O
typically	O
used	O
to	O
locate	O
objects	O
and	O
boundaries	O
(	O
lines	O
,	O
curves	O
,	O
etc	O
.	O
)	O
</s>
<s>
More	O
precisely	O
,	O
image	B-Algorithm
segmentation	I-Algorithm
is	O
the	O
process	O
of	O
assigning	O
a	O
label	O
to	O
every	O
pixel	B-Algorithm
in	O
an	O
image	O
such	O
that	O
pixels	B-Algorithm
with	O
the	O
same	O
label	O
share	O
certain	O
characteristics	O
.	O
</s>
<s>
There	O
are	O
three	O
forms	O
of	O
classic	O
saliency	O
estimation	O
algorithms	O
in	O
OpenCV	B-Language
:	O
</s>
<s>
Static	O
saliency	O
:	O
Relies	O
on	O
image	O
features	O
and	O
statistics	O
to	O
localize	O
the	O
regions	B-Algorithm
of	I-Algorithm
interest	I-Algorithm
of	O
an	O
image	O
.	O
</s>
<s>
In	O
addition	O
to	O
classic	O
approaches	O
,	O
neural-network-based	B-Architecture
are	O
also	O
popular	O
.	O
</s>
<s>
There	O
are	O
examples	O
of	O
neural	B-Architecture
networks	I-Architecture
for	O
motion	O
saliency	O
estimation	O
:	O
</s>
<s>
First	O
,	O
the	O
encoder	B-Algorithm
network	I-Algorithm
extracts	O
low-resolution	O
spatiotemporal	O
features	O
,	O
and	O
then	O
the	O
following	O
prediction	O
network	O
decodes	O
the	O
spatially	O
encoded	O
features	O
while	O
aggregating	O
all	O
the	O
temporal	O
information	O
.	O
</s>
<s>
First	O
,	O
spatiotemporal	O
features	O
integrated	O
via	O
appearance	O
and	O
optical	O
flow	O
coupling	O
,	O
and	O
then	O
multi-scale	O
saliency	O
learned	O
via	O
attention	B-General_Concept
mechanism	I-General_Concept
.	O
</s>
<s>
This	O
approach	O
employs	O
a	O
single	O
network	O
that	O
learns	O
to	O
localize	O
sound	O
sources	O
and	O
to	O
fuse	O
the	O
two	O
saliencies	O
to	O
obtain	O
a	O
final	O
saliency	B-Algorithm
map	I-Algorithm
.	O
</s>
<s>
First	O
,	O
we	O
should	O
calculate	O
the	O
distance	O
of	O
each	O
pixel	B-Algorithm
to	O
the	O
rest	O
of	O
pixels	B-Algorithm
in	O
the	O
same	O
frame	O
:	O
</s>
<s>
is	O
the	O
value	O
of	O
pixel	B-Algorithm
,	O
in	O
the	O
range	O
of	O
 [ 0 , 255 ] 	O
.	O
</s>
<s>
Where	O
N	O
is	O
the	O
total	O
number	O
of	O
pixels	B-Algorithm
in	O
the	O
current	O
frame	O
.	O
</s>
<s>
This	O
saliency	B-Algorithm
map	I-Algorithm
algorithm	O
has	O
time	O
complexity	O
.	O
</s>
<s>
Since	O
the	O
computational	O
time	O
of	O
histogram	O
is	O
time	O
complexity	O
which	O
N	O
is	O
the	O
number	O
of	O
pixel	B-Algorithm
's	O
number	O
of	O
a	O
frame	O
.	O
</s>
<s>
All	O
of	O
the	O
following	O
code	O
is	O
pseudo	O
MATLAB	B-Language
code	O
.	O
</s>
<s>
Spnum1	O
and	O
Spnum2	O
represent	O
the	O
pixel	B-Algorithm
number	O
of	O
current	O
frame	O
and	O
previous	O
pixel	B-Algorithm
.	O
</s>
<s>
Then	O
we	O
calculate	O
the	O
color	O
distance	O
of	O
each	O
pixel	B-Algorithm
,	O
this	O
process	O
we	O
call	O
it	O
contract	O
function	O
.	O
</s>
<s>
After	O
this	O
two	O
process	O
,	O
we	O
will	O
get	O
a	O
saliency	B-Algorithm
map	I-Algorithm
,	O
and	O
then	O
store	O
all	O
of	O
these	O
maps	O
into	O
a	O
new	O
FileFolder	O
.	O
</s>
<s>
If	O
spnum1	O
and	O
spnum2	O
both	O
represent	O
the	O
current	O
frame	O
's	O
pixel	B-Algorithm
number	O
,	O
then	O
this	O
contract	O
function	O
is	O
for	O
the	O
first	O
saliency	O
function	O
.	O
</s>
<s>
If	O
spnum1	O
is	O
the	O
current	O
frame	O
's	O
pixel	B-Algorithm
number	O
and	O
spnum2	O
represent	O
the	O
previous	O
frame	O
's	O
pixel	B-Algorithm
number	O
,	O
then	O
this	O
contract	O
function	O
is	O
for	O
second	O
saliency	O
function	O
.	O
</s>
<s>
If	O
we	O
use	O
the	O
second	O
contract	O
function	O
which	O
using	O
the	O
pixel	B-Algorithm
of	O
the	O
same	O
frame	O
to	O
get	O
center	O
distance	O
to	O
get	O
a	O
saliency	B-Algorithm
map	I-Algorithm
,	O
then	O
we	O
apply	O
this	O
saliency	O
function	O
to	O
each	O
frame	O
and	O
use	O
current	O
frame	O
's	O
saliency	B-Algorithm
map	I-Algorithm
minus	O
previous	O
frame	O
's	O
saliency	B-Algorithm
map	I-Algorithm
to	O
get	O
a	O
new	O
image	O
which	O
is	O
the	O
new	O
saliency	O
result	O
of	O
the	O
third	O
saliency	O
function	O
.	O
</s>
<s>
The	O
most	O
valuable	O
dataset	O
parameters	O
are	O
spatial	O
resolution	O
,	O
size	O
,	O
and	O
eye-tracking	B-General_Concept
equipment	O
.	O
</s>
<s>
To	O
collect	O
a	O
saliency	O
dataset	O
,	O
image	O
or	O
video	O
sequences	O
and	O
eye-tracking	B-General_Concept
equipment	O
must	O
be	O
prepared	O
,	O
and	O
observers	O
must	O
be	O
invited	O
.	O
</s>
<s>
At	O
the	O
beginning	O
of	O
each	O
recording	O
session	O
,	O
the	O
eye-tracker	B-General_Concept
recalibrates	O
.	O
</s>
<s>
The	O
eye-tracking	B-General_Concept
device	O
is	O
a	O
high-speed	O
camera	O
,	O
capable	O
of	O
recording	O
eye	O
movements	O
at	O
least	O
250	O
frames	O
per	O
second	O
.	O
</s>
