Graphics Reference
In-Depth Information
2.6.1
Robust Matting
Wang and Cohen proposed a well-known algorithm called robust matting [ 532 ] that
used the same random-walk approach to solve for
's. They used the weights defined
by thematting Laplacian in Equation ( 2.68 ), but also added two extra nodes
α
F
and
B
to
V
that represent foreground and background “terminals.” Every pixel is connected to
both terminals by an edge. Thus, in addition to encountering a pixel labeled
by
the user, the randomwalker can also immediately take a step to one of the terminals
at any time. The pixel-to-terminal weight can be interpreted as a confidence that
the pixel is foreground or background, respectively. Similar to Bayesian matting or
belief propagation matting, these priors are formed based on samples of the known
foreground and background, but unlike these algorithms, the samples are allowed to
come frommuch further away from the unknown pixel and are distributed along the
boundary of the known regions in a trimap, as illustrated in Figure 2.18 .
If a particular pair of foreground and background samples for pixel i are fixed, we
can compute an estimate
F
or
B
α
i at this pixel from Equation ( 2.17 ), that is:
= (
I i
B i
) · (
F i
B i
)
α
(2.69)
i
2
F i
B i
i based
on several factors. First, the quality of fit based on the matting equation should
be high. Also, Wang and Cohen argued that the selected foreground and back-
ground samples should be widely spread in color space, so that the denominator
of Equation ( 2.69 ) is not close to zero (this could result in a sensitive estimate of
We can also compute a confidence c i for howmuch we trust the estimate
α
α
).
This results in what they called the distance ratio
I i
( α
i F i
+ (
1
α
)
B i
)
i
(2.70)
F i
B i
The distance ratio, combined with terms that measure how similar the foreground
and background samples are to I i , is used to form a confidence c i that measures how
certain we are of the
α
i estimate, and these quantities are combined to produce two
weights w F (
i
)
and w B (
i
)
for connecting each pixel to the foreground and background
terminals.
F
U
Figure 2.18. The sampling strategy in
robust matting spreads the potential fore-
ground and samples along the boundaries
of the known regions, compared to the
nearest-neighbors approach from Bayesian
matting (Figure 2.10 ).
 
Search WWH ::




Custom Search