<s>
In	O
image	B-Algorithm
processing	I-Algorithm
,	O
a	O
Gaussian	B-Error_Name
blur	I-Error_Name
(	O
also	O
known	O
as	O
Gaussian	B-Error_Name
smoothing	I-Error_Name
)	O
is	O
the	O
result	O
of	O
blurring	O
an	O
image	O
by	O
a	O
Gaussian	O
function	O
(	O
named	O
after	O
mathematician	O
and	O
scientist	O
Carl	O
Friedrich	O
Gauss	O
)	O
.	O
</s>
<s>
It	O
is	O
a	O
widely	O
used	O
effect	O
in	O
graphics	O
software	O
,	O
typically	O
to	O
reduce	O
image	B-Algorithm
noise	I-Algorithm
and	O
reduce	O
detail	O
.	O
</s>
<s>
Gaussian	B-Error_Name
smoothing	I-Error_Name
is	O
also	O
used	O
as	O
a	O
pre-processing	O
stage	O
in	O
computer	B-Application
vision	I-Application
algorithms	O
in	O
order	O
to	O
enhance	O
image	O
structures	O
at	O
different	O
scales	O
—	O
see	O
scale	B-Algorithm
space	I-Algorithm
representation	I-Algorithm
and	O
scale	B-Algorithm
space	I-Algorithm
implementation	I-Algorithm
.	O
</s>
<s>
Mathematically	O
,	O
applying	O
a	O
Gaussian	B-Error_Name
blur	I-Error_Name
to	O
an	O
image	O
is	O
the	O
same	O
as	O
convolving	B-Language
the	O
image	O
with	O
a	O
Gaussian	O
function	O
.	O
</s>
<s>
This	O
is	O
also	O
known	O
as	O
a	O
two-dimensional	O
Weierstrass	B-Algorithm
transform	I-Algorithm
.	O
</s>
<s>
By	O
contrast	O
,	O
convolving	B-Language
by	O
a	O
circle	O
(	O
i.e.	O
,	O
a	O
circular	O
box	B-Algorithm
blur	I-Algorithm
)	O
would	O
more	O
accurately	O
reproduce	O
the	O
bokeh	O
effect	O
.	O
</s>
<s>
Since	O
the	O
Fourier	B-Algorithm
transform	I-Algorithm
of	O
a	O
Gaussian	O
is	O
another	O
Gaussian	O
,	O
applying	O
a	O
Gaussian	B-Error_Name
blur	I-Error_Name
has	O
the	O
effect	O
of	O
reducing	O
the	O
image	O
's	O
high-frequency	O
components	O
;	O
a	O
Gaussian	B-Error_Name
blur	I-Error_Name
is	O
thus	O
a	O
low-pass	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
The	O
Gaussian	B-Error_Name
blur	I-Error_Name
is	O
a	O
type	O
of	O
image-blurring	O
filter	O
that	O
uses	O
a	O
Gaussian	O
function	O
(	O
which	O
also	O
expresses	O
the	O
normal	O
distribution	O
in	O
statistics	O
)	O
for	O
calculating	O
the	O
transformation	B-Algorithm
to	O
apply	O
to	O
each	O
pixel	B-Algorithm
in	O
the	O
image	O
.	O
</s>
<s>
where	O
x	O
is	O
the	O
distance	O
from	O
the	O
origin	O
in	O
the	O
horizontal	O
axis	O
,	O
y	O
is	O
the	O
distance	O
from	O
the	O
origin	O
in	O
the	O
vertical	O
axis	O
,	O
and	O
σ	O
is	O
the	O
standard	B-General_Concept
deviation	I-General_Concept
of	O
the	O
Gaussian	O
distribution	O
.	O
</s>
<s>
Values	O
from	O
this	O
distribution	O
are	O
used	O
to	O
build	O
a	O
convolution	B-Language
matrix	O
which	O
is	O
applied	O
to	O
the	O
original	O
image	O
.	O
</s>
<s>
This	O
convolution	B-Language
process	O
is	O
illustrated	O
visually	O
in	O
the	O
figure	O
on	O
the	O
right	O
.	O
</s>
<s>
Each	O
pixel	B-Algorithm
's	O
new	O
value	O
is	O
set	O
to	O
a	O
weighted	O
average	O
of	O
that	O
pixel	B-Algorithm
's	O
neighborhood	O
.	O
</s>
<s>
The	O
original	O
pixel	B-Algorithm
's	O
value	O
receives	O
the	O
heaviest	O
weight	O
(	O
having	O
the	O
highest	O
Gaussian	O
value	O
)	O
and	O
neighboring	O
pixels	B-Algorithm
receive	O
smaller	O
weights	O
as	O
their	O
distance	O
to	O
the	O
original	O
pixel	B-Algorithm
increases	O
.	O
</s>
<s>
This	O
results	O
in	O
a	O
blur	O
that	O
preserves	O
boundaries	O
and	O
edges	O
better	O
than	O
other	O
,	O
more	O
uniform	O
blurring	B-Error_Name
filters	I-Error_Name
;	O
see	O
also	O
scale	B-Algorithm
space	I-Algorithm
implementation	I-Algorithm
.	O
</s>
<s>
In	O
theory	O
,	O
the	O
Gaussian	O
function	O
at	O
every	O
point	O
on	O
the	O
image	O
will	O
be	O
non-zero	O
,	O
meaning	O
that	O
the	O
entire	O
image	O
would	O
need	O
to	O
be	O
included	O
in	O
the	O
calculations	O
for	O
each	O
pixel	B-Algorithm
.	O
</s>
<s>
In	O
practice	O
,	O
when	O
computing	O
a	O
discrete	O
approximation	O
of	O
the	O
Gaussian	O
function	O
,	O
pixels	B-Algorithm
at	O
a	O
distance	O
of	O
more	O
than	O
3σ	O
have	O
a	O
small	O
enough	O
influence	O
to	O
be	O
considered	O
effectively	O
zero	O
.	O
</s>
<s>
Thus	O
contributions	O
from	O
pixels	B-Algorithm
outside	O
that	O
range	O
can	O
be	O
ignored	O
.	O
</s>
<s>
Typically	O
,	O
an	O
image	B-Algorithm
processing	I-Algorithm
program	O
need	O
only	O
calculate	O
a	O
matrix	O
with	O
dimensions	O
×	O
(	O
where	O
is	O
the	O
ceiling	O
function	O
)	O
to	O
ensure	O
a	O
result	O
sufficiently	O
close	O
to	O
that	O
obtained	O
by	O
the	O
entire	O
Gaussian	O
distribution	O
.	O
</s>
<s>
In	O
addition	O
to	O
being	O
circularly	O
symmetric	O
,	O
the	O
Gaussian	B-Error_Name
blur	I-Error_Name
can	O
be	O
applied	O
to	O
a	O
two-dimensional	O
image	O
as	O
two	O
independent	O
one-dimensional	O
calculations	O
,	O
and	O
so	O
is	O
termed	O
a	O
separable	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
Applying	O
successive	O
Gaussian	B-Error_Name
blurs	I-Error_Name
to	O
an	O
image	O
has	O
the	O
same	O
effect	O
as	O
applying	O
a	O
single	O
,	O
larger	O
Gaussian	B-Error_Name
blur	I-Error_Name
,	O
whose	O
radius	O
is	O
the	O
square	O
root	O
of	O
the	O
sum	O
of	O
the	O
squares	O
of	O
the	O
blur	O
radii	O
that	O
were	O
actually	O
applied	O
.	O
</s>
<s>
For	O
example	O
,	O
applying	O
successive	O
Gaussian	B-Error_Name
blurs	I-Error_Name
with	O
radii	O
of	O
6	O
and	O
8	O
gives	O
the	O
same	O
results	O
as	O
applying	O
a	O
single	O
Gaussian	B-Error_Name
blur	I-Error_Name
of	O
radius	O
10	O
,	O
since	O
.	O
</s>
<s>
Because	O
of	O
this	O
relationship	O
,	O
processing	O
time	O
cannot	O
be	O
saved	O
by	O
simulating	O
a	O
Gaussian	B-Error_Name
blur	I-Error_Name
with	O
successive	O
,	O
smaller	O
blurs	O
—	O
the	O
time	O
required	O
will	O
be	O
at	O
least	O
as	O
great	O
as	O
performing	O
the	O
single	O
large	O
blur	O
.	O
</s>
<s>
When	O
downsampling	B-Algorithm
an	O
image	O
,	O
it	O
is	O
common	O
to	O
apply	O
a	O
low-pass	B-Algorithm
filter	I-Algorithm
to	O
the	O
image	O
prior	O
to	O
resampling	O
.	O
</s>
<s>
This	O
is	O
to	O
ensure	O
that	O
spurious	O
high-frequency	O
information	O
does	O
not	O
appear	O
in	O
the	O
downsampled	B-Algorithm
image	O
(	O
aliasing	B-Error_Name
)	O
.	O
</s>
<s>
Gaussian	B-Error_Name
blurs	I-Error_Name
have	O
nice	O
properties	O
,	O
such	O
as	O
having	O
no	O
sharp	O
edges	O
,	O
and	O
thus	O
do	O
not	O
introduce	O
ringing	O
into	O
the	O
filtered	O
image	O
.	O
</s>
<s>
Gaussian	B-Error_Name
blur	I-Error_Name
is	O
a	O
low-pass	B-Algorithm
filter	I-Algorithm
,	O
attenuating	O
high	O
frequency	O
signals	O
.	O
</s>
<s>
Its	O
amplitude	O
Bode	B-Algorithm
plot	I-Algorithm
(	O
the	O
log	O
scale	O
in	O
the	O
frequency	O
domain	O
)	O
is	O
a	O
parabola	O
.	O
</s>
<s>
How	O
much	O
does	O
a	O
Gaussian	O
filter	O
with	O
standard	B-General_Concept
deviation	I-General_Concept
smooth	O
the	O
picture	O
?	O
</s>
<s>
In	O
other	O
words	O
,	O
how	O
much	O
does	O
it	O
reduce	O
the	O
standard	B-General_Concept
deviation	I-General_Concept
of	O
pixel	B-Algorithm
values	O
in	O
the	O
picture	O
?	O
</s>
<s>
This	O
sample	O
matrix	O
is	O
produced	O
by	O
sampling	O
the	O
Gaussian	O
filter	O
kernel	O
(	O
with	O
σ	O
=	O
0.84089642	O
)	O
at	O
the	O
midpoints	O
of	O
each	O
pixel	B-Algorithm
and	O
then	O
normalizing	O
.	O
</s>
<s>
A	O
Gaussian	B-Error_Name
blur	I-Error_Name
effect	O
is	O
typically	O
generated	O
by	O
convolving	B-Language
an	O
image	O
with	O
an	O
FIR	O
kernel	O
of	O
Gaussian	O
values	O
.	O
</s>
<s>
In	O
practice	O
,	O
it	O
is	O
best	O
to	O
take	O
advantage	O
of	O
the	O
Gaussian	B-Error_Name
blur	I-Error_Name
’s	O
separable	O
property	O
by	O
dividing	O
the	O
process	O
into	O
two	O
passes	O
.	O
</s>
<s>
The	O
resulting	O
effect	O
is	O
the	O
same	O
as	O
convolving	B-Language
with	O
a	O
two-dimensional	O
kernel	O
in	O
a	O
single	O
pass	O
,	O
but	O
requires	O
fewer	O
calculations	O
.	O
</s>
<s>
Discretization	O
is	O
typically	O
achieved	O
by	O
sampling	O
the	O
Gaussian	O
filter	O
kernel	O
at	O
discrete	O
points	O
,	O
normally	O
at	O
positions	O
corresponding	O
to	O
the	O
midpoints	O
of	O
each	O
pixel	B-Algorithm
.	O
</s>
<s>
In	O
these	O
cases	O
,	O
accuracy	O
is	O
maintained	O
(	O
at	O
a	O
slight	O
computational	O
cost	O
)	O
by	O
integration	O
of	O
the	O
Gaussian	O
function	O
over	O
each	O
pixel	B-Algorithm
's	O
area	O
.	O
</s>
<s>
For	O
a	O
more	O
detailed	O
description	O
about	O
the	O
discrete	O
analogue	O
of	O
the	O
Gaussian	O
kernel	O
,	O
see	O
the	O
article	O
on	O
scale-space	B-Algorithm
implementation	I-Algorithm
and	O
.	O
</s>
<s>
These	O
include	O
the	O
very	O
fast	O
multiple	O
box	B-Algorithm
blurs	I-Algorithm
,	O
the	O
fast	O
and	O
accurate	O
IIR	O
Deriche	B-Algorithm
edge	I-Algorithm
detector	I-Algorithm
,	O
a	O
"	O
stack	O
blur	O
"	O
based	O
on	O
the	O
box	B-Algorithm
blur	I-Algorithm
,	O
and	O
more	O
.	O
</s>
<s>
The	O
time-causal	O
limit	O
kernel	O
corresponds	O
to	O
convolution	B-Language
with	O
an	O
infinite	O
number	O
of	O
truncated	O
exponential	O
kernels	O
coupled	O
in	O
cascade	O
,	O
with	O
specifically	O
chosen	O
time	O
constants	O
.	O
</s>
<s>
Gaussian	B-Error_Name
smoothing	I-Error_Name
is	O
commonly	O
used	O
with	O
edge	B-Algorithm
detection	I-Algorithm
.	O
</s>
<s>
Using	O
a	O
Gaussian	B-Error_Name
Blur	I-Error_Name
filter	O
before	O
edge	B-Algorithm
detection	I-Algorithm
aims	O
to	O
reduce	O
the	O
level	O
of	O
noise	O
in	O
the	O
image	O
,	O
which	O
improves	O
the	O
result	O
of	O
the	O
following	O
edge-detection	O
algorithm	O
.	O
</s>
<s>
Lower-end	O
digital	B-Device
cameras	I-Device
,	O
including	O
many	O
mobile	O
phone	O
cameras	O
,	O
commonly	O
use	O
gaussian	O
blurring	O
to	O
obscure	O
image	B-Algorithm
noise	I-Algorithm
caused	O
by	O
higher	O
ISO	O
light	O
sensitivities	O
.	O
</s>
<s>
Gaussian	B-Error_Name
blur	I-Error_Name
is	O
automatically	O
applied	O
as	O
part	O
of	O
the	O
image	O
post-processing	B-Application
of	O
the	O
photo	O
by	O
the	O
camera	O
software	O
,	O
leading	O
to	O
an	O
irreversible	O
loss	O
of	O
detail	O
.	O
</s>
