12
Stereo effect of image converted from planar Ran Liu a, * , Qingsheng Zhu a , Xiaoyan Xu a , Liou Zhi a , Hongtao Xie a , Jun Yang b , Xiaoyun Zhang a a College of Computer Science, Chongqing University, 400044 Chongqing, China b School of Electronics and Information Engineering, Tongji University, 201804 Shanghai, China Received 25 October 2006; received in revised form 13 December 2007; accepted 14 December 2007 Abstract Research on planar-to-stereo image conversion has significant theoretical and practical implications for image process- ing. In this paper we use a method which segments an image into sub-blocks to perform this kind of conversion; parameters such as random variables are used for conversion control. We use two quantitative criteria, cross-entropy and root-mean- square error, to evaluate the stereo effect. Furthermore, the stereo effect that the random variables create is discussed. The results of the experiment show that, (i) when all random variables have the same distribution, different values of these random variables only slightly affect the stereo effect; and (ii) when different distributions are applied to the random vari- ables, the cross-entropies or root-mean-square errors are slightly different, which indicates different distributions have a small influence on the stereo effect. Generally, we recommend normal distribution for better stereo effect in most cases. Ó 2007 Elsevier Inc. All rights reserved. Keywords: Stereo vision; Conversion; Planar; Stereo; Image processing 1. Introduction We have many old paintings and photos that are still highly valued as legacy of the past times. Most of them are planar images, however. If we can convert planar images into stereo on standard computer monitor (i.e. CRT monitor), we will obtain stronger stereoscopic perception about the scene, making them more attrac- tive and impressive. Some papers have discussed this topic and its pertinent techniques [1–6,8,10–13], and most of them use conventional techniques such as image-based modeling for generating depth (hence stereo) from a single image. However, few of them discussed the stereo effect of image converted from a planar. This paper uses a method which segments an image into sub-blocks to convert planar images into stereo. As we know, it is depth cue that gives us a stereoscopic perception when we watch a scene in real world. Usually, depth cue can be classified into two types, i.e. physiological depth cue and psychological depth cue [14]. For physiological depth cue, perception of depth is produced primarily from binocular disparity, crystalline lens adjustment and convergence, etc., and binocular disparity brings the strongest depth perception to the human 0020-0255/$ - see front matter Ó 2007 Elsevier Inc. All rights reserved. doi:10.1016/j.ins.2007.12.008 * Corresponding author. Tel.: +86 23 65102506; fax: +86 23 65111874. E-mail addresses: [email protected] (R. Liu), [email protected] (Q. Zhu), [email protected] (J. Yang). Available online at www.sciencedirect.com Information Sciences 178 (2008) 2079–2090 www.elsevier.com/locate/ins

Stereo effect of image converted from planar

  • Upload
    ran-liu

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Stereo effect of image converted from planar

Available online at www.sciencedirect.com

Information Sciences 178 (2008) 2079–2090

www.elsevier.com/locate/ins

Stereo effect of image converted from planar

Ran Liu a,*, Qingsheng Zhu a, Xiaoyan Xu a, Liou Zhi a, Hongtao Xie a,Jun Yang b, Xiaoyun Zhang a

a College of Computer Science, Chongqing University, 400044 Chongqing, Chinab School of Electronics and Information Engineering, Tongji University, 201804 Shanghai, China

Received 25 October 2006; received in revised form 13 December 2007; accepted 14 December 2007

Abstract

Research on planar-to-stereo image conversion has significant theoretical and practical implications for image process-ing. In this paper we use a method which segments an image into sub-blocks to perform this kind of conversion; parameterssuch as random variables are used for conversion control. We use two quantitative criteria, cross-entropy and root-mean-

square error, to evaluate the stereo effect. Furthermore, the stereo effect that the random variables create is discussed.The results of the experiment show that, (i) when all random variables have the same distribution, different values of theserandom variables only slightly affect the stereo effect; and (ii) when different distributions are applied to the random vari-ables, the cross-entropies or root-mean-square errors are slightly different, which indicates different distributions have asmall influence on the stereo effect. Generally, we recommend normal distribution for better stereo effect in most cases.� 2007 Elsevier Inc. All rights reserved.

Keywords: Stereo vision; Conversion; Planar; Stereo; Image processing

1. Introduction

We have many old paintings and photos that are still highly valued as legacy of the past times. Most ofthem are planar images, however. If we can convert planar images into stereo on standard computer monitor(i.e. CRT monitor), we will obtain stronger stereoscopic perception about the scene, making them more attrac-tive and impressive. Some papers have discussed this topic and its pertinent techniques [1–6,8,10–13], and mostof them use conventional techniques such as image-based modeling for generating depth (hence stereo) from asingle image. However, few of them discussed the stereo effect of image converted from a planar.

