Graphics Reference
In-Depth Information
(a)
(b)
Figure 3.25.
(a) An original image. (b) The saliency map obtained using Itti et al.'s algorithm.
gradient magnitudes/orientations to estimate regions in the image likely to attract
visual attention; an example is illustrated in Figure
3.25
.
We partition the image into a set
Q
of rectangular elements, or
quads
, which are
defined by sets of vertices
computed
as the average importance of the pixels inside it. We denote the vertices of quad
q
as
V
q
. A deformation of the quad mesh results in a new set of vertex positions
V
and edges
E
. Each quad
q
is given aweight
w
(
q
)
V
with
V
, we compute a
the same edges as the original mesh. For a candidate deformation
cost as:
2
v
i
,
v
j
∈
V
q
(
(V
)
=
v
i
−
v
j
)
−
v
i
−
v
j
)
−
2
+
C
w
(
q
)
s
q
(
v
i
−
v
j
)
(
l
ij
(
v
i
−
v
j
)
q
∈
Q
(
v
i
,
v
j
)
∈
E
(3.35)
Here, the first term in Equation (
3.35
) encourages each quad
q
to be uniformly
term in Equation (
3.35
) encourages the top-to-bottomand left-to-right grid lines that
define the quads not to bend toomuch; here,
l
ij
v
i
−
v
j
/
. The basic idea is
to minimize the cost function in Equation (
3.35
) subject to the boundary constraints
that the output image be rectangular with the desireddimensions, resulting in a series
of linear systems in the vertex locations. Figure
3.26
illustrates an example result of
the method.
=
v
i
−
v
j
3.5.2
Seam Carving
One of the most exciting approaches for image retargeting in recent years is
seam
carving
, a simple algorithm that can effectively resize and reshape images and that
can also be used for inpainting. The key concept is the addition and removal of
7
s
q
can be determined as a function of a given
V
and eliminated from the equation; see
and
V
Problem
3.19
.