Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2. Related Works
Figure 2. Example of images that adhere to (left) rule of thirds
Stereo image retargeting is the process of resizing a and (right) visual balance.
stereo image pair to fit a targeted display. The retarget-
ing process involves modifying the composition of an im-
age such that the important elements in the image is pre- encouraged to keep the center of mass of the photo subjects
served. In the recent years, researchers has proposed a va- on these power points as illustrated in the left image of Fig-
riety of methods such as cropping [8], seam-carving [1], ure 2. Visual balance rule is illustrated by the right image in
warping [2, 6] and shift-map [9] to perform stereo image Figure 2 where two objects of varying size counterbalance
retargeting. Each of these approaches has its own strength each other within the frame.
and produces good retargeting results for certain category of Figure 3 illustrates an overview of our approach. Given
images. However, all these approaches, except for [8], do a stereo image pair, our algorithm first performs pre-
not consider the enhancement of image aesthetics during the processing to obtain the disparity maps, triangular meshes
retargeting process. Niu et al. [8] proposed an aesthetics- and importance maps for the stereo image pair. Then, both
driven, cropping-based approach to modify the composi- the left and right image are optimized simultaneously to re-
tion of an image based on a set of selected photographic compose the stereo image. The optimization algorithm min-
rules during the retargeting process. This approach pro- imisies a set of errors that consists of warping errors, stereo-
duces promising results in images with sufficient uninter- scopic error and aesthetics quality errors. This approach can
esting background but fails in images with multiple subjects also be extended to support stereo image retargeting by pro-
as well as images with photo subject that fills the frame. viding the target image scale.
In the recent years, interactive stereo image editing tools
is also starting to gain attention. Content-aware stereo- 3.1. Pre-processing
scopic image editing [2] method allows users to interac- We first compute the disparity map from a stereo im-
tively modify the composition of a stereo image by adjust- age pair using Sum of Absolute Difference (SAD). Next,
ing the location, and depths of selected objects, giving users we construct a triangular mesh over the left stereo image.
aesthetic control for depth perception. The 3D Copy & The correspoinding triangular mesh is then propagated to
Paste [7] method enables foreground objects from a source the right image using the disparity information. We then
stereo image to be copied to a target stereo image while en- generate the importance maps for the stereo image pair us-
suring the resulting image produces comfortable 3D view- ing the graph based visual saliency algorithm [4]. Triangles
ing. The StereoPasting [10] approach went a step further in the triangular meshes that correspond to areas of high
to allow objects from a 2D image to be copied and blended saliency in the importance maps are marked as salient tri-
on a stereo image. These interactive tools are useful for angles. In order to avoid distortion of salient objects in the
experienced photographers who are aware of compositional stereo image, these salient triangles will be kept as rigid as
aesthetics but amateur photographers without knowledge of possible during the optimization process.
image aesthetics may find these tools undesirable.
3.2. Warping errors
3. Proposed Method
Let L and R denote the left and right image respectively.
We propose an aesthetic-driven warping method that In the warping process, the source triangular meshes,
aims to enhance compositional aesthetics of a stereo image, ML and MR are mapped to the target meshesML and
while ensuring the stereoscopic properties are preserved. MR . The set of triangles and objects in ML MR are
In order to maximize image aesthetics, our approach min- T and O respectively. The warping quality errors is the
imises a set of aesthetics errors formulated based on two formulated as the weighted sum of scale transformation
common photographic composition rules: the rule of thirds error, smoothness error, and stereoscopic error.
and visual balance. According to the rule of thirds, an im-
age frame is divided into 9 equal parts by two horizontal and Scale transformation error. For each triangle tεT , we per-
vertical lines and the four intersection points that are formed form non-uniform scaling [5]. Then the scale transforma-
by these lines are called power points. Photographers are tion error Ew is defined as,
646
Figure 3. Overview of our proposed aesthetics-driven, stereo recomposition approach. Sx and Sy indicate the target horizontal and vertical
scale respectively.
2
where α, β, γ are the corresponding weights.
Ew = At Jt − Gt F (1)
tεT Image boundary constraint. Original boundary vertices
2 should be kept as boundary vertices in the outputstereo im-
where, At is the area of triangle t, .F is the Frobenius
norm, and Jt is a 2 × 2 Jacobian matrix that maps a triangle age. For each boundary vertex v of mesh ML MR , we
to its corressponding triangles in the output mesh. apply the positional constraints vx = 0, vx = W, vy =
0, andvy = H to the left, right, top and bottom border ver-
Smoothness error. The smoothness error is formulated to tices respectively, where W and H are the width and height
avoid the discontinuity between the neighboring triangles, of the output stereo image.
2 3.3. Aesthetic quality errors
Es = Ast Gt − Gs F (2)
s,tεT Disparity needs to be considered in the aesthetic rules
where Ast = (As + At )/2 and s, t are adjacent triangles. implementation. A disparity value can be positive or
negative, indicating whether the particular point in the
Stereoscopic quality error. To preserve the stereoscopic stereo image is located behind or in front of the screen.
properties, we minimize the change of two stereoscopic In order to relocate the object to a more accurate power
properties [6]; (1) disparity, and (2) vertical drift between point or power line location, we compensate the disparity
the left and the right output meshes. Let, (pL variation by substracting or adding half of the centroid
i , pi ) and
R
(qi , qi ) denote
L R
the set of corresponding pointsof the in- disparity value from the object centroid accordingly.
put meshes ML MR and output meshes, ML MR re-
sepectively. The stereoscopic quality error is defined as The rule-of-thirds. The rule of thirds error is formulated
as,
Et = Ed (pL
i , pi ) + Ev (pi , pi )
R L R
(3) D ci
(qiL ,qiR )εT EP = (At Dp (Oi ) − ), Dci >= 0 (7)
2
iεO
where Ed indicates the disparity consistency, Ev ensures
D ci
zero vertical drift. EP = (At Dp (Oi ) + ), Dci < 0
2 (8)
iεO
2 where Dp (Oi ) is the distance between object i and the near-
Ed (pL
i , pi ) = ((qi (x) − qi (x)) − (pi (x) − pi (x)))
R R L R L
647
4. Results and Discussion
Our results in this paper are generated on a desktop with
Intel i7 CPU 3.40GHz. The computation time depends on
the number of triangles used to generate the triangular mesh
for the stereo image pair, which can be kept relatively con-
Figure 4. Disparity consideration for rule of thirds formulation. stant for images of different resolution. It took about 4 sec-
(left) Original stereo image; black eclipse, red rectangle and yel- onds to produce a recomposed stereo image with resolution
low dot indicates the positive disparity, negative disparity and ob- 1024 × 768 and 1360 triangles.
ject centroid respectively, (middle) our result without disparity In Figure 5, we compare our results generated with and
compensation, and (right) with disparity compensation. without minimization of the stereoscopic error. It is obvious
that the disparity is not preserved, and depth perception is
lost if stereoscopic properties is not considered during the
facing direction of the salient object. Therefore, if an optimization. On the other hand, by including the stereo-
optional face direction is specified, our algorithm restricts scopic errors in the optimizaton, the disparity of the output
the salient object to be relocated to the power points that image is well preserved.
leave sufficient space in the facing direction. Next, we examine the adherence of our results to the se-
lected photographic composition rules. Our recomposition
Visual balance. The visual balance error, EV B is defined results in Figure 6 illustrates that our approach successfully
as, re-position the photo subject nearer to one of the power
D ci
EV B = (At C(I) − C(Oi ) ± ) (9) points or power lines depicted by the rule of thirds. In Fig-
2
iεO
3.4. Total errors Figure 5. (left) Input stereo image, (middle) our results without
disparity preservation, and (right) our results with disparity preser-
To perform automatic stereo recomposition, we mini- vation.
mize the total errors,
648
based on selected photographic composition rules during
the warping process. In addition, our algorithm attempts
to preserve the stereoscopic properties by minimizing dis-
parity change and vertical drift in the resulting image. Ex-
perimental results shows that our approach successfully re-
locate salient objects according to the selected photographic
rules and maintain disparity consistency to create a comfort-
able 3D viewing experience. Besides, compared to stereo
cropping, our method can better preserve the global image
Figure 7. (left) Left image of stereo input pair, (middle) result with- context, leading to reduced content loss. Drawback of our
out face direction consideration, and (right) result with face direc- approach includes unavaoidable feature disstortion in stereo
tion consideration. images with complex background. In this work, our algo-
rithm preserves the vertical drift and thus, limit the reloca-
tion of objects to its current depth location. In our future
work, we would explore changing the depth of the objects
to enhance 3D depth perception.
649