This paper uses a method which segments an image into sub-blocks to convert planar images into stereo. Aswe know, it is depth cue that gives us a stereoscopic perception when we watch a scene in real world. Usually,depth cue can be classified into two types, i.e. physiological depth cue and psychological depth cue [14]. Forphysiological depth cue, perception of depth is produced primarily from binocular disparity, crystalline lens

adjustment and convergence, etc., and binocular disparity brings the strongest depth perception to the human

0020-0255/$ - see front matter � 2007 Elsevier Inc. All rights reserved.

doi:10.1016/j.ins.2007.12.008

* Corresponding author. Tel.: +86 23 65102506; fax: +86 23 65111874.E-mail addresses: [email protected] (R. Liu), [email protected] (Q. Zhu), [email protected] (J. Yang).

Page 2: Stereo effect of image converted from planar

tsQ , sQ ,

tsK ,

(Sub-block)(Image width)

(Random variable that)corresponds to)N

(Sub-block width)

(Image height)

(0,0)

M

W

Fig. 1. An image is segmented uniformly into an M � N array of sub-blocks; horizontal parallax is added to each sub-block randomly.Note: M, image height (in pixels); Qs,t, a sub-block of the image; Ks,t, random variable that Qs,t corresponds to; N, image width (in pixels);W, sub-block width (in pixels).

2080 R. Liu et al. / Information Sciences 178 (2008) 2079–2090

eye. Psychological depth cue, on the other hand, generates perception of depth mainly from vision experienceand memory. Hou et al. point out that, physiological depth cue and psychological depth cue may influenceeach other so as to provide better visual comfort [8]. If horizontal parallax is added randomly to each pixelof an image, then the interaction of physiological depth cue and psychological depth cue will provide observerswith certain stereoscopic depth perception [8]. Based on the principles of physiological depth cue and psycho-logical depth cue, our method starts from breaking down an image into sub-blocks in an M � N array, shownin Fig. 1. Then it makes each sub-block offset from initial position slightly by stretching it in the cross direc-tion, thus adding horizontal parallax to each sub-block. In order to make sub-blocks offset randomly, weassign a random variable to each sub-block so that the whole segmented image corresponds to a random var-iable matrix KM�N, and each sub-block will stretch according to the value of its assigned random variable. Forexample, sub-block Qs,t corresponds to random variable Ks,t. Suppose that the width of Qs,t is W and the valueof Ks,t is Vs,t. Then the width of Qs,t will be changed to Vs,t �W after conversion. If Vs,t > 1, Qs,t will bestretched out. Otherwise, it will be shortened. In this way each sub-block can be offset from its initial positionslightly to produce horizontal parallax. The image obtained from this method and the original image togetherform a stereo pair [1,15,16]. Flowchart of this procedure is shown in Fig. 2; for more details, see [8]. With ourtime-sharing binocular stereo imaging system [16,18], image depth can be perceived through the LCD shutterglasses on condition that the image of stereo pair is saved in JPS format. JPS files are created from page flippedstereo by the Stereo Capture utility, or provided by an outside source. Regular JPEGs that consist of a side byside image must be renamed with the .jps extension in order to be viewed as a stereo image [16].

The basic idea of the proposed method is to generate a stereo pair from a single image by lateral shifting ofsub-blocks, and it is this shifting that creates a depth hallucination for the observer. Note that no special treat-ments are needed here for occluded areas. From analysis above we can see that the stereo effect relies heavilyon which kind of shifting is used, and the key problem is how to produce a suitable random number matrix forproper shifting.

Few papers give quantitative criteria for stereo effect evaluation [9,17] or discuss the stereo effect that dif-ferent parameters create, however. Using the method above, we convert the planar image into a stereo one onstandard computer monitor, and thoroughly discuss the stereo effect that random numbers work on. InSection 2 of this paper two quantitative criteria are given to evaluate the conversion: cross-entropy androot-mean-square error. Section 3 discusses the stereo effect produced by random variables, and some casesof different distributions are discussed. Finally we summarize our work and explore some possibilities forfuture research.

2. Evaluation criteria

It is difficult to evaluate the stereo effect of stereo image objectively and quantitatively. Based on the char-acteristics of the conversion method described above, however, we think that the following evaluation method

Page 3: Stereo effect of image converted from planar

Fig. 2. Flowchart of image conversion from planar to stereo. Random variables are used for conversion control.

R. Liu et al. / Information Sciences 178 (2008) 2079–2090 2081

