Graphics Reference
In-Depth Information
I
=
+
=
+
=
+
=
+
I
α
F
1 α
B
Figure 2.3. The matting problem can't be uniquely solved. The three (alpha, foreground, back-
ground) combinations at right are all mathematically consistent with the image at left. The
bottom combination is most similar to what a human would consider a natural matte.
in seven unknowns at each pixel (the RGB values of F and B as well as themixing pro-
portion
). One result of this ambiguity is that for any values of I and a user-specified
value of F , we can find values for B and
α
that satisfy Equation ( 2.2 ), as illustrated in
Figure 2.3 . Clearly, we need to supply a matting algorithm with additional assump-
tions or guides in order to recover mattes that agree with human perception about
how a scene should be separated. For example, as we will see in the next section,
the assumption that the background is known (e.g., it is a constant blue or green),
removes some of the ambiguity. However, this chapter focuses on methods in which
the background is complex andunknown and there is little external informationother
than a few guides specified by the user.
In modern matting algorithms, these additional guides frequently take one of two
forms. The first is a trimap , defined as a coarse segmentation of the input image into
regions that are definitely foreground (
α
F
), definitely background (
B
), or unknown
U
(
). This segmentation can be visualized as an image with white foreground, black
background, andgrayunknown regions (Figure 2.4 b). Anextreme example of a trimap
is a garbage matte , a roughly drawn region that only specifies certain background
B
and assumes the rest of the pixels are unknown. An alternative is a set of scribbles ,
which canbe quickly sketchedby a user to specify pixels that are definitely foreground
and definitely background (Figure 2.4 c). Scribbles are generally easier for a user to
create, since every pixel of the original image doesn't need to explicitly labeled. On
the other hand, thematting algorithmmust determine
for amuch larger number of
pixels. Both trimaps and scribbles can be created using a painting program like GIMP
or Adobe Photoshop.
As mentioned earlier, matting usually precedes compositing , in which an esti-
mated matte is used to place a foreground element from one image onto the
background of another. That is, we estimate
α
α
, F , and B from image I , and want
B to produce the composite I . The
to place F on top of a new background image
corresponding compositing equation is:
I
α) B
= α
+ (
F
1
(2.3)
 
Search WWH ::




Custom Search