Graphics Reference
In-Depth Information
wide array of image retouching that occurs in the world of commercial photogra-
phy — to the extent that it is now very difficult to judge whether a digital image
represents the true recording of an actual real-world scene.
We first discuss classical methods for blending image intensities across a hard
boundary or seam (Section 3.1 ). We then introduce gradient-domain blending
methods based on solving the Poisson equation, which typically produce a more
natural-looking transition (Section 3.2 ). We also consider an alternate approach
based on graph cuts: instead of fractionally weighting the source and target contribu-
tions near the seam, we try to find a seam such that a hard transition is imperceptible
(Section 3.3 ). We then address the problem of image inpainting — filling in “holes”
specified by the user with realistic texture (Section 3.4 ). We next introduce the con-
cept of image retargeting — changing the size, aspect ratio, or composition of an
image (Section 3.5 ). Finally, we discuss extensions of the various methods from still
images to video (Section 3.6 ).
3.1
COMPOSITING HARD-EDGED PIECES
As we mentioned earlier, high-quality mattes are essential for most visual effects
compositing problems, but these take substantial effort to create. It would be much
easier for the user to roughly outline the object to be extracted from one image and
placed in another, without interactively struggling to create a good matte. In this and
the following sections, we investigate methods for pasting a hard-edged foreground
region into a new background image, letting the algorithms do the work of creating a
pleasing (and hopefully imperceptible) blend.
Mathematically, we pose the problem as follows. We are given a source image
S
specifying the general outline of an object
or region in the source image, and a target image T
(
x , y
)
, a binary mask image M
(
x , y
) ∈{
0, 1
}
(
x , y
)
. Our goal is to create a con-
vincing composite I
in which the source region is rendered on top of the target
image with minimal visible artifacts. This is sometimes called the “over” operation
for compositing two images [ 373 ]. We assume the two images are already aligned, so
that
(
x , y
)
corresponds to the same location in all the images.
Clearly, the matting equation ( 2.1 ) from the previous chapter encapsulates the
simplest way to composite the two images:
(
x , y
)
I
(
x , y
) =
M
(
x , y
)
S
(
x , y
) + (
1
M
(
x , y
))
T
(
x , y
)
S
(3.1)
(
x , y
)
if M
(
x , y
) =
1
=
(
)
(
) =
T
x , y
if M
x , y
0
where the binary image M plays the role of the
matte. If wewere to directly superim-
pose the source region on the target image using Equation ( 3.1 ) without any blending,
we would see a visible boundary — also known as a seam or matte line — between
the source and target (Figure 3.1 ).
In the early days of visual effects, this type of compositing was often used to insert
a special effects shot (e.g., a model spaceship) into a live-action plate. Similar tech-
niques are used to combine two videos of the same actor frommultiple camera passes
α
Search WWH ::




Custom Search