<s>
The	O
core	O
PatchMatch	B-General_Concept
algorithm	O
quickly	O
finds	O
correspondences	B-Algorithm
between	O
small	O
square	O
regions	O
(	O
or	O
patches	O
)	O
of	O
an	O
image	O
.	O
</s>
<s>
The	O
algorithm	O
can	O
be	O
used	O
in	O
various	O
applications	O
such	O
as	O
object	O
removal	O
from	O
images	O
,	O
reshuffling	O
or	O
moving	O
contents	O
of	O
images	O
,	O
or	O
retargeting	O
or	O
changing	O
aspect	O
ratios	O
of	O
images	O
,	O
optical	O
flow	O
estimation	O
,	O
or	O
stereo	B-Algorithm
correspondence	I-Algorithm
.	O
</s>
<s>
Next	O
,	O
an	O
iterative	B-Algorithm
update	O
process	O
is	O
applied	O
to	O
the	O
NNF	O
,	O
in	O
which	O
good	O
patch	O
offsets	O
are	O
propagated	O
to	O
adjacent	O
pixels	O
,	O
followed	O
by	O
random	O
search	O
in	O
the	O
neighborhood	O
of	O
the	O
best	O
offset	O
found	O
so	O
far	O
.	O
</s>
<s>
Independent	O
of	O
these	O
three	O
components	O
,	O
the	O
algorithm	O
also	O
use	O
a	O
coarse-to-fine	O
approach	O
by	O
building	O
an	O
image	B-Algorithm
pyramid	I-Algorithm
to	O
obtain	O
the	O
better	O
result	O
.	O
</s>
<s>
This	O
algorithm	O
avoids	O
using	O
an	O
initial	O
guess	O
from	O
the	O
previous	O
level	O
of	O
the	O
pyramid	B-Algorithm
because	O
in	O
this	O
way	O
the	O
algorithm	O
can	O
avoid	O
being	O
trapped	O
in	O
local	O
minima	O
.	O
</s>
<s>
After	O
initialization	O
,	O
the	O
algorithm	O
attempted	O
to	O
perform	O
iterative	B-Algorithm
process	O
of	O
improving	O
the	O
.	O
</s>
<s>
The	O
iterations	B-Algorithm
examine	O
the	O
offsets	O
in	O
scan	O
order	O
(	O
from	O
left	O
to	O
right	O
,	O
top	O
to	O
bottom	O
)	O
,	O
and	O
each	O
undergoes	O
propagation	O
followed	O
by	O
random	O
search	O
.	O
</s>
<s>
Alternatively	O
,	O
on	O
even	O
iterations	B-Algorithm
,	O
the	O
algorithm	O
search	O
for	O
different	O
direction	O
,	O
fill	O
the	O
new	O
value	O
to	O
be	O
.	O
</s>
<s>
where	O
is	O
a	O
uniform	O
random	O
in	O
,	O
is	O
a	O
large	O
window	O
search	O
radius	B-Protocol
which	O
will	O
be	O
set	O
to	O
maximum	O
picture	O
size	O
,	O
and	O
is	O
a	O
fixed	O
ratio	O
often	O
assigned	O
as	O
1/2	O
.	O
</s>
<s>
The	O
often	O
used	O
halting	O
criterion	O
is	O
set	O
the	O
iteration	B-Algorithm
times	O
to	O
be	O
about	O
4	O
~	O
5	O
.	O
</s>
<s>
Even	O
with	O
low	O
iteration	B-Algorithm
,	O
the	O
algorithm	O
works	O
well	O
.	O
</s>
<s>
This	O
is	O
an	O
efficient	O
algorithm	O
since	O
it	O
only	O
takes	O
a	O
few	O
second	O
on	O
a	O
testing	O
computer	O
with	O
Intel	B-Device
Core	I-Device
i5	I-Device
CPU	B-General_Concept
and	O
Photoshop	B-Operating_System
CS5	I-Operating_System
.	O
</s>