is reasonable on condition that a stereo pair has been taken with a stereo camera in advance: Apply the con-version method to one image in the stereo pair, and then we obtain a converted image. If there is very littledifference between the created image and the other image in the stereo pair, indicating that the created image issimilar to the image obtained from the real world, then excellent stereo effect is realized. Otherwise, the stereoeffect is not desirable.

Based on the method described above, we use the following two criteria to evaluate the difference betweenthe two images after the conversion. (Hereinafter the left image and the right image, obtained from a stereocamera, will be referred to as lImg and rImg respectively. We applied the method to rImg, and got the leftimage lImg0 whose size is the same as lImg.)

1. Cross-entropyLet X be a random variable with n states, where n is a limited number. pi = P{X = xi}; i = 0,1, . . . ,n � 1. Inimage engineering, pi always represents the statistics of gray scale of i in an image. Cross-entropy I[P,Q],given by (1), is used to measure the differences between two kinds of probability distributions in informa-tion contents: P = {p0,p1, . . . ,pn�1} and Q = {q0,q2, . . . ,qn � 1}.

I ½P ;Q� ¼Xn�1

i¼0

pi lnpi

qi

ðqi 6¼ 0Þ; ð1Þ

where pi represents the statistics of gray scale of i in image P, and qi represents the statistics of gray scale of i

in image Q.Cross-entropy is a key criterion to measure the differences in pixel information contents between twoimages.From (1) we can see that, since pi is the statistics of gray scale of i, cross-entropy only represents the dif-ference between two images as a whole. Sometimes this phenomenon may occur: there is a remarkable dif-ference between images P and Q as perceived by us, but I[P,Q] is too small to measure the difference.Consequently, the root-mean-square error should be used as another criterion.

Page 4: Stereo effect of image converted from planar

2082 R. Liu et al. / Information Sciences 178 (2008) 2079–2090

2. Root-mean-square errorLet the height and width of the image is m and n pixels, respectively. rImg(i, j) denotes the gray scale ofpoint (i, j) in image rImg. The root-mean-square error of gray scale can be calculated from (2)

ERMSðrImg0; rImgÞ ¼ 1

mn

Xm�1

i¼0

Xn�1

j¼0

½rImg0ði; jÞ � rImgði; jÞ�2" #( )1=2

: ð2Þ

From (1) and (2) we know theoretically that, the smaller the absolute values of I ½rImg0;rImg� and ERMS

(rImg0, rImg) are, the better the stereo quality is, especially when the values are near zero. This is because smal-ler cross-entropy and root-mean-square error indicate that the image obtained from conversion is more similarto the image obtained from stereo camera in the real world.

3. Experiment on random variables

In our method each sub-block Qs,t corresponds to a random variable Ks,t, hence the whole segmented imagecorresponds to a random number matrix KM�N. In this section we will discuss how the value of KM�N influ-ences the stereo effect. The original stereo image pair used in the experiment is shown in Fig. 3 (the size of eachimage is 800 � 600). We applied the method to the right image. The experiment was repeated many times, andin order to obtain comparable experiment results, the same parameters were used each time. In the followingexperiments we let 0.5 6 Ks,t < 1.5, and kept M = 150, N = 200 on most occasions.

What’s more, we must manage to make the maximum offset of Qs,t from initial position satisfy the con-straint of Panum’s Fusional Area [7,8]. Ref. [8] uses the maximum variance to control the offset in order tomake the maximum offset satisfy the constraint. This parameter neither has any intuitive physical meaning,however, nor does it reduce calculation. Here we adopt a method mentioned in [7] to control the offset, there-fore, which demands that when the conversion is finished, the horizontal parallax of Dqt,k satisfies (3),

� 2hgpd

EP r< Dqt;k <

2hgpd

EP r; ð3Þ

where 2h equals interpupillary distance, which usually takes a value of 65 mm for human eyes; g is visual acute-

ness, which usually takes a value of 10 (�2.907 � 10�4 rad); pd is the distance between monitor and observer(pd > 0; here we set pd = 100 cm); E is the pupil diameter, usually E = 0.4 cm; and Pr is the pixel interval, we letPr = 3.53 � 10�2 cm. Putting these parameters into (3), we get �13 6 Dqt,k 6 13. In this conversion the stereopair is obtained from the combination of an image and a new image produced by randomly moving sub-blocksof the former image, so we can assume that the stereo pair is created from a Parallel Binocular Stereo ImagingSystem, thus eliminating any need for taking theoretical constraint mentioned in [7] into account. An algorithmto produce a random number matrix that satisfies the constraint can be described as follows:

Algorithm ProduceKmn: produce a random number matrix KM�N which satisfies the constraint of Panum’s

