Signal Processing: Image Communication 28 (2013) 597–607

Contents lists available at SciVerse ScienceDirect

Signal Processing: Image Communication
journal homepage: www.elsevier.com/locate/image

Anaglyph image generation by matching color
appearance attributes
Songnan Li n, Lin Ma, King Ngi Ngan 1
Department of Electronic Engineering, The Chinese University of Hong Kong, Hong Kong, Chinaa r t i c l e i n f oabstract

Article history:
Received 19 July 2012
Received in revised form
18 March 2013
Accepted 18 March 2013
Available online 4 April 2013

Anaglyph is an inexpensive three-dimensional (3D) displaying technique. It has deficiencies like color distortions, retinal rivalry, ghosting effect, etc. In this paper, a new method
is proposed for anaglyph image generation. In contrast to most existing studies which
focus on solving part of the problems, the proposed method tries to minimize the color
distortions, retinal rivalry, and ghosting effect simultaneously. It works in the CIELAB colornspace which is perceptually uniform. Rather than matching the Ln an b values of the stereo
image pair and the perceived anaglyph image as in an existing method (McAllister et al.,2010 [1]), the proposed algorithm is aimed at matching perceptual color appearance
attributes which can accurately define the color perception of the human visual system(HVS). Rather than evaluating the performance based on typically 3–5 images as in mostprior studies, subjective tests have been conducted, involving 25 stereo image pairs and
20 subjects, to compare four anaglyph generation methods. The proposed method
demonstrates a very good performance for most of the images in the subjective test.
& 2013 Elsevier B.V. All rights reserved.

Keywords:
Anaglyph
CIELAB color space
Color appearance attributes
Subjective test

1. Introduction
Among many three-dimensional (3D) displaying techniques, e.g., glasses dependent or auto-stereoscopic [2], anaglyph is the least expensive way to make the 3D visualexperience achievable on ordinary monitors or even prints[3], with no special hardware but only cheap colored glasses.
Despite of its many inherent deficiencies, its resurgence has
been seen recently thanks to the abundance of 3D content
which is more easily accessible nowadays than ever.
Like other 3D displaying techniques, anaglyph can provide a slightly different view to each of two eyes. From thedisparity between the two views and other visual cues [4],the human visual system can generate the stereoscopic
representation of spatial relationships in the scene. An
anaglyph image is formed by superimposing two views(i.e., left and right images of a stereo image pair) in different
colors. When perceived through colored glasses, the twonCorresponding author. Tel. +86 91450996.
E-mail address: snli@ee.cuhk.edu.hk (S. Li).
1
Fellow, IEEE.

0923-5965/$ - see front matter & 2013 Elsevier B.V. All rights reserved.
http://dx.doi.org/10.1016/j.image.2013.03.004

images will be separated from the composite one to feedeach eye. The separation is based on color filtering as has
been elaborated in the literature [5,6]. Fig. 1 illustrates how
anaglyph works using the most popular and simplest anaglyph method, i.e., Color anaglyph. As shown in Fig. 1, a redcyan Color anaglyph image is generated by combining thered channel fR′l g2 of the left image and the blue & green
channels fG′r ; B′r g of the right image together, i.e.,fR′l ; G′r ; B′r g. Wearing red-cyan colored glasses, the left eye
perceives fR′l g since the red lens blocks most of the green
and blue colors. And the right eye perceives fG′r ; B′r g due tothe opposite color filtering property of the cyan lens.
Anaglyph images mainly suffer from three deficiencies,
i.e., color distortions, retinal rivalry, and ghosting effect.
Color distortions cause the colors perceived through theglasses to be quite different from those of the originalscene. This can be observed from Fig. 1 by comparing theoriginal stereo pair with the simulated perception of thetwo eyes. Retinal rivalry occurs when the same object
appears to have different colors in the two eyes. This2

The ‘prime’ symbol denotes gamma-corrected signals.

598

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

Blue and Green
channels of R

Right image (R)g+bPerceived R

Color Anaglyph

Color glass filteringr

Left image (L)Perceived L

Red channel of L
Fig. 1. An illustration of anaglyph 3D displaying using Color anaglyph.

phenomenon can be observed from Fig. 1 by comparing
the simulated perception of the two eyes. Retinal rivalry is
distracting, and causes visual fatigue and other side effects[1]. As the color gamuts of our eyes behind the coloredglasses do not overlap [1], retinal rivalry is inevitable.
However, by manipulating the lightness, retinal rivalry canbe significantly reduced. Shown as an example above,
Color anaglyph does not attempt to control the retinal
rivalry effect in its formation. It is evident from Fig. 1 thatfishes perceived by the left eye are much brighter thanthose of the right eye. Under this circumstance the retinal
rivalry will be extremely severe. Ghosting is a common
problem for most 3D displaying techniques [7,8]. In
anaglyph, ghosting is caused by the imperfect filtering of
the light wavelengths, so that the unwanted image leaks
through the colored glasses mixing with the intended one.
It is often more obvious in regions where there is a striking
contrast and a large binocular disparity.
In this paper, a new algorithm is proposed for anaglyph
image generation, with explicit considerations for lessening color distortions, retinal rivalry, and ghosting effect.
The study is based on liquid crystal displays (LCDs) andred-cyan colored glasses. But the principle can also be
applied to other types of displays, e.g., cathode ray tube
(CRTs), plasma display panels (PDPs), digital light projections (DLPs) etc., and other colored glasses, e.g., greenmagenta (Trioscopic 3D) [9], yellow-blue (ColorCode 3D)[10], etc. The main reasons for investigating red-cyan
anaglyph are that (1) the technique is patent free and (2)the performance can be compared with existing work in
the literature most of which also studied red-cyan anaglyph. Recently, alternatives to typical anaglyph colors
have been proposed. For example, in magenta-cyan anaglyph [11] two primary colors are used to present eachview. According to [11], in comparison to red-cyan anaglyph the additional blue color for the left view can help toreduce the retinal rivalry effect and preserve the color
accuracy. White-white anaglyph (Infitec Dualcolor3D) [12]was developed using narrow-band interference filters. The
new technique can deliver full colors to each eye similar topolarization or shutter glasses based methods. But it
cannot be applied to standard display monitors. These
alternative methods are beyond the scope of our study.
This paper is structured as follows. In Section 2, brief
reviews are given on existing studies of anaglyph

