<s>
Unsharp	B-Algorithm
masking	I-Algorithm
(	O
USM	O
)	O
is	O
an	O
image	O
sharpening	O
technique	O
,	O
first	O
implemented	O
in	O
darkroom	O
photography	O
,	O
but	O
now	O
commonly	O
used	O
in	O
digital	B-Algorithm
image	I-Algorithm
processing	I-Algorithm
software	O
.	O
</s>
<s>
Its	O
name	O
derives	O
from	O
the	O
fact	O
that	O
the	O
technique	O
uses	O
a	O
blurred	B-Error_Name
,	O
or	O
"	O
unsharp	O
"	O
,	O
negative	O
image	O
to	O
create	O
a	O
mask	O
of	O
the	O
original	O
image	O
.	O
</s>
<s>
The	O
unsharp	B-Algorithm
mask	I-Algorithm
is	O
then	O
combined	O
with	O
the	O
original	O
positive	O
image	O
,	O
creating	O
an	O
image	O
that	O
is	O
less	O
blurry	O
than	O
the	O
original	O
.	O
</s>
<s>
In	O
the	O
context	O
of	O
signal	O
processing	O
,	O
an	O
unsharp	B-Algorithm
mask	I-Algorithm
is	O
generally	O
a	O
linear	O
or	O
nonlinear	O
filter	O
that	O
amplifies	O
the	O
high-frequency	O
components	O
of	O
a	O
signal	O
.	O
</s>
<s>
However	O
,	O
the	O
positive	O
copy	O
is	O
made	O
with	O
the	O
copy	O
material	O
in	O
contact	O
with	O
the	O
back	O
of	O
the	O
original	O
,	O
rather	O
than	O
emulsion-to-emulsion	O
,	O
so	O
it	O
is	O
blurred	B-Error_Name
.	O
</s>
<s>
After	O
processing	O
this	O
blurred	B-Error_Name
positive	O
is	O
replaced	O
in	O
contact	O
with	O
the	O
back	O
of	O
the	O
original	O
negative	O
.	O
</s>
<s>
Because	O
the	O
positive	O
has	O
been	O
blurred	B-Error_Name
intentionally	O
,	O
only	O
the	O
low-frequency	O
(	O
blurred	B-Error_Name
)	O
information	O
is	O
cancelled	O
.	O
</s>
<s>
The	O
resulting	O
print	O
appears	O
more	O
acute	O
than	O
one	O
made	O
without	O
the	O
unsharp	B-Algorithm
mask	I-Algorithm
:	O
its	O
acutance	B-Algorithm
is	O
increased	O
.	O
</s>
<s>
In	O
the	O
photographic	O
procedure	O
,	O
the	O
amount	O
of	O
blurring	O
can	O
be	O
controlled	O
by	O
changing	O
the	O
"	O
softness	O
"	O
or	O
"	O
hardness	O
"	O
(	O
from	O
point	O
source	O
to	O
fully	O
diffuse	O
)	O
of	O
the	O
light	O
source	O
used	O
for	O
the	O
initial	O
unsharp	B-Algorithm
mask	I-Algorithm
exposure	O
,	O
while	O
the	O
strength	O
of	O
the	O
effect	O
can	O
be	O
controlled	O
by	O
changing	O
the	O
contrast	O
and	O
density	O
(	O
i.e.	O
,	O
exposure	O
and	O
development	O
)	O
of	O
the	O
unsharp	B-Algorithm
mask	I-Algorithm
.	O
</s>
<s>
For	O
traditional	O
photography	O
,	O
unsharp	B-Algorithm
masking	I-Algorithm
is	O
usually	O
used	O
on	O
monochrome	O
materials	O
;	O
special	O
panchromatic	O
soft-working	O
black-and-white	O
films	O
have	O
been	O
available	O
for	O
masking	O
photographic	O
colour	O
transparencies	O
.	O
</s>
<s>
The	O
same	O
differencing	O
principle	O
is	O
used	O
in	O
the	O
unsharp-masking	O
tool	O
in	O
many	O
digital-imaging	O
software	O
packages	O
,	O
such	O
as	O
Adobe	B-Operating_System
Photoshop	I-Operating_System
and	O
GIMP	B-Application
.	O
</s>
<s>
The	O
software	O
applies	O
a	O
Gaussian	B-Error_Name
blur	I-Error_Name
to	O
a	O
copy	O
of	O
the	O
original	O
image	O
and	O
then	O
compares	O
it	O
to	O
the	O
original	O
.	O
</s>
<s>
Digital	O
unsharp	B-Algorithm
masking	I-Algorithm
is	O
a	O
flexible	O
and	O
powerful	O
way	O
to	O
increase	O
sharpness	O
,	O
especially	O
in	O
scanned	B-Application
images	I-Application
.	O
</s>
<s>
Unfortunately	O
,	O
it	O
may	O
create	O
unwanted	O
conspicuous	O
edge	O
effects	O
or	O
increase	O
image	B-Algorithm
noise	I-Algorithm
.	O
</s>
<s>
However	O
,	O
these	O
effects	O
can	O
be	O
used	O
creatively	O
,	O
especially	O
if	O
a	O
single	O
channel	B-Algorithm
of	O
an	O
RGB	O
or	O
Lab	O
image	O
is	O
sharpened	O
.	O
</s>
<s>
Undesired	O
effects	O
can	O
be	O
reduced	O
by	O
using	O
a	O
mask	O
—	O
particularly	O
one	O
created	O
by	O
edge	B-Algorithm
detection	I-Algorithm
—	O
to	O
only	O
apply	O
sharpening	O
to	O
desired	O
regions	O
,	O
sometimes	O
termed	O
"	O
smart	O
sharpen	B-Algorithm
"	O
.	O
</s>
<s>
Typically	O
,	O
digital	O
unsharp	B-Algorithm
masking	I-Algorithm
is	O
controlled	O
via	O
the	O
amount	O
,	O
radius	O
and	O
threshold	O
:	O
</s>
<s>
Amount	O
is	O
listed	O
as	O
a	O
percentage	O
and	O
controls	O
the	O
magnitude	O
of	O
each	O
overshoot	B-Algorithm
(	O
how	O
much	O
darker	O
and	O
how	O
much	O
lighter	O
the	O
edge	O
borders	O
become	O
)	O
.	O
</s>
<s>
The	O
threshold	O
setting	O
can	O
be	O
used	O
to	O
sharpen	B-Algorithm
more	O
pronounced	O
edges	O
,	O
while	O
leaving	O
subtler	O
edges	O
untouched	O
.	O
</s>
<s>
Low	O
values	O
should	O
sharpen	B-Algorithm
more	O
because	O
fewer	O
areas	O
are	O
excluded	O
.	O
</s>
<s>
sharpened	O
=	O
original	O
+	O
(	O
original	O
−	O
blurred	B-Error_Name
)	O
×	O
amount	O
.	O
</s>
<s>
Unsharp	B-Algorithm
masking	I-Algorithm
may	O
also	O
be	O
used	O
with	O
a	O
large	O
radius	O
and	O
a	O
small	O
amount	O
(	O
such	O
as	O
30	O
–	O
100	O
pixel	O
radius	O
and	O
5	O
–	O
20%	O
amount	O
)	O
,	O
which	O
yields	O
increased	O
local	O
contrast	O
,	O
a	O
technique	O
termed	O
local	O
contrast	O
enhancement	O
.	O
</s>
<s>
More	O
powerful	O
techniques	O
for	O
improving	O
tonality	O
are	O
referred	O
to	O
as	O
tone	B-Language
mapping	I-Language
.	O
</s>
<s>
For	O
image	B-Algorithm
processing	I-Algorithm
,	O
deconvolution	B-Algorithm
is	O
the	O
process	O
of	O
approximately	O
inverting	O
the	O
process	O
that	O
caused	O
an	O
image	O
to	O
be	O
blurred	B-Error_Name
.	O
</s>
<s>
Specifically	O
,	O
unsharp	B-Algorithm
masking	I-Algorithm
is	O
a	O
simple	O
linear	O
image	O
operation	O
—	O
a	O
convolution	B-Language
by	O
a	O
kernel	B-Algorithm
that	O
is	O
the	O
Dirac	O
delta	O
minus	O
a	O
gaussian	B-Error_Name
blur	I-Error_Name
kernel	B-Algorithm
.	O
</s>
<s>
Deconvolution	B-Algorithm
,	O
on	O
the	O
other	O
hand	O
,	O
is	O
generally	O
considered	O
an	O
ill-posed	B-Algorithm
inverse	O
problem	O
that	O
is	O
best	O
solved	O
by	O
nonlinear	O
approaches	O
.	O
</s>
<s>
While	O
unsharp	B-Algorithm
masking	I-Algorithm
increases	O
the	O
apparent	O
sharpness	O
of	O
an	O
image	O
in	O
ignorance	O
of	O
the	O
manner	O
in	O
which	O
the	O
image	O
was	O
acquired	O
,	O
deconvolution	B-Algorithm
increases	O
the	O
apparent	O
sharpness	O
of	O
an	O
image	O
,	O
but	O
is	O
based	O
on	O
information	O
describing	O
some	O
of	O
the	O
likely	O
origins	O
of	O
the	O
distortions	O
of	O
the	O
light	O
path	O
used	O
in	O
capturing	O
the	O
image	O
;	O
it	O
may	O
therefore	O
sometimes	O
be	O
preferred	O
,	O
where	O
the	O
cost	O
in	O
preparation	O
time	O
and	O
per-image	O
computation	O
time	O
are	O
offset	O
by	O
the	O
increase	O
in	O
image	O
clarity	O
.	O
</s>
<s>
With	O
deconvolution	B-Algorithm
,	O
"	O
lost	O
"	O
image	O
detail	O
may	O
be	O
approximately	O
recovered	O
,	O
although	O
it	O
generally	O
is	O
impossible	O
to	O
verify	O
that	O
any	O
recovered	O
detail	O
is	O
accurate	O
.	O
</s>
<s>
For	O
deconvolution	B-Algorithm
to	O
be	O
effective	O
,	O
all	O
variables	O
in	O
the	O
image	O
scene	O
and	O
capturing	O
device	O
need	O
to	O
be	O
modeled	O
,	O
including	O
aperture	B-General_Concept
,	O
focal	B-Algorithm
length	I-Algorithm
,	O
distance	O
to	O
subject	O
,	O
lens	O
,	O
and	O
media	O
refractive	O
indices	O
and	O
geometries	O
.	O
</s>
<s>
Applying	O
deconvolution	B-Algorithm
successfully	O
to	O
general-purpose	O
camera	O
images	O
is	O
usually	O
not	O
feasible	O
,	O
because	O
the	O
geometries	O
of	O
the	O
scene	O
are	O
not	O
set	O
.	O
</s>
<s>
However	O
,	O
deconvolution	B-Algorithm
is	O
applied	O
in	O
reality	O
to	O
microscopy	O
and	O
astronomical	O
imaging	O
,	O
where	O
the	O
value	O
of	O
gained	O
sharpness	O
is	O
high	O
,	O
imaging	O
devices	O
and	O
the	O
relative	O
subject	O
positions	O
are	O
both	O
well	O
defined	O
,	O
and	O
optimization	O
of	O
the	O
imaging	O
devices	O
to	O
improve	O
sharpness	O
physically	O
would	O
cost	O
significantly	O
more	O
.	O
</s>
<s>
In	O
cases	O
where	O
a	O
stable	O
,	O
well-defined	O
aberration	O
is	O
present	O
,	O
such	O
as	O
the	O
lens	O
defect	O
in	O
early	O
Hubble	O
Space	O
Telescope	O
images	O
,	O
deconvolution	B-Algorithm
is	O
an	O
especially	O
effective	O
technique	O
.	O
</s>
<s>
This	O
matrix	O
is	O
obtained	O
using	O
the	O
equation	O
shown	O
above	O
under	O
#Digital	O
unsharp	B-Algorithm
masking	I-Algorithm
,	O
using	O
a	O
uniform	O
kernel	B-Algorithm
with	O
5	O
pixels	O
for	O
the	O
"	O
blurred	B-Error_Name
"	O
image	O
,	O
and	O
5	O
for	O
the	O
"	O
amount	O
"	O
multiplier	O
:	O
</s>
<s>
The	O
value	O
of	O
5	O
was	O
chosen	O
here	O
to	O
yield	O
a	O
kernel	B-Algorithm
with	O
integer	O
values	O
,	O
but	O
this	O
is	O
not	O
a	O
requirement	O
for	O
the	O
operation	O
.	O
</s>