Fusional Area.Input: a random number matrix KM�N which contains M rows and N columns (M P 1,

N P 1). Element K[s,t] in the matrix corresponds to sub-block Qs,t.

Fig. 3. The original image is a stereo pair. The left image is referred to as lImg and the right image as rImg.

Page 5: Stereo effect of image converted from planar

R. Liu et al. / Information Sciences 178 (2008) 2079–2090 2083

Output: a random number matrix KM�N in which each element satisfies the constraint ofPanum’s Fusional Area

Method:for each row Ks in KM�N dobeginrepeat

for each element K[s,t] in row Ks doproduce a random number Vs,t which has certain distribution, Vs,t 2 [0.5,1.5);

if Vs,t satisfies the constraint of Panum’s Fusional Area thenK[s,t] :¼ Vs,t;

elserepeat producing Vs,t; if Vs,t still not satisfies the constraint after three times,

clear all elements in the front of K[s,t]

until all elements in row Ks have random numbers which satisfy the constraint;end.

According to the method, when an image is segmented into M � N sub-blocks, sub-blocks from differentrows have no influence on each other during the conversion, whereas sub-blocks in the same row are related toeach other. Taking advantage of this feature, the algorithm adopts a strategy that checks the element imme-diately when it is produced to reduce the time complexity. If the element does not satisfy the constraint, try toproduce it again; if it still not satisfies the constraint after repeating this procedure three times, then all ele-ments which have been produced in the same row must be reproduced.

In the following experiment, we discuss the respective stereo effects obtained for six different distributions.

3.1. Moving pixels without stretch

First let’s consider the simplest case where M = 1, N = 1, and the value of K1,1 equals 1, which meansthere’s no stretch of image after the conversion. With this set of parameters we get the left image lImg0 whichis identical with rImg. If we move the pixels of the lImg0 by a distance (e.g. d pixels), we get lImg00. lImg00 andrImg together form a stereo pair (shown in Fig. 4), and it is also stereoscopic. We evaluate the stereo effect ofthe stereo pair by experiment. To make the comparison easier, other parameters used in this part take thesame values as those described at the beginning of Section 3, and the value of Dqt,k varies within [�13,13],which indicates the horizontal parallax of the corresponding pixels in two images will range from �13 to13. So we have 1 6 d 6 13.

Using this method, we repeated the experiment 13 times (13 experiment runs are enough to obtain ourresults since d satisfies ‘‘1 6 d 6 13”), and recorded the data in Table 1. Lines chart drawn according to thedata in Table 1 is shown in Fig. 5.

Fig. 4. By moving pixels without stretch, a stereo pair is created.

Page 6: Stereo effect of image converted from planar

Table 1Cross-entropies and root-mean-square errors

d I ½lImg00 ;lImg� ERMS

1 0.002834 38.330272 0.001599 38.270873 0.000372 38.220864 �0.000854 38.195095 �0.002081 38.221776 �0.003305 38.287937 �0.004531 38.364348 �0.005758 38.432929 �0.006992 38.4752210 �0.009653 39.4869011 �0.010899 39.5404412 �0.012141 39.5940713 �0.013382 39.64767Mean value �0.004984 38.69757Standard deviation 0.005361 0.609734

Moving pixels without stretch method.

Erms

38.8

39.0

39.2

39.4

39.6

39.8

40.0

40.2

40.4

40.6

0 4 9 10 11 12 13 14

Normal Piecewise Triangular

Moving Uniform Fitting

Cross-entropy-0.004

-0.002

0

0.002

0.004

0.006

0 2 4 6 8 10 11 12 13 14

Normal Piecewise Triangular

Moving Uniform Fitting

1 2 3 5 6 7 8

1 3 5 7 9

Fig. 5. Based on the experiment data we can draw lines in one figure for comparison. Note: Moving, moving pixels without stretch;Uniform, uniform distribution; Triangular, triangular distribution; Piecewise, piecewise uniform distribution; Fitting, fitting thedistribution of gray value; Nomal, normal distribution.

2084 R. Liu et al. / Information Sciences 178 (2008) 2079–2090

3.2. Uniform distribution

Suppose that Ks,t observes uniform distribution, and 0.5 6 Ks,t < 1.5, resulting in a mean value of 1 for Ks,t,i.e. a = 1. (The method demands a value of 1 for a, which guarantees that the size of the image is not changedafter conversion.)

A set of random numbers which have uniform distribution and satisfy the constraint is shown in the2nd column of Table 2, and the image created based on this set of random numbers is shown in Fig. 6a.So the corresponding I[lImg0,lImg] and ERMS(lImg0, lImg) can be calculated from Fig. 6 and the left image inFig. 3. Repeat the experiment hundreds of times, we find that cross-entropy and root-mean-square errorare stable around the mean value. Because of limited space, data are extracted successively and recorded inTable 3 only for 10 of these runs of experiment, and the corresponding lines are drawn in Fig. 5 based on thesedata.