generation algorithms. The motivation and novelty of the
proposed method are also explained. Section 3 introduces
a detailed implementation of the proposed method.
Section 4 shows our experimental results. Finally, conclusion is given in Section 5.
2. Related work
2.1. Simple anaglyphs
In this paper, simple anaglyphs refer to those methods
which disregard properties of display and colored glasses.
Representatives include Color anaglyph, Half Color anaglyph, Optimized anaglyph, etc., as formulated in [13].
According to the performance comparison in [13] based on
five images of natural scenes, Color anaglyph seems todemonstrate the least color distortions, but on the other
hand produces severe retinal rivalry, similar to our observation in Fig. 1. Half Color anaglyph and Optimized
anaglyph address the retinal rivalry problem at theexpense of color reproduction. For example, it has been
claimed in [13] that Optimized anaglyph is almost free ofluminance retinal rivalry, whereas produces no red shades.
Simple anaglyphs are easy to implement and may perform
well in many cases. However, they are empirical methods,
leaving us with no means to fine-tune their behaviors inaccordance with properties of the display and coloredglasses to achieve the superior performance.
2.2. XYZ and LAB anaglyphs
Dubois [5] proposed an anaglyph generation method,
named as XYZ anaglyph in this paper, which takes into
account the spectral distributions of display primaries andtransmission functions of the colored glasses. In general,the principle of XYZ anaglyph is to minimize the color
distortions, i.e., differences between the perception of theoriginal stereo pair and that of the anaglyph image
through the colored glasses, in the CIE 1931 XYZ color
space. It can be formulated asmin∥C  V−C A  V A ∥VA

ð1Þ

where  denotes matrix multiplication. In (1), V ¼½Rl ; Gl ; Bl ; Rr ; Gr ; Br T represents a pixel of the stereo

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

pair,3 V A ¼ ½RA ; GA ; BA T is the corresponding pixel in the
anaglyph image, C is a 6  6 matrix converting V from thedevice RGB color space into the CIE XYZ color space, and CA
is a 6  3 matrix whose multiplication with VA serves two
purposes, i.e., simulating the filtering of the colored glasses
and converting the passing lights into the CIE XYZ color
space. Element values of matrices C and CA are determinedby spectral distributions of display primaries, and additionally CA is also dependent on transmission functions of
the glasses. Since the color space conversion from RGB to
CIE XYZ is linear and the distance between two XYZ colors
is measured by the l2 norm (Euclidean distance), Eq. (1)has a closed form solution, i.e., V A ¼ ðC TA  C A Þ−1  C TA  V,
which means that XYZ anaglyph actually is as efficient as
the simple anaglyphs introduced above, if disregarding thedisplay gamma transfer. It should be noted that VA calculated in this way will fall out of the gamut of the device
RGB color space. Hence, a scaling of VA is required,followed by a clipping to ensure that the final results lie
inside the unit RGB cube. A similar approach was proposedin [14], which still calculates the color distortions in the
CIE XYZ space but replaces the l2 norm in Eq. (1) with l∞norm (Chebychev distance). The resultant method requires
solving a linear program for each pixel of the anaglyph
image, thus is quite time-consuming. The authors
exploited color coherence and parallel processing to accelerate the execution.
Recently, McAllister et al. [1] proposed an anaglyph
method, namely LAB anaglyph, minimizing the color
distortions in the CIELAB color space. Compared to CIE
XYZ, the CIELAB color space exhibits several major advantages: (a) it is regarded as a uniform color space, i.e., theEuclidean distance in the CIELAB color space correlates
well with the perceptual color distance; (b) it incorporates
chromatic adaptation transform and non-linear responsecompression [15] to more accurately simulate the perception of the human visual system (HVS); (c) it provides
means for transforming tri-stimulus values to several color
appearance attributes, i.e., lightness, saturation, hue, etc. In
the LAB anaglyph [1], V and VA in (1) are converted into the
CIELAB color space. This color space conversion is nonlinear, hence as in [14] the resultant formula needs to be
optimized iteratively.
2.3. Ghosting reduction methods
Woods et al. [6] discussed in detail the source of theanaglyph ghosting. In [16], three methods were proposed
to reduce ghosting, i.e., stereo pair registration, color
component blurring, and depth manipulation. In [17], theauthors proposed to inhibit ghosting by controlling theamount of saturation. In [18], ghosting reduction was
implemented in a sequential process, i.e., analyzing differences between the left and right images, detecting theghosting area, and eventually adjusting the intensities of
the ghosting area. Tran [19] proposed ghosting reduction
methods which relied on explicit knowledge of properties
3
The RGB values have gone through the display gamma, and havebeen normalized to 1.

599

