Graphics Reference
In-Depth Information
B
A
Figure 3.8.
Discrete sets required for solving the Poisson equation using digital images. A small
image region is shown. The lightly shaded squares comprise
; the darker-shaded squares
comprise
∂
.
2
I
2
I
∂
∂
2
I
where we have used the common notation of
∇
=
+
y
2
for the Laplacian
x
2
∂
∂
operator.
An equation of the form (
3.11
) (with a generic right-hand side) is called a
Poisson
equation
, anda constraint of the form(
3.12
) is calleda
Dirichlet boundary condition
.
right-hand side of Equation (
3.12
) is zero, it is called a
Neumannboundary condition
.
Before we discuss how the Poisson equation is solved in practice, we mention
an important generalization. In Equation (
3.11
), we assumed that the Laplacian
of the new image was equal to the Laplacian of another image (i.e., the source)
inside
. However, the technique is more powerful if we minimize the difference
between the Laplacian of the new image and
some arbitrary guidance vector field
(
. The distinction is that the guidance vector field
neednot arise by taking the gradient of some original image (inwhich case it is called a
non-conservative field
). The Poisson equation in Equation (
3.11
) slightly changes to
S
x
(
x
,
y
)
,
S
y
(
x
,
y
))
at every pixel
(
x
,
y
)
div
S
x
+
∂
S
y
∂
(
x
,
y
)
=
∂
S
x
∂
2
I
∇
(
x
,
y
)
=
in
(3.13)
S
y
(
x
,
y
)
x
y
To solve thePoissonequation for a real-worldpixellated image, we create adiscrete
version of Equations (
3.11
)-(
3.12
). As illustrated in Figure
3.8
,
is a user-defined
collection of pixels (i.e., the pixels where
M
=
1 in the previous section) and
∂
is the
set of pixels not in
that have one of their 4-neighbors in
. The source image
S
must
at least be defined on
plus a one-pixel-wide dilation of
.
2
The Laplace equation is also sometimes known as the
heat equation
or
diffusion equation
.
3
For a readable refresher on vector calculus and derivatives, see the topic by Schey [
427
].