Page 7: Stereo effect of image converted from planar

Table 2Data sets of random numbers that have different distributions

Random variables Value

Uniform Triangular Piecewise Fitting Normal

K1,1 0.9854 0.5000 1.1131 1.4412 0.7294K1,2 1.4960 0.6134 0.8892 0.6862 1.1507. . . . . . . . . . . . . . . . . .

K150,200 1.3390 0.8848 1.2481 1.2761 0.6891

All the numbers are produced by algorithm ProduceKmn.

Fig. 6. The left image of lImg0 can be created according to different sets of random numbers in Table 2. They are slightly different.

Table 3Cross-entropies and root-mean-square errors of gray scale

No. Uniform Triangular Piecewise Fitting Normal

I[lImg0 ,lImg] ERMS I[lImg0 ,lImg] ERMS I[lImg0 ,lImg] ERMS I[lImg0 ,lImg] ERMS I[lImg0,lImg] ERMS

1 0.005744 40.48661 0.001033 39.93968 0.005240 39.16967 0.003782 40.2754 0.000491 39.572652 0.005968 40.29314 0.000666 40.17308 0.005372 39.17799 0.002635 40.4307 0.000344 39.694193 0.006120 40.50277 0.000421 40.07825 0.005132 38.97137 0.002396 40.3512 0.000061 39.660124 0.006564 40.38166 0.000965 39.98112 0.004953 39.26402 0.002808 40.3192 0.000482 39.581245 0.006051 40.50212 0.000887 39.92865 0.004892 39.43780 0.001578 40.3682 �0.000098 39.971266 0.006559 40.26641 0.000243 40.01958 0.005070 39.19563 0.003185 39.9659 �0.000456 39.898307 0.006322 40.37273 0.001516 39.99385 0.004991 39.16959 0.003069 40.3905 0.000414 39.863478 0.005552 40.51129 0.000860 39.99393 0.004883 39.23213 0.002649 40.4378 �0.000287 39.812729 0.005656 40.35854 0.001437 39.76041 0.005306 39.30676 0.002567 40.5623 0.000537 39.6703510 0.006666 40.26092 0.000679 39.94126 0.005008 39.15154 0.002520 40.0976 �0.000452 39.95245Mean value 0.006120 40.39362 0.000871 39.98098 0.005085 39.20765 0.002719 40.3199 0.000104 39.76767Standard

deviation0.000326 0.085663 0.001033 39.93968 0.000172 0.11994 0.0005733 0.1732 0.000350 0.131965

R. Liu et al. / Information Sciences 178 (2008) 2079–2090 2085

3.3. Triangular distribution

Suppose that Ks,t follows triangular distribution, and its probability density function is p(x), which satisfies (4)

pðxÞ ¼� p

2cosðpxÞ; 0:5 6 x < 1:5;

0; otherwise:

�ð4Þ

Page 8: Stereo effect of image converted from planar

2086 R. Liu et al. / Information Sciences 178 (2008) 2079–2090

Thus

a ¼ EðKs;tÞ ¼Z þ1

�1xpðxÞdx ¼

Z 1:5

0:5

x � � p2

� �cosðpxÞdx ¼ 1: ð5Þ

Eq. (5) indicates that the mean of Ks,t equals 1. As in Section 3.2, a set of random numbers which havetriangular distribution and satisfy the constraint is shown in the 3rd column of Table 2. Fig. 6b shows theimage created from this set of data. We repeated the experiment hundreds of times. Since the results are rel-atively stable, only data from 10 runs of experiments are given in Table 3, and the corresponding lines can befound in Fig. 5.

3.4. Piecewise uniform distribution

Suppose that Ks,t observes uniform distribution and 0.5 6 Ks,t < 1.5, and Qs,t’s maximum offset from initialposition that is caused by Ks,t satisfy the constraint of Panum’s Fusional Area.

Fig. 3 shows that the scene of the left image is offset from that of the right image slightly. So when we createlImg0 from rImg, we can divide rImg into two equal parts and deal with each part differently in order to reducethe difference between lImg and lImg0. The left part is stretched, while the right part is compressed. Corre-spondingly, the left part of KM�N has uniform distribution in [1.5 � b, 1.5], while the right part does in[0.5,0.5 + b], where b 2 (0,1]. We call this kind of distribution piecewise uniform distribution. For this distri-bution, we have

