<s>
The	O
Canny	B-Algorithm
edge	I-Algorithm
detector	I-Algorithm
is	O
an	O
edge	B-Algorithm
detection	I-Algorithm
operator	I-Algorithm
that	O
uses	O
a	O
multi-stage	O
algorithm	O
to	O
detect	O
a	O
wide	O
range	O
of	O
edges	O
in	O
images	O
.	O
</s>
<s>
Canny	O
also	O
produced	O
a	O
computational	O
theory	O
of	O
edge	B-Algorithm
detection	I-Algorithm
explaining	O
why	O
the	O
technique	O
works	O
.	O
</s>
<s>
Canny	B-Algorithm
edge	I-Algorithm
detection	I-Algorithm
is	O
a	O
technique	O
to	O
extract	O
useful	O
structural	O
information	O
from	O
different	O
vision	O
objects	O
and	O
dramatically	O
reduce	O
the	O
amount	O
of	O
data	O
to	O
be	O
processed	O
.	O
</s>
<s>
It	O
has	O
been	O
widely	O
applied	O
in	O
various	O
computer	B-Application
vision	I-Application
systems	O
.	O
</s>
<s>
Canny	O
has	O
found	O
that	O
the	O
requirements	O
for	O
the	O
application	O
of	O
edge	B-Algorithm
detection	I-Algorithm
on	O
diverse	O
vision	O
systems	O
are	O
relatively	O
similar	O
.	O
</s>
<s>
Thus	O
,	O
an	O
edge	B-Algorithm
detection	I-Algorithm
solution	O
to	O
address	O
these	O
requirements	O
can	O
be	O
implemented	O
in	O
a	O
wide	O
range	O
of	O
situations	O
.	O
</s>
<s>
The	O
general	O
criteria	O
for	O
edge	B-Algorithm
detection	I-Algorithm
include	O
:	O
</s>
<s>
To	O
satisfy	O
these	O
requirements	O
Canny	O
used	O
the	O
calculus	B-Algorithm
of	I-Algorithm
variations	I-Algorithm
–	O
a	O
technique	O
which	O
finds	O
the	O
function	O
which	O
optimizes	O
a	O
given	O
functional	O
.	O
</s>
<s>
The	O
optimal	O
function	O
in	O
Canny	O
's	O
detector	O
is	O
described	O
by	O
the	O
sum	O
of	O
four	O
exponential	O
terms	O
,	O
but	O
it	O
can	O
be	O
approximated	O
by	O
the	O
first	B-Algorithm
derivative	I-Algorithm
of	O
a	O
Gaussian	O
.	O
</s>
<s>
Among	O
the	O
edge	B-Algorithm
detection	I-Algorithm
methods	O
developed	O
so	O
far	O
,	O
Canny	B-Algorithm
edge	I-Algorithm
detection	I-Algorithm
algorithm	O
is	O
one	O
of	O
the	O
most	O
strictly	O
defined	O
methods	O
that	O
provides	O
good	O
and	O
reliable	O
detection	O
.	O
</s>
<s>
Owing	O
to	O
its	O
optimality	O
to	O
meet	O
with	O
the	O
three	O
criteria	O
for	O
edge	B-Algorithm
detection	I-Algorithm
and	O
the	O
simplicity	O
of	O
process	O
for	O
implementation	O
,	O
it	O
became	O
one	O
of	O
the	O
most	O
popular	O
algorithms	O
for	O
edge	B-Algorithm
detection	I-Algorithm
.	O
</s>
<s>
The	O
process	O
of	O
Canny	B-Algorithm
edge	I-Algorithm
detection	I-Algorithm
algorithm	O
can	O
be	O
broken	O
down	O
to	O
five	O
different	O
steps	O
:	O
</s>
<s>
Since	O
all	O
edge	B-Algorithm
detection	I-Algorithm
results	O
are	O
easily	O
affected	O
by	O
the	O
noise	O
in	O
the	O
image	O
,	O
it	O
is	O
essential	O
to	O
filter	O
out	O
the	O
noise	O
to	O
prevent	O
false	O
detection	O
caused	O
by	O
it	O
.	O
</s>
<s>
(	O
The	O
asterisk	O
denotes	O
a	O
convolution	B-Language
operation	O
.	O
)	O
</s>
<s>
The	O
edge	B-Algorithm
detection	I-Algorithm
operator	I-Algorithm
(	O
such	O
as	O
Roberts	B-Algorithm
,	O
Prewitt	B-Algorithm
,	O
or	O
Sobel	B-Algorithm
)	O
returns	O
a	O
value	O
for	O
the	O
first	B-Algorithm
derivative	I-Algorithm
in	O
the	O
horizontal	O
direction	O
(	O
Gx	O
)	O
and	O
the	O
vertical	O
direction	O
(	O
Gy	O
)	O
.	O
</s>
<s>
To	O
track	O
the	O
edge	O
connection	O
,	O
blob	B-General_Concept
analysis	I-General_Concept
is	O
applied	O
by	O
looking	O
at	O
a	O
weak	O
edge	O
pixel	O
and	O
its	O
8-connected	O
neighborhood	O
pixels	O
.	O
</s>
<s>
While	O
traditional	O
Canny	B-Algorithm
edge	I-Algorithm
detection	I-Algorithm
provides	O
a	O
relatively	O
simple	O
but	O
precise	O
methodology	O
for	O
the	O
edge	B-Algorithm
detection	I-Algorithm
problem	O
,	O
with	O
more	O
demanding	O
requirements	O
on	O
the	O
accuracy	O
and	O
robustness	O
on	O
the	O
detection	O
,	O
the	O
traditional	O
algorithm	O
can	O
no	O
longer	O
handle	O
the	O
challenging	O
edge	B-Algorithm
detection	I-Algorithm
task	O
.	O
</s>
<s>
For	O
the	O
gradient	O
amplitude	O
calculation	O
,	O
the	O
old	O
Canny	B-Algorithm
edge	I-Algorithm
detection	I-Algorithm
algorithm	O
uses	O
the	O
center	O
in	O
a	O
small	O
2×2	O
neighborhood	O
window	O
to	O
calculate	O
the	O
finite	B-Algorithm
difference	I-Algorithm
mean	O
value	O
to	O
represent	O
the	O
gradient	O
amplitude	O
.	O
</s>
<s>
In	O
the	O
traditional	O
Canny	B-Algorithm
edge	I-Algorithm
detection	I-Algorithm
algorithm	O
,	O
there	O
will	O
be	O
two	O
fixed	O
global	O
threshold	O
values	O
to	O
filter	O
out	O
the	O
false	O
edges	O
.	O
</s>
<s>
The	O
gradient	O
magnitude	O
and	O
direction	O
can	O
be	O
calculated	O
with	O
a	O
variety	O
of	O
different	O
edge	B-Algorithm
detection	I-Algorithm
operators	O
,	O
and	O
the	O
choice	O
of	O
operator	O
can	O
influence	O
the	O
quality	O
of	O
results	O
.	O
</s>
<s>
A	O
very	O
commonly	O
chosen	O
one	O
is	O
the	O
3x3	O
Sobel	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
However	O
,	O
other	O
filters	O
may	O
be	O
better	O
,	O
such	O
as	O
a	O
5x5	O
Sobel	B-Algorithm
filter	I-Algorithm
,	O
which	O
will	O
reduce	O
noise	O
,	O
or	O
the	O
Scharr	O
filter	O
,	O
which	O
has	O
better	O
rotational	O
symmetry	O
.	O
</s>
<s>
Other	O
common	O
choices	O
are	O
Prewitt	B-Algorithm
(	O
used	O
by	O
Zhou	O
)	O
and	O
Roberts	B-Algorithm
Cross	I-Algorithm
.	O
</s>
<s>
In	O
order	O
to	O
resolve	O
the	O
challenges	O
where	O
it	O
is	O
hard	O
to	O
determine	O
the	O
dual-threshold	O
value	O
empirically	O
,	O
Otsu	B-Algorithm
's	I-Algorithm
method	I-Algorithm
can	O
be	O
used	O
on	O
the	O
non-maximum	O
suppressed	O
gradient	O
magnitude	O
image	O
to	O
generate	O
the	O
high	O
threshold	O
.	O
</s>
<s>
Since	O
the	O
gradient	O
magnitude	O
image	O
is	O
continuous-valued	O
without	O
a	O
well-defined	O
maximum	O
,	O
Otsu	B-Algorithm
's	I-Algorithm
method	I-Algorithm
has	O
to	O
be	O
adapted	O
to	O
use	O
value/count	O
pairs	O
instead	O
of	O
a	O
complete	O
histogram	O
.	O
</s>
<s>
While	O
the	O
traditional	O
Canny	B-Algorithm
edge	I-Algorithm
detection	I-Algorithm
implements	O
a	O
good	O
detection	O
result	O
to	O
meet	O
the	O
first	O
two	O
criteria	O
,	O
it	O
does	O
not	O
meet	O
the	O
single	O
response	O
per	O
edge	O
strictly	O
.	O
</s>
<s>
A	O
more	O
refined	O
approach	O
to	O
obtain	O
edges	O
with	O
sub-pixel	O
accuracy	O
is	O
by	O
using	O
the	O
approach	O
of	O
differential	O
edge	B-Algorithm
detection	I-Algorithm
,	O
where	O
the	O
requirement	O
of	O
non-maximum	O
suppression	O
is	O
formulated	O
in	O
terms	O
of	O
second	O
-	O
and	O
third-order	O
derivatives	B-Algorithm
computed	O
from	O
a	O
scale	B-Algorithm
space	I-Algorithm
representation	I-Algorithm
(	O
Lindeberg	O
1998	O
)	O
–	O
see	O
the	O
article	O
on	O
edge	B-Algorithm
detection	I-Algorithm
for	O
a	O
detailed	O
description	O
.	O
</s>
<s>
A	O
variational	O
explanation	O
for	O
the	O
main	O
ingredient	O
of	O
the	O
Canny	B-Algorithm
edge	I-Algorithm
detector	I-Algorithm
,	O
that	O
is	O
,	O
</s>
<s>
In	O
Canny	O
's	O
original	O
paper	O
,	O
the	O
derivation	B-Algorithm
of	O
the	O
optimal	O
filter	O
led	O
to	O
a	O
Finite	O
Impulse	O
Response	O
filter	O
,	O
which	O
can	O
be	O
slow	O
to	O
compute	O
in	O
the	O
spatial	O
domain	O
if	O
the	O
amount	O
of	O
smoothing	O
required	O
is	O
important	O
(	O
the	O
filter	O
will	O
have	O
a	O
large	O
spatial	O
support	O
in	O
that	O
case	O
)	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
it	O
is	O
often	O
suggested	O
to	O
use	O
Rachid	O
Deriche	O
's	O
infinite	O
impulse	O
response	O
form	O
of	O
Canny	O
's	O
filter	O
(	O
the	O
Canny	B-Algorithm
–	I-Algorithm
Deriche	I-Algorithm
detector	I-Algorithm
)	O
,	O
which	O
is	O
recursive	O
,	O
and	O
which	O
can	O
be	O
computed	O
in	O
a	O
short	O
,	O
fixed	O
amount	O
of	O
time	O
for	O
any	O
desired	O
amount	O
of	O
smoothing	O
.	O
</s>
<s>
The	O
second	O
form	O
is	O
suitable	O
for	O
real	O
time	O
implementations	O
in	O
FPGAs	B-Architecture
or	O
DSPs	B-Architecture
,	O
or	O
very	O
fast	O
embedded	O
PCs	O
.	O
</s>
<s>
In	O
this	O
context	O
,	O
however	O
,	O
the	O
regular	O
recursive	O
implementation	O
of	O
the	O
Canny	B-Algorithm
operator	I-Algorithm
does	O
not	O
give	O
a	O
good	O
approximation	O
of	O
rotational	O
symmetry	O
and	O
therefore	O
gives	O
a	O
bias	O
towards	O
horizontal	O
and	O
vertical	O
edges	O
.	O
</s>
