<s>
Focus	B-Algorithm
stacking	I-Algorithm
(	O
also	O
known	O
as	O
focal	O
plane	O
merging	O
and	O
z-stacking	O
or	O
focus	O
blending	O
)	O
is	O
a	O
digital	B-Algorithm
image	I-Algorithm
processing	I-Algorithm
technique	O
which	O
combines	O
multiple	O
images	O
taken	O
at	O
different	O
focus	O
distances	O
to	O
give	O
a	O
resulting	O
image	O
with	O
a	O
greater	O
depth	O
of	O
field	O
(	O
DOF	O
)	O
than	O
any	O
of	O
the	O
individual	O
source	O
images	O
.	O
</s>
<s>
Focus	B-Algorithm
stacking	I-Algorithm
can	O
be	O
used	O
in	O
any	O
situation	O
where	O
individual	O
images	O
have	O
a	O
very	O
shallow	O
depth	O
of	O
field	O
;	O
macro	O
photography	O
and	O
optical	O
microscopy	O
are	O
two	O
typical	O
examples	O
.	O
</s>
<s>
Focus	B-Algorithm
stacking	I-Algorithm
can	O
also	O
be	O
useful	O
in	O
landscape	O
photography	O
.	O
</s>
<s>
Focus	B-Algorithm
stacking	I-Algorithm
offers	O
flexibility	O
:	O
since	O
it	O
is	O
a	O
computational	O
technique	O
,	O
images	O
with	O
several	O
different	O
depths	O
of	O
field	O
can	O
be	O
generated	O
in	O
post-processing	O
and	O
compared	O
for	O
best	O
artistic	O
merit	O
or	O
scientific	O
clarity	O
.	O
</s>
<s>
Focus	B-Algorithm
stacking	I-Algorithm
also	O
allows	O
generation	O
of	O
images	O
physically	O
impossible	O
with	O
normal	O
imaging	O
equipment	O
;	O
images	O
with	O
nonplanar	O
focus	O
regions	O
can	O
be	O
generated	O
.	O
</s>
<s>
Alternative	O
techniques	O
for	O
generating	O
images	O
with	O
increased	O
or	O
flexible	O
depth	O
of	O
field	O
include	O
wavefront	B-Algorithm
coding	I-Algorithm
,	O
light-field	O
cameras	O
and	O
tilt	O
.	O
</s>
<s>
The	O
starting	O
point	O
for	O
focus	B-Algorithm
stacking	I-Algorithm
is	O
a	O
series	O
of	O
images	O
captured	O
at	O
different	O
focus	O
distances	O
;	O
in	O
each	O
image	O
different	O
areas	O
of	O
the	O
sample	O
will	O
be	O
in	O
focus	O
.	O
</s>
<s>
In-focus	O
regions	O
of	O
each	O
image	O
may	O
be	O
detected	O
automatically	O
,	O
for	O
example	O
via	O
edge	B-Algorithm
detection	I-Algorithm
or	O
Fourier	O
analysis	O
,	O
or	O
selected	O
manually	O
.	O
</s>
<s>
Depth	O
of	O
field	O
is	O
normally	O
increased	O
by	O
stopping	O
down	O
aperture	B-General_Concept
(	O
using	O
a	O
larger	O
f-number	O
)	O
,	O
but	O
beyond	O
a	O
certain	O
point	O
,	O
stopping	O
down	O
causes	O
blurring	O
due	O
to	O
diffraction	O
,	O
which	O
counteracts	O
the	O
benefit	O
of	O
being	O
in	O
focus	O
.	O
</s>
<s>
Focus	B-Algorithm
stacking	I-Algorithm
allows	O
the	O
depth	O
of	O
field	O
of	O
images	O
taken	O
at	O
the	O
sharpest	O
aperture	B-General_Concept
to	O
be	O
effectively	O
increased	O
.	O
</s>
<s>
The	O
Mars	O
Science	O
Laboratory	O
mission	O
has	O
a	O
device	O
called	O
Mars	B-Algorithm
Hand	I-Algorithm
Lens	I-Algorithm
Imager	I-Algorithm
(	O
MAHLI	B-Algorithm
)	O
,	O
which	O
can	O
take	O
photos	O
that	O
can	O
later	O
be	O
focus	B-Algorithm
stacked	I-Algorithm
.	O
</s>
<s>
In	O
microscopy	O
,	O
high	O
numerical	O
apertures	B-General_Concept
are	O
desirable	O
to	O
capture	O
as	O
much	O
light	O
as	O
possible	O
from	O
a	O
small	O
sample	O
.	O
</s>
<s>
A	O
high	O
numerical	O
aperture	B-General_Concept
(	O
equivalent	O
to	O
a	O
low	O
f-number	O
)	O
gives	O
a	O
very	O
shallow	O
depth	O
of	O
field	O
.	O
</s>
<s>
Higher	O
magnification	O
objective	O
lenses	O
generally	O
have	O
shallower	O
depth	O
of	O
field	O
;	O
a	O
100×	O
objective	O
lens	O
with	O
a	O
numerical	O
aperture	B-General_Concept
of	O
around	O
1.4	O
has	O
a	O
depth	O
of	O
field	O
of	O
approximately	O
1	O
μm	O
.	O
</s>
<s>
When	O
observing	O
a	O
sample	O
directly	O
,	O
the	O
limitations	O
of	O
the	O
shallow	O
depth	O
of	O
field	O
are	O
easy	O
to	O
circumvent	O
by	O
focusing	O
up	O
and	O
down	O
through	O
the	O
sample	O
;	O
to	O
effectively	O
present	O
microscopy	O
data	O
of	O
a	O
complex	O
3D	O
structure	O
in	O
2D	O
,	O
focus	B-Algorithm
stacking	I-Algorithm
is	O
a	O
very	O
useful	O
technique	O
.	O
</s>