EðDqt;kÞ ¼ EðW � ½ðt � 1Þ � ðKs;1 þ Ks;2 þ � � � þ Ks;t�1Þ� þ kW ð1� Ks;tÞ=KÞ

¼W ðb� 1Þðt � 1þ k=KÞ=2; 1 < t 6 N=2;

W ð1� bÞðt � 1� N þ k=KÞ=2; t > N=2:

�ð6Þ

where k represents the designation number of a pixel in a sub-block, k 2 [0,K � 1]. Eq. (6) tells us that whent < N, E(Dqt,k) < 0; when t = N and k = K, E(DqN,K) = 0, which indicates that the expectations of the horizon-tal parallax of pixels in the last column are 0, and lImg0 contains the hole scene of rImg. Usually, lImg0 andrImg show a negative disparity.

A set of random numbers which have piecewise uniform distribution and satisfy the constraint is shown inthe 4th column in Table 2 (b = 0.82). The image created based on this set of random numbers is shown inFig. 6c. The corresponding I ½lImg0 ;lImg� and ERMS(lImg0, lImg) can be calculated according to Fig. 6c and theleft image in Fig. 3. After repeating the experiment hundreds of times, we obtained the data shown in Table3, and created lines in Fig. 5 according to them.

Assigning other values to b and repeating the experiment, we find that when b equals 0.82 the result is rel-atively better, but the procedure is more time-consuming.

3.5. Fitting the distribution of gray value

Another distribution used for conversion can be constructed through the following steps: First get the dis-tribution of the gray value of rImg by statistical method, and then obtain a function (named p(k)) as a result offitting the distribution of the gray value. The p(k) serves as the probability density function of random variableKs,t. Once we get random numbers whose probability density function is p(k), we’ll finally get the image lImg0.

Distribution of the gray value of rImg is shown in Fig. 7. After the normalization of the axes, we get Fig. 8in which X-axis is scaled in k/255 and Y-axis in nk/max(nk), where nk represents the numbers of pixels whosegray values are k, k 2 [0,1,2, . . . , 255].

We use linear polynomial to fit the discrete points in Fig. 8 by least square method, and getp(k) � � 0.737 � k + 0.7489 with 95% confidence. The curve of p(k) is shown in Fig. 8.

We expect that the size of image does not change much after conversion, on condition that E(Ks,t) equals 1,namely,

Z 1:5

0:5

kpðkÞdk ¼ 1: ð7Þ

Page 9: Stereo effect of image converted from planar

0 50 100 150 200 250 3000

0.002

0.004

0.006

0.008

0.010

0.012

x

y

Fig. 7. The distribution of the gray value of rImg is not regular. It depends on the image itself.

0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

x

y

y=-0.737*x+0.7489

Fig. 8. The normalized distribution of the gray value and the curve of p(k) are shown in the same figure for comparison. A linearpolynomial cannot fit the distribution perfectly, but without using it we cannot work out the only inverse function, which is required forproducing random numbers.

R. Liu et al. / Information Sciences 178 (2008) 2079–2090 2087

What’s more, as a probability density function p(k) should satisfy (8).

Z þ1

�1pðkÞdk ¼

Z 1:5

0:5

pðkÞdk ¼ 1: ð8Þ

In order to make p(k) satisfy (7) and (8) simultaneously, we must translate p(k) by a certain distance. Sup-pose that the curve of p(k) changes to f(k) = p(k � k0) + c0 after translation. Then f(k) must satisfy both

Z k0þ1

k0

f ðkÞdk ¼Z k0þ1

k0

½pðk � k0Þ þ c0�dk ¼ 1

Page 10: Stereo effect of image converted from planar

2088 R. Liu et al. / Information Sciences 178 (2008) 2079–2090

and

Z k0þ1

k0

kf ðkÞdk ¼Z k0þ1

k0

k½pðk � k0Þ þ c0�dk ¼ 1:

From the two functions above we get k0 = 0.5614 and c0 = 0.6196, hence

f ðkÞ ¼�0:737k þ 1:782; 0:5614 6 k 6 1:5614;

0; else:

�ð9Þ

The f(k) is the probability density function of Ks,t.Then we can get random numbers whose probability density function is f(k) by the following steps:

1. Calculate the distributing function of f(k):

F ðkÞ ¼Z k

�1f ðkÞdk ¼

Z k

0:5614

ð�0:737k þ 1:782Þdk ¼ �0:3685k2 þ 1:782k � 0:8844: ð10Þ

2. Calculate the inverse function of F(k):Let r = F(k), 0 < r < 1, we get the only inverse function as (11)described

k ¼ F �1ðrÞ ¼ 2:4183�ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi3:4481� 2:7137rp

