Graphics Reference
In-Depth Information
3.1.2
Multiresolution Blending with a Laplacian Pyramid
Burt and Adelson [
78
] made a key observation about blending across a seam, rooted
in a
frequency-domain
interpretation of the images to be combined. The idea is sim-
ple: low-frequency components (i.e., smooth, gradual intensity variations) should be
blended acrosswide transition regions, while high-frequency components (i.e., edges
and regions with fine detail) should be blended across narrow transition regions.
These goals can be easily, simultaneously accomplished using a
Laplacian pyramid
,
a common multiresolution representation for images. In this section, we assume
that the images are grayscale, and that for color images each channel is processed
independently and recombined.
For a given image
I
, the first step is to blur it at different scales, by successively
filtering it with a Gaussian (or more generally, low-pass) kernel. At each step, the res-
olution of the image is halved in both dimensions, so that successive images appear
as smaller, blurrier versions of the original. The top row of Figure
3.4
illustrates sev-
eral steps of this process, which is called a
Gaussian pyramid
. That is, we create a
hierarchy of images given by
G
i
=
(
K
∗
G
i
−
1
)
↓
2
,
i
=
1,
...
,
N
(3.2)
where
∗
indicates two-dimensional convolution,
↓
2 indicates downsampling by 2
in both dimensions, and
G
0
I
, the original image.
K
is an approximate Gaussian
kernel, or a low-pass filter whose elements sum to 1, such as
=
]
[−
K
=[−
0.05, 0.25, 0.6, 0.25,
−
0.05
0.05, 0.25, 0.6, 0.25,
−
0.05
]
(3.3)
For compositing, we're interested in the edges that are significant at every scale,
which can be obtained by taking the
difference of Gaussians
at each scale:
L
i
=
G
i
−
(
K
∗
G
i
)
,
i
=
0,
...
,
N
−
1
(3.4)
The images
L
i
form what is called a
Laplacian pyramid
, since the shape of the two-
dimensional Laplacian operator (also known as the “Mexican hat” function) is similar
to a difference of Gaussians at different scales (we'll discuss this property more in
Section
4.1.4
). As illustrated in the bottom row of Figure
3.4
, each image in the Lapla-
cian pyramid can be viewed as a bandpass image at a different scale. The smallest
image
L
N
in the pyramid is defined to be a small, highly blurred version of the original
image, given by
G
N
, while the other images contain edges prevalent at different image
scales (for example,
L
0
contains the finest-detail edges). Therefore, we can write the
original image as the sum of the images of the pyramid:
N
I
=
L
i
↑
(3.5)
=
i
0