Graphics Reference
In-Depth Information
C LR (x-1,y)
x-1, y
x-1, y+1
C LU (x,y)
C RU (x,y-1)
C LU (x,y+1)
C RU (x,y)
C LR (x,y)
x, y
x, y+1
(a)
(c)
(b)
(d)
Figure 3.33. (a) The arc weights corresponding to forward energy in graph-cut-based seam
carving, corresponding to finding the minimal-cost vertical seam. (b) An original image. (c) Seam
carvingwith backward energy, showing visual artifacts (e.g., the right leg, the sword, the vertical
white bar). (d) Seam carving with forward energy results in a more acceptable image with fewer
introduced artifacts.
and N patches are created in I . The function d in the summands is the average sum-
of-squared-distance between the colors of corresponding pixels in a pair of same-
sized patches. The first term in Equation ( 3.40 ) captures the notion of completeness,
and the second term captures the notion of coherence. The measure D
I , I )
(
is low
when both properties are well satisfied.
If we specify the desired dimensions of the retargeted image, then our goal is to
find the image I that minimizes D
I , I )
(
. We use an iterative update rule for this
estimation problem, as follows.
Let's consider apixel j
I and think about how it contributes to the cost function in
Equation ( 3.40 ), as illustrated inFigure 3.35 . Supposeweonly consider W
×
W patches
in Equation ( 3.40 ). That means that j will be amember of W 2 patches
{ 1 ,
W 2 }
...
,
in
I , which have the best matches
{
1 ,
...
,
W 2
}
in I . Let the pixels in I corresponding to
pixel j in each of these patches be i 1 ,
...
, i W 2 . Thus, the second term in Equation ( 3.40 )
corresponding to pixel j is:
W 2
1
N
I (
2
1
I
(
i k
)
j
)
(3.41)
k
=
where the norm in Equation ( 3.41 ) is the Euclidean distance in color space.
Search WWH ::




Custom Search