Graphics Reference
In-Depth Information
If we write this as a matrix equation and add a regularization term to give a
preference to smaller values of
a
and
b
, we obtain:
α
j
−
X
j
a
b
2
2
b
2
argmin
a
,
b
+
ε(
a
+
)
(2.48)
where
4 matrix con-
taining image colors in thewindow. As we have seen, the solution to Equation (
2.48
)is
α
j
collects all of the
α
values in
w
j
into a vector, and
X
j
is a
W
×
a
∗
b
∗
X
j
X
j
X
j
=
(
+
ε
I
4
×
4
)
α
(2.49)
j
α
which, plugging back into Equation (
2.46
), gives a mutual relationship between the
α
at the center of the window and all the
's in the window by way of the colors in
X
i
:
I
i
]
(
X
i
X
i
+
ε
X
i
α
i
=[
1
I
4
×
4
)
α
i
(2.50)
That is, Equation (
2.50
) says that the
in the center of the window can be linearly
predicted by its neighbors in the window; the term multiplying
α
α
i
can be thought of
asa1
W
vector of linear coefficients. If we compute this vector for every window,
we get a large, sparse linear system mutually relating all the
×
α
's in the entire image;
that is,
F
α
α
=
(2.51)
where as before,
α
is an
N
×
1 vector of all the
α
's. Just like in closed-form matting,
we want to determine
's that satisfy this relationship while also satisfying user con-
straints specified by foreground and background scribbles. This leads to the natural
optimization problem
α
α
(
)
α
+
λ(
α
−
α
)
D
min
I
N
×
N
−
F
)(
I
N
×
N
−
F
(
α
−
α
)
(2.52)
K
K
where
have the same interpretations as in the closed-form matting
cost function in Equation (
2.40
). In fact, Equation (
2.52
) is in exactly the same formas
Equation (
2.40
). The only difference is that thematting Laplacian
L
has been replaced
by thematrix
α
K
,
D
, and
λ
)
. Solving Equation (
2.52
) results in a sparse linear
system of the same form as Equation (
2.41
).
Zheng and Kambhamettu noted that the relationship in Equation (
2.46
) could be
further generalized to a nonlinear relationship using a
kernel
; that is, we model
(
I
N
×
N
−
)(
I
N
×
N
−
F
F
a
(
α
i
=
I
i
)
+
b
(2.53)
where
is anonlinearmap fromthree color dimensions toa larger number of features
(say,
p
) and
a
becomes a
p
1 vector. The
I
i
and
X
i
entries in Equation (
2.50
) are
replacedby kernel functions between image colors (e.g., Gaussiankernels) that reflect
the relationship in high-dimensional space.
×