Graphics Reference
In-Depth Information
orientation, and resolution. These objects are then composited into the target image
with an approach very similar to drag-and-drop pasting.
While we focused specifically on the compositing problem in this section, similar
gradient-domain techniques based on the Poisson equation have been applied in
several other areas of computer vision and graphics, including the removal of visible
seams in panorama construction [ 6 ], high dynamic range compression [ 136 ], and
locally changing color, illumination, and detail [ 364 ]. More generally, researchers
have proposed optimization frameworks that operate directly on image pixels and
their gradients for similar effects, such as Bhat et al.'s GradientShop [ 43 ].
3.3
GRAPH-CUT COMPOSITING
Poisson image editing works very well when the source and target images are rela-
tively simple and smooth near the desired boundary. However, if the source or target
is highly textured, it may be difficult to manually guess a good boundary around
the source object that will be harmonious with the texture at the desired region in
the target image. Drag-and-drop pasting offers one approach to automatically esti-
mating a good boundary for gradient-domain compositing, but there may be no
low-energy contours in a highly textured image. As another consideration, the colors
of a gradient-domain composite may seem unnatural, since the original colors of the
source image inside the target region are not preserved.
An alternative is to not blend the images across a boundary at all, but instead
to select a region of the source image that can be directly copied to its position
in the target image in the most unobtrusive way possible. The idea is to hide the
compositing boundary in places where either the source and target are very similar,
or there is enough texture in the target to obscure the presence of a discontinuity.
This can be naturally viewed as a labeling problem: given a measure of the quality
of a boundary and certain constraints, which pixels should come from the source
and which from the target? This is quite similar to the graph-cut-based segmentation
problem from Section 2.8.2 .
Suppose the user has aligned a source image S with a target image T , as illustrated
in Figure 3.13 . The user designates a set of pixels
S
that definitely must come from
the source, and another set
that definitely must come from the target. These con-
straints are analogous to those of the trimap and scribbles in the matting problem of
T
S
S
T
T
(a)
(b)
(c)
S . (b) The
Figure 3.13. Seam-based compositing. (a) The source image with a constrained set
T . (c) The final composite contains some pixels from the
source image (striped region) and some from the target image (white region), separated by a
seam.
target image with a constrained set
Search WWH ::




Custom Search