<s>
Gradient	B-Algorithm
domain	I-Algorithm
image	I-Algorithm
processing	I-Algorithm
,	O
also	O
called	O
Poisson	B-Algorithm
image	I-Algorithm
editing	I-Algorithm
,	O
is	O
a	O
type	O
of	O
digital	B-Algorithm
image	I-Algorithm
processing	I-Algorithm
that	O
operates	O
on	O
the	O
differences	O
between	O
neighboring	O
pixels	O
,	O
rather	O
than	O
on	O
the	O
pixel	O
values	O
directly	O
.	O
</s>
<s>
Mathematically	O
,	O
an	O
image	B-Algorithm
gradient	I-Algorithm
represents	O
the	O
derivative	B-Algorithm
of	O
an	O
image	O
,	O
so	O
the	O
goal	O
of	O
gradient	O
domain	O
processing	O
is	O
to	O
construct	O
a	O
new	O
image	O
by	O
integrating	O
the	O
gradient	O
,	O
which	O
requires	O
solving	O
Poisson	O
's	O
equation	O
.	O
</s>
<s>
The	O
first	O
step	O
is	O
to	O
choose	O
an	O
image	B-Algorithm
gradient	I-Algorithm
.	O
</s>
<s>
For	O
image	B-Application
editing	I-Application
purposes	O
,	O
the	O
gradient	O
is	O
obtained	O
from	O
an	O
existing	O
image	O
and	O
modified	O
.	O
</s>
<s>
Various	O
operators	O
,	O
such	O
as	O
finite	B-Algorithm
difference	I-Algorithm
or	O
Sobel	B-Algorithm
,	O
can	O
be	O
used	O
to	O
find	O
the	O
gradient	O
of	O
a	O
given	O
image	O
.	O
</s>
<s>
Other	O
uses	O
include	O
seamless	O
image	B-Algorithm
stitching	I-Algorithm
,	O
removal	O
of	O
unwanted	O
details	O
from	O
an	O
image	O
,	O
non-photorealistic	O
rendering	O
filters	O
,	O
image	O
deblocking	B-General_Concept
,	O
</s>
<s>
Digital	O
compositing	O
is	O
a	O
common	O
task	O
in	O
image	B-Application
editing	I-Application
in	O
which	O
some	O
or	O
all	O
of	O
one	O
photo	O
is	O
pasted	O
into	O
another	O
photo	O
.	O
</s>
<s>
The	O
following	O
example	O
demonstrates	O
the	O
use	O
of	O
gradient	B-Algorithm
domain	I-Algorithm
image	I-Algorithm
processing	I-Algorithm
to	O
seamlessly	O
paste	O
from	O
one	O
image	O
to	O
another	O
.	O
</s>
<s>
It	O
is	O
also	O
worth	O
noting	O
that	O
the	O
gradient	O
pictured	O
above	O
represents	O
the	O
derivative	B-Algorithm
of	O
only	O
one	O
color	B-Algorithm
channel	I-Algorithm
(	O
red	O
)	O
,	O
and	O
was	O
rendered	O
with	O
colors	O
representing	O
the	O
strength	O
and	O
direction	O
of	O
the	O
gradient	O
.	O
</s>
<s>
In	O
practice	O
two	O
grayscale	O
gradient	O
images	O
are	O
found	O
per	O
color	B-Algorithm
channel	I-Algorithm
,	O
one	O
representing	O
the	O
change	O
in	O
x	O
and	O
the	O
other	O
representing	O
the	O
change	O
in	O
y	O
.	O
</s>
<s>
Each	O
color	B-Algorithm
channel	I-Algorithm
is	O
solved	O
for	O
independently	O
when	O
reconstructing	O
the	O
final	O
image	O
.	O
</s>