r 2 ð0; 1Þ: ð11Þ

Using a computer program produce random numbers which have uniform distribution in [0, 1), and puttingthese numbers into (11), finally we’ll get random numbers whose probability density function is f(k).

Note that the random numbers produced by this method should also satisfy the constraint of Panum’s

Fusional Area.A set of random numbers which have a distribution created by fitting method is shown in the 5th column in

Table 2, and image created from this set of random numbers is shown in Fig. 6d.Just as we did in Section 3.2, we repeated the experiment hundreds of times using this kind of curve fitting

method, recorded the data in Table 3, and drew lines for comparison in Fig. 5.

3.6. Normal distribution

Suppose that Ks,t observes normal distribution with a mean value of 1, i.e. a = 1. To make comparison eas-ier, we let D(Ks,t) = r2 = 1/ 36 (r > 0), thus P{a � 3r 6 Ks,t < a + 3r} = P{0.5 6 Ks,t < 1.5} = 0.9974, i.e.most values of Ks,t are within the range [0.5,1.5]. A random number is checked whether it is within[0.5,1.5] immediately after it is produced. As in Section 3.2, we repeated experiments many times, recordedthe data in Table 3, and draw line for comparison, which is also presented in Fig. 5. A set of random numbersthat have normal distribution is shown in the 6th column in Table 2, and the image created based on this set ofrandom numbers is shown in Fig. 6e.

3.7. Conclusions

From the 6 different cases described above we find that

� If pixels are moved without stretching, I ½lImg0 ;lImg� and ERMS(lImg0, lImg) are both small and the stereo effect arerelatively better when d satisfies ‘‘3 6 d 6 5”. In comparison with other distributions, however, we find thatthe values of I ½lImg0;lImg� and ERMS(lImg0, lImg) are smaller, while the stereo effect of images is not significantlyenhanced by using this method because of the loss of information about the scene caused by this method.� From Fig. 5 we know that normal distribution and piecewise uniform distribution perform well on cross-

entropy and ERMS. And, when normal distribution is applied, the corresponding cross-entropy is smaller,while ERMS is slightly lager, than that given by piecewise uniform distribution. Observation shows that, thestereo effect of normal distribution is similar to that of piecewise uniform distribution; both are slightly

Page 11: Stereo effect of image converted from planar

R. Liu et al. / Information Sciences 178 (2008) 2079–2090 2089

better than other distributions, and normal distribution is more stable than piecewise uniform distributionin experiments on other images. This is probably due to the fact that normal distribution is the most com-monly encountered one in nature.� Theoretically, the optimal values of I ½lImg0;lImg� and ERMS(lImg0, lImg) are both 0, which is the case with

lImg0 that is almost identical with lImg. But from Table 3 and Fig. 5 we can see that I ½lImg0 ;lImg� andERMS(lImg0, lImg) do not tend to approach 0 when random variables take a different value for each runof experiment, no matter what kind of distributions the random variables follow. Instead these two criteriabecome stable around their mean value. Repeating the experiment for several more runs, we can find thatI ½lImg0;lImg� and ERMS(lImg0, lImg) themselves are random variables, and each is independent of the other.The results above indicates that: when random variables observe the same distribution in each run of exper-iment, different values of the random variables hardly affect the stereo effect; when different distributionsare applied to the random variables, the cross-entropies or root-mean-square errors are slightly different,which indicates that different distributions have a small influence on the stereo effect. Generally, randomvariables with a normal distribution tend to create a better stereo effect on most occasions. Observationresults confirm the conclusion.

Note that we have drawn the conclusions above only in statistical terms, because the criteria describedabove are used to measure the difference between the image created and the image taken with a stereo camera,which implies only an indirect relation to the improved stereo effect. Some patterns may emerge only after alarge number of experiment runs have been performed. It is meaningless to draw conclusions from a particularresult. From experiments that depend on real human eye observations we do find that, the smaller the absolutevalues of these criteria are, the better the stereo quality is. Hence the conclusions above.

In contrast with other methods, our method is simple and the stereoscopic perception is distinct. Whenusing this method, however, we cannot improve smoothness without sacrificing stereoscopic perception. Thislimits its application scope. Usually, this method is more suitable for block prints or pictures with numerousand complicated shapes.

4. Discussion

As the cross-entropy only represents the difference between two images as a whole, using the cross-entropyto evaluate the conversion separately may give misleading results. So both cross-entropy and root-mean-square error are needed to control the conversion. Generally, when they are both small, the stereoscopic per-ception is strong. We should manage to reduce both of them as far as possible. The other questions are: Arethere any other criteria which are more suitable for the evaluation? What would the experiment results be likewhen using these criteria? Further research is needed to answer these questions.