of the display device and the colored glasses. They canserve as post-processing components for existing anaglyphalgorithms. Recently, Sanftmann et al. [20] defined amodel to quantify the perceived luminance through thecolored glasses. Five parameters of the model can be
captured by simple subjective tests. Illustration was given
on how to use the model together with several simple
anaglyph methods to reduce the ghosting artifacts.
2.4. Motivation and novelty
The proposed method is mainly inspired by XYZ and
LAB anaglyph methods. As aforementioned, XYZ and LAB
anaglyph methods try to minimize the Euclidean distance
between original and perceived colors in the CIE XYZ and
CIELAB color spaces, respectively. Similarly, the proposed
method also aims at minimizing the perceptual differences
between the original and perceived colors. But instead ofnusing the XYZ or Ln an b values, our method is based onmatching the semantically meaningful color appearance
attributes, i.e., lightness, saturation, and hue. According to[15], color appearance attributes are deemed to be thecolor representations in the late stage of HVS. They can beused to accurately define the HVS color perception. Therefore, anaglyph methods based on color appearance attributes have the potential to lead to superior performance.
As the LAB anaglyph, the proposed method also works
in the CIELAB color space. Their differences include:
1. LAB anaglyph targets minimizing the Lnanb differences,while our method tries to match the perceptual color
appearance attributes.
2. LAB anaglyph method formulates the problem as an
optimization process. Our method can manipulate thelightness, saturation, and hue in a more controllable
manner. For example, since the lightness significantly
influences the retinal rivalry, we intentionally matchthe lightness of the left and right views to alleviate theretinal rivalry effect.
3. LAB anaglyph method needs iterative optimization. On
the other hand, our method has a closed form solution,
hence, is less computationally intensive.
In addition, the proposed method explicitly takes ghosting
reduction into account. As to be elaborated in Section 3,
we employ a subtractive ghosting reduction method. It istime-efficient and according to experimental results, itdoes reduce the ghosting artifacts to certain extent.
3. The proposed method
The systematic framework of the proposed algorithm isshown in Fig. 2. In general, we convert the stereo pair fromthe device RGB color space to the CIELAB color space, andthen calculate three perceptual color appearance attributes for each pixel position, including its lightness,saturation, and hue. We try to match these color appearance attributes to those of the perceived anaglyph, andfinally convert them back into RGB. Detailed information
on each processing module will be given below.

600

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

Fig. 2. Systematic framework of the proposed algorithm.

2
3.1. Gamma transfer
When visual signals are captured, gamma correction, i.e.,a non-linear transformation of the captured RGB values, istypically performed in order to compensate the nonlinearity4 of the traditional CRT displays to achieve thecorrect color reproduction. Although modern displays showless or even no non-linearity, the same gamma correction for
CRTs is still performed during the signal capture, because theother major and even more important purpose of the gamma
correction is to minimize the perceptual distortions [21]introduced by signal compression or during signal communication. Therefore, the modern displays, such as LCDs, PDPs,
DLPs, must simulate the gamma transfer function of CRT
displays for the correct color reproduction. Therefore, in the
proposed method we implement a gamma transfer function
for CRTs. The 8-bit device RGB values fR′; G′; B′g of the stereo
pair are normalized by multiplying 1/255, and then transformed to fR; G; Bg, as shown in Fig. 2, using the sRGB gammatransfer function. The inverse gamma transfer (i.e., gamma
correction) is performed after the derivation of RGB values ofanaglyph images, and ultimately the gamma-correctedvalues will be scaled by multiplying 255. For the formulationof the forward and inverse sRGB gamma transfer functions,please refer to [21,22].
3.2. Converting RGB to CIELAB
After simulating the gamma transfer, RGB values of thenstereo pair are converted into Ln an b values of the CIELAB
color space. The conversion can be separated into two
steps. The first step is to project the RGB values
fRl ; Gl ; Bl ; Rr ; Gr ; Br g of the stereo pair5 into the CIE XYZcolor space2
3
0:4243 0:3105 0:1657
6 0:2492 0:6419 0:1089 7
Cs ¼ 4
ð2Þ
5
0:0265 0:1225 0:8614

4
The non-linearity refers to the relationship between the device RGB
values and the physical luminance of the display.
5
Subscripts ‘l’ and ‘r’ indicate variables related to the respective left
and right images of the stereo pair.

3
2 3
Xr
Rr
6Y 7
6 7
4 r 5 ¼ C s  4 Gr 5;
Zr
Br

2

3
2 3
Rl
Xl
6Y 7
6 7
4 l 5 ¼ C s  4 Gl 5
Zl
Bl

ð3Þ

The conversion matrix Cs is for typical LCD displays. In thensecond step, fX l ; Y l ; Z l ; X r ; Y r ; Z r g are converted into Ln an b
values, i.e., fLl ; al ; bl ; Lr ; ar ; br g, using equations below:


Yi
−16
Li ¼ 116  f
Y W  

