Graphics Reference
In-Depth Information
Gastal and Oliviera [ 163 ] proposed an objective function of the same form
as Equation ( 2.74 ), with yet another approach toward computing the fore-
ground/background samples,
α i estimates, and confidences. The key observation
is that nearby pixels are likely to have very similar F , B , and
values, and thus that
the sets of foreground andbackground samples considered for nearby pixels are likely
to have many common elements. Much unnecessary computation can be avoided
by creating disjoint sample sets for each pair of adjacent pixels and then asking adja-
cent pixels to share their choices for the best samples to come up with estimates
for F i and B i . This method for computing
α
i 's are
already quite good even without minimizing Equation ( 2.74 ), potentially leading to a
real-time video matting algorithm.
α
i is extremely efficient, and the
α
2.6.2
Geodesic Matting
The random walk technique considers all possible paths from an unknown pixel to
a labeled foreground or background region, which is somewhat hard to visualize. A
natural alternative is to consider the weighted shortest paths (i.e., geodesics) from
the unknown pixel to
based on these path lengths. Bai
and Sapiro [ 25 ] proposed a similar idea as follows. First, foreground and background
probability densities f F (
F
and
B
and determine
α
are computed from user scribbles using kernel
density estimates. Then the usual graph on image pixels is built, with the weight for
an edge connecting adjacent pixels defined as
w ij = L F (
I
)
and f B (
I
)
I j )
I i )
L F (
(2.75)
where the likelihood L F is defined as
f F (
I
)
L F (
I
) =
(2.76)
f F (
I
) +
f B (
I
)
In this case, the weight is small if the two pixels have similar foreground likeli-
hoods (or equivalently, similar background likelihoods). The weighted shortest paths
between an unknown pixel i and both the foreground and background scribbles are
computed using a fast marching algorithm [ 565 ]; let these distances be D F (
i
)
and
D B (
i
)
. Then Bai and Sapiro proposed to estimate
α
as
) r L F (
D F (
i
I i )
α
=
(2.77)
i
) r
D B (
i
(
1
L F (
I i
))
where r is an adjustable parameter between 0 and 2.
2.7
POISSON MATTING
Finally, wemention Poissonmatting [ 478 ], one formof gradient-based image editing.
We will discuss similar methods more extensively in Chapter 3 . The user begins by
specifying a trimap. We first take the spatial gradient of the matting equation on both
sides:
I
= (
F
B
) α + α
F
+ (
1
α)
B
(2.78)
 
Search WWH ::




Custom Search