In Section 3 we discuss how the value of random variables influences the stereo effect, and present an algo-rithm – ProduceKmn. The algorithm is unstable, as it needs to check the random variable whether it satisfiesthe constraint when it is produced. Time complexity of the algorithm is O(M � N) even in the best cases. Thetime complexity increases sharply as the range of Dqt,k reduces, and in some cases, the program cannot be ter-minated. We are currently searching for a practical solution.

In this paper we construct six distributions to produce random matrix. From experiments we know thatnormal distribution works well in most cases. However, what is the cause and effect? Are there any better dis-tributions than normal distribution? Further research is needed to resolve these problems.

Acknowledgement

This work is supported by Chongqing University Postgraduates’ Science and Innovation Fund under GrantNo. 200701Y1A0080194, National Natural Science Foundation of China under Grant No. 60773082/F0205and Natural Science Foundation Project of CQ under Grant No. CSTC2006BB2229. The authors would liketo thank the staff of the Physics Laboratory of Chongqing University. They provided laboratory apparatus forthe experiment, and helped design the experiments. The authors also thank the volunteers who participated inthe experiment.

Page 12: Stereo effect of image converted from planar

2090 R. Liu et al. / Information Sciences 178 (2008) 2079–2090

References

[1] Al-Zahrani, S.S. Ipson, J.G.B. Haigh, Applications of a direct algorithm for the rectification of uncalibrated images, InformationSciences 160 (1–4) (2004) 53–71.

[2] Di Nola, C. Russo, Lukasiewicz transform and its application to compression and reconstruction of digital images, InformationSciences 177 (6) (2007) 1481–1498.

[3] Ashok Samal, James R. Brandle, Dongsheng Zhang, Texture as the basis for individual tree identification, Information Sciences 176(2006) 565–576.

[4] Ashutosh Saxena, Jamie Schulte, Y.Ng. Andrew, Depth estimation using monocular and stereo cues, in: Proceedings of the TwentiethInternational Joint Conference on Artificial Intelligence, 2007.

[5] Ashutosh Saxena, Sung Chung, Y.Ng. Andrew, Learning depth from single monocular images, in: NIPS 18, 2006.[6] Chang Ok Yun, Sang Heon Han, Tae Soo Yun, Dong Hoon Lee, Development of stereoscopic image editing tool using image-based

modeling, in: Proceedings of the 2006 International Conference on Computer Graphics and Virtual Reality, 2006.[7] Chunping Hou, Azimov Nurlan, Sile Yu, Mathematical models of stereoscopic imagery system and methods of controlling stereo

parallax, Journal of Tianjin University 38 (5) (2005) 455–460.[8] Chunping Hou, Sile Yu, A novel method of picture conversion from 2D to 3D, Acta Electronica Sinica 30 (12) (2002) 1861–1864.[9] Frank L. Kooi, Alexander Toet, Visual comfort of binocular and 3D displays, Displays 25 (2004) 99–108.

[10] Fuhua Lin, Lan Ye, Vincent G. Duffy, Chuan-Jun Su, Developing virtual environments for industrial training, Information Sciences140 (1–2) (2002) 153–170.

[11] G.A. Papakostas, Y.S. Boutalis, D.A. Karras, B.G. Mertzios, A new class of Zernike moments for computer vision applications,Information Sciences 177 (13) (2007) 2802–2819.

[12] Hajime Nobuhara, Barnabas Bede, Kaoru Hirota, On various eigen fuzzy sets and their application to image reconstruction,Information Sciences 176 (20) (2006) 2988–3010.

[13] Kingkarn Sookhanaphibarn, Chidchanok Lursinsap, A new feature extractor invariant to intensity, rotation, and scaling of colorimages, Information Sciences 176 (2097) (2006) 2097–2119.

[14] M.T. Stickland, S. McKay, T.J. Scanlon, The development of a three dimensional imaging system and its application in computeraided design workstations, Mechatronics 13 (5) (2003) 521–532.

[15] P. Mordohai, G. Medioni, Stereo using monocular cues within the tensor voting framework, IEEE Transactions on Pattern Analysisand Machine Intelligence 28 (6) (2006) 968–982.

[16] NVIDIA Corporation, NVIDIA 3D Stereo User’s Guide, 2001.[17] Qingsheng Zhu, Ran Liu, and Xiaoyan Xu, Properties of a binocular stereo vision model, in: Proceedings of the 11th Joint

International Computer Conference, 2005, pp. 831–834.[18] William R. Sherman, Alan B. Craig, Understanding virtual reality: interface, application, and design, Morgan Kaufmann Publishers,

San Francisco, CA, 2004.