Xi
Yi
−f
ai ¼ 500  f
XY  W   W 
Yi
Zi
−f
ð4Þ
bi ¼ 200  f
YW
ZW(f ðtÞ ¼t 1=3

if t 4 0:008856

7:787  t þ 0:1379

otherwise

ð5Þ

where i∈fl; rg, and fX W ; Y W ; Z W g are XYZ values of thewhite point, i.e., ½X W ; Y W ; Z W T ¼ C s  ½1; 1; 1T .
3.3. Matching color appearance attributes in CIELAB colorspacenGiven Ln an b values of the stereo pair, our objective isto get {LAl, aAl, bAl, LAr, aAr, bAr} of the perceived anaglyph6
which generate similar lightness, saturation and hue as
those calculated from fLl ; al ; bl ; Lr ; ar ; br g. In our method,one (red) channel is used to present the left image and theother two channels (green and blue) are used to presentnthe right one. Therefore, Ln an b values of the perceived
anaglyph must be intentionally chosen, so that, whenconverted back into RGB, the three-dimensional vector
fLAl ; aAl ; bAl g can be represented by a single red value fRAl g,
and fLAr ; aAr ; bAr g can be represented by fGAr ; BAr g.
3.3.1. Right image processing
Firstly, we calculate the lightness, hue, and saturationof the right image of the stereo pair. According to thedefinition of the CIELAB color space, Ln value, i.e., Lr, can beused to represent the lightness. Hue (Hr) and saturation (Sr)6
Subscripts ‘Al’ and ‘Ar’ indicate variables related to the left and rightviews of the anaglyph image, respectively.

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

601

Fig. 3. (a) 256  256 colors fRAr ¼ 0; GAr ¼ 0; 1; …; 255; BAr ¼ 0; 1; …; 255g in the CIELAB color space. (b) The approximation surface modeled by Eq. (9) andindicated by the red dashed lines. (c) Top views of the original and the approximation surface.

of the right image are represented by


 
180
br
 tan−1
Hr ¼
þ π  uð−ar Þ
π
ar
Sr ¼

qﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ
2
a2r þ br

ð6Þ

ð7Þ

where uðÞ is the unit step function. fLAr ; aAr ; bAr g represents
the right view of the perceived anaglyph image in the
CIELAB color space. A good choice of fLAr ; aAr ; bAr g should
satisfy two conditions: (1) they generate lightness, hue,and saturation values as close to Lr, Hr and Sr as possible;(2) in the RGB color space, they can be represented byfRAr ; GAr ; BAr g with RAr ¼ 0. For illustration, all fLAr ; aAr ; bAr gthat conform to the second condition are plotted in Fig. 3(a).
They are obtained by converting the 256  256 RGB values
fRAr ¼ 0; GAr ¼ 0; 1; …; 255; BAr ¼ 0; 1; …; 255g into the CIELAB color space. The conversion follows the two steps
described in Section 3.2. In this case, the conversion (RGBto CIE XYZ) matrix C Ar is2
3
0:0153 0:1092 0:1171
6
7
C Ar ¼ 4 0:0176 0:3088 0:0777 5
ð8Þ
0:0201 0:1016 0:6546
which is determined by spectral distributions of display
primaries and also the transmission function of the right(cyan) lens. ½X Wr ; Y Wr ; Z Wr T ¼ C Ar  ½1; 1; 1T is taken as XYZ
values of the white point.
To satisfy the second condition, we need to ensure thatfLAr ; aAr ; bAr g lie in the surface shown in Fig. 3(a). However,it will be very complex to precisely meet this requirement.
Therefore, we approximate the original surface shown in
Fig. 3(a) by a simple surface empirically modeled as(bAr ¼ k  aAr
if ar 4 0
ð9Þ2ðaAr −ac Þ2 −ðbAr −bc Þ2 ¼ a2c þ bc otherwise
and LAr ∈½0; 100. The parameters are set as k ¼ −0:7273,
ac ¼125, bc ¼172. The dashed lines in Fig. 3(b) represent
the approximation surface. An animation version of Fig. 3(b) can be found in the project website [23], from which it
can be observed that the original surface shown in Fig. 3(a)nis nearly perpendicular to an –b plane. Fig. 3(c) shows the
top view. All fLAr ; aAr ; bAr g derived below will lie in thisapproximation surface. When they are converted back into

Fig. 4. The red line resembles the top view of the approximation surface
as shown in Fig. 3(c). Examples 1–4 illustrate how Eqs. (10) and (11)project far ; br g to faAr ; bAr g in the CIELAB color space. Constant T is from
Eq. (11).

RGB, the resultant small red values (RAr) introduced by theapproximation will be clipped to zero.
aAr and bAr specify the hue and saturation. Their values
are determined by(2ðaAr −ac Þ2 −ðbAr −bc Þ2 ¼ a2c þ bc & aAr ≤0
bAr ¼ k  aAr &aAr 4 0

if Hr ≥H RED
otherwiseand H r ≤H CYAN

ð10Þ
8H −H RED>> Sr  r>
qﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ >T<
2
H r −H CYAN
a2Ar þ bAr ¼
Sr 
>
>
>
T
>
:
Sr

if jH r −H RED j≤T
if jH r −H CYAN j≤Tð11Þ

otherwise

where H RED ¼ 41:61, H CYAN ¼ 221:61, T¼15. Fig. 4 illustrates
how the projection from far ; br g to faAr ; bAr g is performed
according to Eqs. (10) and (11): Colors in the light green area are projected to the leftpart of the approximated surface (examples 1 and 3).

 Colors in the light blue area are projected to the rightpart of the approximated surface (examples 2 and 4).

 For colors in the flat area (without slashes), projections
will generate the same saturation value as those of the602

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

qﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ
2
right image of the stereo pair, i.e.,
a2Ar þ bAr ¼ Sr
(examples 1 and 2).
 For colors in the textured area (with slashes),
qﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ
2
a2Ar þ bAr will be smaller than Sr (examples 3 and 4).
In examples 3 and 4, the two colors appear similar in theright image of the stereo pair. If keeping their saturations
during the projection, the resultant colors will be widely
apart, introducing visual artifacts to the anaglyph image.
By de-saturation as in Eq. (11), the projected colors will belocated more closely.
LAr represents the lightness, and its value is determined
by
8


>
< Lr  1−P  T−jH r −H RED j
if jH r −HRED j o T
Sr
T
ð12Þ
LAr ¼
>
:L
otherwise
r
8
P max
>
>
>
<
Sr −Slow
P Sr ¼ P max 
Shigh −Slow
>
>
>
:
0

if Sr 4 Shighif Sr ≤Shighand

Sr ≥Slow

ð13Þ

if Sr o Slow

where P max ¼ 0:4, Slow ¼ 40, Shigh ¼ 50, HRED and T are thesame as in Eqs. (10) and (11). It can be observed from
Eq. (12) that for most colors the lightness remains
unchanged after the projection, i.e., LAr ¼ Lr . Special treatment is given to red-like colors, i.e., a maximum of 40%
lightness reduction ðLAr ¼ 0:6Lr Þ. This empirical operation
intends to improve the chrominance accuracy of red-likecolors (at the expense of increasing retinal rivalry and lesslightness accuracy), which can help to improve the overallvisual quality according to our viewing experiences. An
example is given in Fig. 5 which illustrates the improvement on chrominance accuracy. As shown in (12) and (13),the amount of lightness reduction is dependent on the hue
and saturation values, i.e., Hr and Sr, respectively. The
maximum reduction is reached when Hr equals HRED andthe saturation value is high ðSr 4 Shigh Þ. As given by Eq. (13),for low saturated colors ðSr oSlow Þ, lightness reduction is not
performed (i.e., P Sr ¼ 0). The purpose of this is to avoid
abrupt lightness changes for low saturated colors. For thesame reason, P Sr slowly evolves from 0 to Pmax when thesaturation value Sr lies between Slow and Shigh.
3.3.2. Left image processing
To minimize retinal rivalry, left and right eyes should
perceive identical lightness. Assuming that the stereo
image pair is taken under well controlled conditions(e.g., same shutter speed, aperture, etc.), matching points
in left and right views will have the same color. Therefore,
to match the perceived lightness we simply makeLAl ¼ Ll

ð14Þ

where Ll represents the lightness of the left image of thestereo pair. In the final anaglyph, only the red channel isused to present the left view. We use it to reproduce thelightness LAl. Hence, there is no need to calculate aAl andbAl anymore.
It should be noted that because lightness reduction isapplied to red-like colors in the right image, as given by
Eqs. (12) and (13), lightness matching for these colors
cannot be achieved. Although this lightness reduction willcause more retinal rivalry and less lightness accuracy, it
helps to improve chrominance accuracy of red-like colors,
which we find empirically is useful for enhancing theoverall visual quality of perceived images.
3.4. Converting CIELAB to RGB
For the right image, firstly fLAr ; aAr ; bAr g are converted tofX Ar ; Y Ar ; Z Ar g usingaAr−1 LAr þ 16
þ
X Ar ¼ X Wr  f
116
500


−1 LAr þ 16
Y Ar ¼ Y Wr  f
116

Fig. 5. A red strawberry: (a) before the lightness reduction of the right view, (b) after the lightness reduction.

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

Z Ar ¼ Z Wr  f
(
f ðtÞ

−1

¼

−1



LAr þ 16 bAr
−
116
200


ð15Þ

t3

if t 4 0:2069

0:1284  ðt−0:1379Þ

otherwise

Then fX Ar ; Y Ar ; Z Ar g are converted to RGB values by
2
3
2
3
X Ar
RAr
6G 7
6Y 7
−1
4 Ar 5 ¼ C Ar  4 Ar 5
BAr
Z Ar

4. Performance evaluation

ð17Þ

where YWl is from the XYZ values of the white point, i.e.,½X Wl ; Y Wl ; Z Wl  ¼ C Al  ½1; 1; 1T , and the conversion matrix
for the left lens is2
3
0:1840 0:0179 0:0048
6
7
C Al ¼ 4 0:0876 0:0118 0:0018 5
ð19Þ
0:0012

0:0159Given YAl, RAl can be calculated byRAl ¼

maxðY Al −0:0118GAr −0:0018BAr ; 0Þ
0:0876determined empirically, based on a few stereo pairs which
are excluded from the following subjective performance
evaluation.

ð16Þ

As discussed in Section 3.3, the small RAr will be clipped tozero, leaving the right view represented by fGAr ; BAr g only.
For the left image, firstly LAl is converted to YAl:
−1 LAl þ 16
ð18Þ
Y Al ¼ Y Wl  f
116

0:0005603

ð20Þ

where 0:0118GAr and 0:0018BAr quantify the luminanceleakage for the left eye, which are subtracted from theintended luminance YAl. This is a subtractive ghosting
reduction method. If the matrix CAl is accurate, it canguarantee a perfect ghosting inhibition in regions where
YAl is larger than the luminance leakage. As discussed in[19,20], for complete ghosting elimination it is required tosuppress the image dynamic range, which will degrade
visual quality intuitively.
It can be observed from Eq. (8) that compared to that of
the left eye, the luminance leakage of the right eye will be
far less severe. In [20], it is also claimed that for red-cyan
glasses the right eye suffers less from the luminanceleakage (about 1/7 of that of the left eye). Therefore, inthe proposed algorithm ghosting reduction is implemented for the left image only.
Eventually, right and left RGB values are combined
together as {RAl, GAr, BAr}. Each element is clipped in therange 0–1. They are gamma corrected, and finally scaled bymultiplying 255.
3.5. Parameterization
For color space conversion and ghosting reduction,
values of the matrices Cs, CAl, and CAr are cited from [1].
These parameters are fixed and should be suitable fortypical LCD displays and red-cyan glasses. If they arerefined by true properties of the display and glasses, orby simple subjective tests as in [20], the performance will
be further optimized. The other parameters are set manually. Values of k, ac, bc are chosen so that top views of theoriginal and approximated surfaces as introduced in
Section 3.3 overlap closely. Slow, Shigh, Pmax, and T are

We conduct subjective tests to evaluate performancesof four anaglyph algorithms, i.e., Color anaglyph, XYZ
anaglyph [5], LAB anaglyph [1], and the proposed anaglyph. To the best of our knowledge, this is the firstsubjective test described in the literature to evaluate thevisual quality of anaglyph images. Experimental data canbe downloaded from the project website [23].
4.1. Overall performance
We download 25 stereo image pairs from the Internet[24,25], which cover a wide range of colors and scene
types. They are down-scaled to standard-definition(around 800  600) while keeping their aspect ratios.
Right images of these stereo pairs are shown in Fig. 6.
For each stereo pair, four anaglyph images, i.e., Color
anaglyph, XYZ anaglyph, LAB anaglyph, and the proposed
one, are presented simultaneously as illustrated by Fig. 7.
This side-by-side arrangement is to speed up the comparison process in order to lessen the fatigue of subjects. We
implemented Color and XYZ anaglyph generation algorithms. Implementation of the XYZ anaglyph generation
algorithm strictly follows instructions from [22]. The codeof LAB anaglyph was provided by its author.
Evaluation is performed in a room with fluorescentlights. The display monitor is a 24″ 1920  1200 Dell LCD
display (2407WFPB), and the viewing distance is about 3
times the screen height. The red-cyan glasses are the
NVIDIA 3D Vision Discover. Totally 20 subjects (nonexperts) attended the tests. They have normal vision (withor without corrective glasses) and have passed the color
blindness test. For each stereo pair, each subject is asked toassess the visual quality of four anaglyph images which aredisplayed simultaneously. The assessment is reported on a
five-point scale: 5 – Excellent, 4 – Good, 3 – Fair, 2 – Poor,and 1 – Bad. To lessen fatigue, subjects tell their opinions
to another person who is responsible for recording thescores. There is no limitation on the viewing duration, andsubjects are encouraged to express their feelings about
what factors they attribute the quality to. The order of the
25 images and positions of the four anaglyph methods are
randomized for each subject. Each test lasts around30 min. At the beginning, three anaglyph images arearranged as a training process to familiarize the subjects
with the anaglyph 3D viewing and test the possible stereo
blindness of the subjects.
We use the proposed method as a reference. Subjective
ratings of the proposed method are subtracted from thoseof the corresponding Color, XYZ, and LAB anaglyphs.
Difference values are processed using the method
described in the BT.500 standard [26] to derive thedifference mean opinion scores (DMOS) and 95% confidence interval for each anaglyph image. The β2 test
suggested in [26] is used to identify the subjects whose

604

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

Fig. 6. Right images of the 25 stereo pairs used in the subjective tests.

Anaglyphimage 1

Anaglyphimage 2

Anaglyphimage 3

Anaglyphimage 4

Fig. 7. Four anaglyph images are displayed simultaneously in the original
resolution.

quality judgments deviate from the distribution of thenormal scores significantly. Two subjects are rejected.
Fig. 8 shows final results of 75 anaglyph images. Red,
green, and blue circles indicate DMOS of Color, XYZ, and
LAB anaglyphs, respectively. The vertical line passing
through each circle represents the 95% confidence interval.
Larger mean score denotes better visual quality. With thecircle below the dashed zero line, it means that the
proposed method demonstrates better visual quality. In
general, it can be observed from Fig. 8 that the proposed
method achieves very good performance. Most circles are
below the dashed zero line.
Table 1 gives a brief summary of the performancecomparison. For each method, the 1st row shows theDMOS on the 25 images (higher value indicates better
performance), and the 2nd/3rd/4th row lists the number ofrank in top 1/2/3 (i.e., a count for how many times themethod is ranked first/second/third). Notice that there areties for the best performer, so the sum of values in the 2nd
row does not add up to 25. Similarly, for the 3rd or 4th
row, the sum of values does not add up to 50 or 75 either.
In general, it can be seen from Table 1 that the proposed
method performs relatively well on this data set.
However, it is also evident that performances arecontent-dependent. No method consistently outperforms
another on all images, and the 95% confidence intervals inmany cases are large, as shown in Fig. 8. According tocomments from subjects collected during tests, there is avariation between individuals about which factor is considered more important for good visual quality, e.g., lessretinal rivalry, or better chrominance accuracy, etc. The
large 95% confidence intervals shown in Fig. 8 can be
attributed to this variation.
4.2. Chrominance accuracy, retinal rivalry
and ghosting effectFive images are selected in another experiment toevaluate the image quality regarding specific visual factors,e.g., chrominance accuracy,7 retinal rivalry, and ghosting
effect. To analyze the reason why one method has particularly good performance on a certain image, we selectimages based on subjective quality evaluation results
shown in Fig. 8. Four images, i.e., women, garden, strawberry and gate, are chosen, because they are associatedwith best performances of the four anaglyph methods, i.e.,
Color, XYZ, LAB, and the proposed one, respectively. One
additional image, i.e., penguin, is selected because it iscommonly used for comparing anaglyph methods [25].
7Color accuracy include both lightness and chrominance accuracy. In
this experiment, only chrominance accuracy is tested, since we found in
the previous experiment that our method may not be good at chrominance reproduction.

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

2 penguin↓makeup↓waxwork↓gate↓

fishes↓duck↓

garden↓goose↓

superman↓

605

terrace↓transformer vase
↓
↓

woman
↓

DMOS

1
0
−1
−2

↑
↑
strawberry rabbit

↑
piano

↑
expo

↑
shop

5

10

↑
flower↑pavilion

↑
map

15

↑
tiger

↑
tower

20

↑
tree

↑
spray

25

Fig. 8. Performance comparison on 25 images among four anaglyph methods using the proposed one as a reference. The dashed zero line: proposed
method; red: Color anaglyph; green: XYZ anaglyph; blue: LAB anaglyph. Each circle corresponds to an anaglyph image. The vertical line passing througheach circle represents the 95% confidence interval. Larger mean score indicates better visual quality. The proposed method produces better quality if thecircle is below the dashed zero line.
Table 1
A brief summary of the performance comparison among four anaglyph
generation methods, i.e., Color, XYZ, LAB, and the proposed method, on
25 images.
Methods

Color

XYZ

LAB

Proposed

Mean score on 25 images
No. of rank in top 1
No. of rank in top 2
No. of rank in top 3−0.2604
715−0.176914
18−0.173
8
13
22

0
8
19
22

The main differences between this experiment and theprevious one described in Section 4.1 include:(1) Subjects need to give four quality scores for eachanaglyph image, evaluating its chrominance accuracy,
retinal rivalry, ghosting, and overall quality. Therefore,
in the training stage, to each subject we explain theconcepts of these visual phenomena by using image
examples. These image examples do not include thefive images used in the testing stage.
(2) The original image is shown to each subject, so thatthe subject can memorize its color and evaluate thechrominance accuracy of the anaglyph images. Specifically, for each of the five images in the test, the left
view of the stereo image pair is shown in 2D to thesubject. He/She can take as much time as he/she needs
to memorize the colors. Then, he/she is asked to put on
the 3D glasses and evaluate four anaglyph images
which are arranged in the way shown in Fig. 7. To
prevent memory fading, the chrominance accuracy isevaluated first, followed by retinal rivalry, ghosting,and overall quality.

The other experimental procedures are similar withthose described in Section 4.1. For each subject, the wholesession needs around 20–30 min to complete. 18 subjects
in total participate in the experiment. The assessment isalso reported on a five-point scale. As in Section 4.1,
subjective ratings of our anaglyph images are subtracted
from those of the other anaglyph methods. The difference
values are processed using the method described in the
BT.500 standard [26] to derive the difference mean opinion score (DMOS). The β2 test [26] is used to identify
outlier subjects. In this experiment, no subject is rejected.

Fig. 9 shows experimental results. From top to bottom,
subfigures demonstrate evaluation results for chrominance accuracy, retinal rivalry, ghosting effect, and overallvisual quality. The horizontal axis indicates different
images, and vertical axis indicates DMOS - higher DMOS,
better chrominance accuracy (less retinal rivalry, lessghosting effect, or better overall quality). Red, green, andblue bars are respectively associated with Color, XYZ, and
LAB anaglyph methods. Positive DMOS means the corresponding method performs better than the proposed one,while negative DMOS means that it is outperformed by the
proposed one.
It can be observed from Fig. 9 that regarding chrominance accuracy, Color anaglyph outperforms the proposed
method on all five images. It is the best performer for
penguin, gate, women, and garden, and second best for
strawberry. LAB anaglyph is also relatively good at chrominance reproduction, shown by penguin (a very colorful
image) and especially strawberry. The XYZ anaglyph performs relatively worse than others in terms of the chrominance accuracy, but better at presenting greenish colors,
as shown in the test image garden.
Regarding the retinal rivalry effect, we can see that ingeneral XYZ and our method outperform Color and LAB
anaglyph methods obviously except for the test image
women in which all methods generate little retinal rivalry.
When comparing Color with LAB anaglyph, it can be seenthat in many cases (4 out of 5) LAB anaglyph is better at
reducing retinal rivalry.
Regarding the ghosting effect, there is less variation
between different methods compared to that of chrominance accuracy and retinal rivalry. Generally, the proposed
method seems to perform the best, closely followed by
XYZ, LAB and lastly Color anaglyph.
Comparing Figs. 8 and 9, we can see that overall quality
scores in these two figures exhibit similar trends. In
particular, the top performing method remains the samefor each of the five tested images. On the other hand,differences between these two sets of results are due tothe variation of opinions between different subjects asanalyzed in Section 4.1, and also from the fact that thisexperiment uses the original image as a reference, while
the previous one does not. The use of reference images
does have influence on the overall quality judgement. As
exemplified in a very colourful image penguin, since
subjects can refer to the original colors, the large overall

606

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607

It should be noted that limited by the experiment
duration, the above analysis is only based on five images
which may be inadequate. Future works need to be done
for a more detailed statistical analysis.

Color anaglyph
XYZ anaglyph
LAB anaglyph

DMOS

2
1
0

4.3. Complexity

−1
−2

1

2

3

4

5

Chrominance Accuracy

DMOS

2
1
0
−1
−2

1

2

3

4

5

Among the four anaglyph generation algorithms, Color
anaglyph is the simplest one. If disregarding the gammatransfer, XYZ anaglyph is as time-efficient as Color anaglyph. LAB anaglyph has the greatest complexity, since it
involves a non-linear transform in the minimization process, as discussed in Section 2, which needs to be solved
iteratively. Compared to LAB anaglyph, the proposed
method is much simpler. Without specific optimization,
the Matlab code of the proposed method needs about 2 s
to process an 800  600 sized image.

Retinal Rivalry Effect

5. Conclusion
DMOS

2
1
0
−1
−2

1

2

3

4

5

4

5

Ghosting Effect

DMOS

2
1
0
−1
−2

1

2

3

Overall Quality
Fig. 9. From top to bottom, subfigures demonstrate evaluation results forchrominance accuracy, retinal rivalry, ghosting effect, and overall visualquality. The horizontal axis indicates different images, while the verticalaxis indicates DMOS. Higher DMOS, better chrominance accuracy/lessretinal rivalry/less ghosting effect/better overall quality. The red, green
and blue bars are associated with Color, XYZ, and LAB anaglyph methods,
respectively.

quality differences shown in Fig. 8 now diminish in Fig. 9.
The advantages of less retinal rivalry of XYZ and the
proposed method are weakened by their disadvantages
in chrominance reproduction. However, retinal rivalry
indeed plays a very important role in the overall quality,
despite the presence of reference colors. We simply
calculate the linear correlation coefficient (LCC) between
different groups of quality scores. The LCC between overall
quality scores and chrominance accuracy scores is 0.319,
while the LCC between overall quality scores and retinal
rivalry scores is 0.511, which means that retinal rivalry may
be more closely related to the overall quality of perceived
anaglyph images. However, this does not mean chrominance accuracy is not important. It can be observed from
Fig. 9 that when retinal rivalry is subtle, chrominance will
dominate the overall quality judgment, as exemplified by
women and strawberry.

In this paper, a new algorithm is proposed for anaglyph
image generation. Distinguished from the existing techniques which aim at matching the perceived anaglyph imagento the stereo pair in terms of RGB, XYZ or Ln an b values,
the proposed method tries to match the three perceptual
color appearance attributes, i.e., lightness, hue, and saturation, since they can more precisely define the HVS color
perception. Subjective tests are conducted to evaluate
performances of the various anaglyph generation methods. It turns out that the proposed algorithm performs
quite well. The subjective test also reveals that the performance is content-dependent. Besides, it shows that there
is a large variation between individuals about which factor
is considered more important in the evaluation of visualquality of anaglyph images. A further point to note is thatincorporating color enhancement into the proposed anaglyph generation method is extremely easy by tuning thelightness and saturation values.
References[1] D.F. McAllister, Y. Zhou, S. Sullivan, Methods for computing color
anaglyphs, Stereoscopic Displays and Applications XXI 7524 (2010).
[2] L.M.J. Meesters, W.A. Ijsselsteijn, P.J.H. Seuntiens, A survey ofperceptual evaluations and requirements of three-dimensional TV,
IEEE Transactions on Circuits and Systems for Video Technology 14(3) (2004) 381–391.
[3] R.Z. Zeng, H.Z. Zeng, Printing anaglyph maps optimized for display,
Proceedings of the SPIE 7866 (2011). 78661S–78661S-5, 2011.
[4] M.J. Tovee, Brain and Space, An Introduction to the Visual System,
2nd ed. Cambridge University Press, 2008.
[5] E. Dubois, A projection method to generate anaglyph stereo images,
in: IEEE International Conference on Acoustics, Speech, and Signal
Processing, vol. 3, 2001, pp. 1661–1664.
[6] A.J. Woods, T. Rourke, Ghosting in anaglyphic stereoscopic images,
Stereoscopic Displays and Virtual Reality Systems XI 5291 (2004)
354–365.
[7] A.J. Woods, Understanding Crosstalk in Stereoscopic Displays, in:Keynote Presentation at 3DSA (Three-Dimensional Systems andApplications) Conference, Tokyo, Japan, 2010.
[8] J. Konrad, B. Lacotte, E. Dubois, Cancellation of image crosstalk intime-sequential displays of stereoscopic video, IEEE Transactions on
Image Processing 9 (5) (2000) 897–908.
[9] Trioscopic 3D, 〈http://www.trioscopics.com/〉.
[10] ColorCode 3D, 〈http://www.colorcode3d.com/〉.

S. Li et al. / Signal Processing: Image Communication 28 (2013) 597–607[11] Robin Lobel, Magenta-cyan anaglyphs, 〈http://www.divideconcept.
net/papers/MCA-RL09.pdf〉.
[12] Infitec Dualcolor3D, 〈http://www.infitec-global-sales.com/english/
infitec-definiton.htm〉.
[13] 3DTV, 〈http://3dtv.at/Knowhow/AnaglyphComparison_en.aspx〉.
[14] Z. Zhang, D.F. McAllister, A uniform metric for anaglyph calculation,
Stereoscopic Displays and Virtual Reality Systems XIII 6055 (2006)
5513.
[15] M.D. Fairchild, Color Appearance Models, 2nd ed. Wiley-IS&T,
Chichester, UK, 2005.
[16] I. Ideses, L. Yaroslavsky, Three methods that improve the visualquality of colour anaglyphs, Journal of Optics A: Pure and Applied
Optics 7 (2005) 755–762.
[17] W. Alkhadour, et al., Creating a Color Anaglyph from a Pseudo-Stereo
Pair of Images, in: 4th International Conference on Information
Technology, Amman, Jordan, June 2009.
[18] A.J. Chang, et al., Ghosting reduction method for color anaglyphs,
Proceedings of the SPIE 6803 (2008). 68031G–68031G-10.

607[19] V. Tran, New Methods for Rendering Anaglyphic Stereoscopic
Images on CRT Displays and Photo-Quality Inkjet Printers, M.S.
Thesis, University of Ottawa, 2005.
[20] H. Sanftmann, D. Weiskopf, Anaglyph stereo without ghosting,Computer Graphics Forum 30 (June (4)) (2011) 1251–1259.
[21] C. Poynton, Gamma a Technical Introduction to Digital Video, Wiley,
New York, 1996.
[22] E. Dubois, Conversion of a Stereo Pair to Anaglyph with the LeastSquares Projection Method, 〈http://www.site.uottawa.ca/  edubois/
anaglyph/LeastSquaresHowToPhotoshop.pdf〉, 2009.
[23] IVP Anaglyph Image Database, 〈http://www.ee.cuhk.edu.hk/  snli/anaglyph_database.htm〉.
[24] 3D China, 〈http://www.china3-d.com/3dclub/〉.
[25] SWell3D, 〈http://www.swell3d.com/color-anaglyph-methods-com
pare.html〉.
[26] ITU-R Recommendation BT.500-11, Methodology for the subjective
assessment of the quality of television pictures, ITU, Geneva,
Switzerland, 2002.