Graphics Reference
In-Depth Information
Taking the log gives an expression in terms of log likelihoods:
(
|
α) +
(
) +
(
) +
(α)
argmax
F , B ,
log P
I
F , B ,
log P
F
log P
B
log P
(2.10)
α
The first term in Equation ( 2.10 )isa data term that reflects how likely the image
color is given values for F , B , and
. Since for a good solution the matting equation
( 2.2 ) should hold, the first term can be modeled as:
α
exp
1
σ
2
2
P
(
I
|
F , B ,
α)
d
I
F
+ (
1
α)
B
)
(2.11)
2
where
σ d is a tunable parameter that reflects the expected deviation from thematting
assumption. Thus,
1
σ
2
2
log P
(
I
|
F , B ,
α) =−
d
I
F
+ (
1
α)
B
)
(2.12)
2
The other terms in Equation ( 2.10 ) are prior probabilities on the foreground,
background, and
distributions. This is where the trimap comes in. Figure 2.8 illus-
trates an example of a user-created trimap and scatterplots of pixel colors in RGB
space corresponding to the background and foreground. In this example, since the
background colors are very similar to each other and the foreground mostly contains
shades of gray, we can fit Gaussian distributions to each collection of intensities.
That is, for a color B , we estimate a pdf for the background given by:
α
2 exp
1
1
2 (
) 1
B
f B (
B
) =
B
µ
(
B
µ
)
(2.13)
B
B
3
/
2
1
/
(
2
π)
| B |
green
red
(a)
(b)
Figure 2.8. (a) A user-created trimap corresponding to the upper left image in Figure 2.5 , and
(b) a scatterplot of the colors in the labeled foreground and background regions. Black dots
represent background and white dots represent foreground. Since the image was taken against
a blue screen, the background colors are tightly clustered in one corner of RGB space. Both the
foreground and background color distributions are well approximated by Gaussians (ellipses).
 
Search WWH ::




Custom Search