Dynamic random dot stereograms (DRDSs) and correlograms (DRDCs) are cyclopean stimuli containing binocular depth cues that are ideally, invisible by one eye alone. Thus, they are important tools in assessing stereoscopic function in experimental or ophthalmological diagnostic settings. However, widely used filter-based three-dimensional display technologies often cannot guarantee complete separation of the images intended for the two eyes. Without proper calibration, this may result in unwanted monocular cues in DRDSs and DRDCs, which may bias scientific or diagnostic results. Here, we use a simple mathematical model describing the relationship of digital video values and average luminance and dot contrast in the two eyes. We present an optimization algorithm that provides the set of digital video values that achieve minimal crosstalk at user-defined average luminance and dot contrast for both eyes based on photometric characteristics of a given display. We demonstrated in a psychophysical experiment with color normal participants that this solution is optimal because monocular cues were not detectable at either the calculated or the experimentally measured optima. We also explored the error by which a range of luminance and contrast combinations can be implemented. Although we used a specific monitor and red-green glasses as an example, our method can be easily applied for other filter based three-dimensional systems. This approach is useful for designing psychophysical experiments using cyclopean stimuli for a specific display.

*r*,

*g*) with the two color filters (

*ρ*,

*γ*). The functions will be referred to as

*p*

_{rρ}(Red Attenuation),

*p*

_{rγ}(Red Crosstalk),

*p*

_{gγ}(Green Attenuation), and

*p*

_{gρ}(Green Crosstalk).

*L*=

*ax*

^{γ}+

*b*, where

*L*is luminance,

*x*is the digital video value of any of the RGB phosphors and

*a*,

*b*and

*γ*are free parameters. Here, we chose to fit a third-order polynomial

*L*=

*ax*

^{3}+

*bx*

^{2}+

*cx*+

*d*instead (with free parameters

*a*,

*b*,

*c*,

*d*) to approximate the measured lookup tables. Model parameters were estimated using the fit function from the Curve Fitting Toolbox in Matlab (The MathWorks, Natick, MA). In preliminary calculations for various computer monitors, both models resulted in similarly good fits (Figure 3) but an analytical solution (see Results) was only practicable when using the third-order polynomial approximation.

^{2}and the required Michelson contrast of dark and bright dots was 50%. This parameter combination was within the region where the calculated luminance and contrast errors for the specific monitor were negligible (Table 1, Figure 6).

*n*th increment had a luminance 1.04

*times the optimized value while the*

^{n}*n*th decrement had a luminance 0.96

*times the optimized value. One such series was generated for each of the four anaglyph colors resulting in 40 different stimuli.*

^{n}*y*) were first inverted then fitted by a Gaussian curve (with an additional y-shift) of the following form using the fit function in Matlab:

*x*is the R or G value that was varied,

*µ*is the center,

*σ*is the spread. Parameters

*a*and

*b*were also varied during the fit. The center (

*µ*) was taken as the empirical optimum digital video value.

*L*) and the contrast (

_{0}*C*) of these types of regions be equal in both eyes (right-hand side of Figure 5).

_{0}*r*,

*g*, respectively) in combination with red and green colored filters (

*ρ*,

*γ*, respectively). The light emitted by the red phosphor mainly can pass through the red filter and light emitted by the green phosphor mainly can pass through the green filter. When viewed without the filter goggles, the display will thus consist of dots with one of four colors, which we term here as

*logical colors*red, green, black and yellow (denoted R, G, B, Y, respectively, Figure 4). However, if the logical colors would naively, be composed purely of the red and green primary lights driven at full intensity, their mean luminances and contrasts would not be equal as required. This is because of (1) unequal luminance of the phosphors, (2) unequal light attenuation and (3) crosstalk between the filters. These problems can be compensated by adjusting the red and green phosphor components of the logical colors but the effects of these adjustments on the mean luminance and contrast of the display must be regarded together.

*L*,

_{0}*C*, respectively) for all regions of the display.

_{0}*r*) and green (

*g*) phosphors resulting in the four logical colors: red (R), green (G), black (B), and yellow (Y) as follows:

*r*: digital video value of red component of logical red color_{R}*g*: digital video value of green component of logical red color_{R}*r*: digital video value of red component of logical green color_{G}*g*: digital video value of green component of logical green color_{G}*r*: digital video value of red component of logical black color_{B}*g*: digital video value of green component of logical black color_{B}*r*: digital video value of red component of logical yellow color_{Y}*g*: digital video value of green component of logical yellow color._{Y}

*p*

_{rρ}(Red Attenuation),

*p*

_{rγ}(Red Crosstalk),

*p*

_{gγ}(Green Attenuation), and

*p*

_{gρ}(Green Crosstalk). The whole set of luminance values calculated from the measured luminance characteristics is defined as follows

*L*) for example is the sum of luminances passed from the red and green phosphors, where the second term accounts for the crosstalk:

_{R}_{ρ}*RG*and

*YB*stand for these regions of the stimulus, respectively. Their average luminances can be calculated from Equations 2 and 3 as

*C*) of dark and bright dots in each of the regions of the stimulus:

*L*

_{0}) and all contrasts (Equation 5) be equal to the required contrast (

*C*

_{0}). For the anticorrelated set of pixels, we can therefore write the following system of equations:

*r*,

_{R}*g*,

_{R}*g*,

_{G}*r*when

_{G}*L*

_{0},

*C*

_{0}and the coefficients of the third-order polynomials are known. We solved the equation system consisting of Equations 1–6 using Mathematica (Wolfram Research, Champaign, IL). Substituting the known parameters into this expression results in the digital video values satisfyingEquation 6 with theoretically, zero error. The precision of the result will nevertheless, depend on two factors; (1) how exactly the third-order polynomials approximate the luminance characteristics and (2) rounding of the real-valued parameters to the integer digital video values (see below).

_{RG}for the anticorrelated pixels and an error function E

_{YB}for the correlated pixels, which can be written as the Euclidean norms of deviations of average luminance and contrast from their required values:

*e*and

_{L}*e*are fractional luminance and contrast errors for the anticorrelated and correlated pixels as seen through each filter, respectively as follows

_{C}*E*, the free parameters of the optimization are the digital video values [

_{RG}*r*,

_{R}*g*,

_{R}*g*,

_{G}*r*]. Similarly, the free parameters [

_{G}*r*,

_{B}*g*,

_{B}*r*,

_{Y}*g*] are optimized when minimizing E

_{Y}_{YB}.

^{−6}and 10

^{−10}, respectively). All free parameters (i.e., digital video values) were constrained to the interval [0; 255]. Their starting values were chosen by assuming no crosstalk between the filters. The required digital video values can in this case, easily be obtained from the luminance characteristics for filter attenuation. An implementation of the numerical solution is provided as Matlab source code along with example data on GitHub (https://github.com/JanosRado/StereoMonitorCalibration).

*r*) and green (

*g*) components of the four logical colors (

*R*,

*G*,

*Y*,

*B*) by {

*L*,

_{Rr}*L*,

_{Rg}*L*

_{Gr},

*L*,

_{Gg}*L*,

_{Yr}*L*,

_{Yg}*L*,

_{Br}*L*}. These can be calculated from the following equation system

_{Bg}*S*

_{ρ},

*S*

_{γ},

*S*and

_{r}*S*are defined below. To provide the necessary degrees of freedom however, 3 additional equations have to specify the required mean luminance

_{g}*L*

_{0}, the required luminance contrast

*C*

_{0}and the equality of luminances in the left and right eyes, respectively.

*T*parameters can be interpreted as transmittances; for example,

*T*

_{ρg}represents

*L*

_{ρg}/

*L*, the fraction of light from the green phosphor transmitted by the red filter. However, if channel constancy of a monitor fails as it is sometimes the case (Supplementary Figure S2), the measured filter selectivity indexes will depend on the intensity of the phosphors instead of being constants. Therefore, to evaluate the channel constancy model for our display device, we used the median values of the

_{g}*T*transmittances measured for the entire range of digital video values.

*L*,

_{Rr}*L*,

_{Rg}*L*

_{Gr},

*L*,

_{Gg}*L*,

_{Yr}*L*,

_{Yg}*L*,

_{Br}*L*} can be calculated for a given set of

_{Bg}*T*parameters, desired luminance and contrast. Finally, the actual, device specific digital video values of the logical colors can be looked up from the measured luminance characteristics of the

*r*and

*g*phosphors; for example,

*g*will be the x-value on the luminance curve for the green phosphor at the luminance

_{R}*L*, and so on. Note that for this procedure, the luminance curves have to be measured without filters because the filter transmittances have already accounted for by the

_{Rg}*T*parameters.

^{8}rounding patterns, each of them having different effect on the overall error. In order to minimize the effect of rounding, we adaptively chose the rounding pattern from these 256 cases that resulted in the smallest overall error calculated as ||(E

_{RG},E

_{YB})|| fromEquations 8 and 9. The benefit of this method of rounding is most significant when low luminance and contrast are required at the same time (data not shown).

_{L}) and contrast (E

_{C}) separately as follows (using notation introduced above):

^{4}= 16-fold (1.2 log units, Table 2).

*C*

_{RGρ}≠

*C*

_{YBρ}and/or

*C*

_{RGγ}≠

*C*

_{YBγ}) causing monocular artefacts. The strengths of these sources of monocular cues can be summarized in the following metric:

*M*may be interpreted as contrast between the correlated and anticorrelated regions of the test image, and thus, it is expected to correlate with the likelihood of detectable monocular cues. The calibrated anaglyph colors obtained using the symbolic solution and the numerical approximation both resulted in M = 1.04% ± 0.59% as compared with M = 5.91% ± 0.77% for the channel constancy model (Figure 7, Table 3).

*monocularly*visible to an increasing degree depending on the deviation to any direction from the predicted optimum. The reason for this is that either the contrast between bright and dark dots or the average luminance within the correlated and anticorrelated areas become unequal causing the background and target regions appear visually different (Figure 2). Thus, if our prediction was correct, monocular detectability would show a minimum for the predicted set of RGB values within a reasonable error.

*c*or more correct responses out of

*r*trials by chance is given by

*n*is the number of alternative choices (i.e., n = 4 orientations). This is the distribution function of a binomial random variable (p. 145 in Ross, 2014) with parameter (n − 1)/n. Further explanation of the formula can be found in a previous paper (Budai et al., 2018). We chose to accept a participant's performance as significantly different from chance level if

*p*was less than 0.05, which was given at

*c*≥ 6 correct responses (

*p*= 0.01973). This limit is shown by the gray horizontal line in Figure 8. Clearly, none of the 16 participants could perform above chance if the anaglyph colors were at the predicted optimum but the monocular cues became increasingly visible as either the red or the green component of the anaglyph colors were shifted away from that point (Figures 8, 9). If the responses of all 16 participants are accumulated, the limit of chance level performance drops to 51/160 ≈ 32% correct responses (red horizontal line in Figure 8). As shown by the asterisks, a few RGB units of deviation from the predicted optimum increases the detection of monocular cues above chance level.

*µ*) of a participant was taken as the optimum R or G value for the respective anaglyph color. Figure 10 shows that the individual empirical optima (blue tick marks) were indeed often different from the prediction by several RGB units. The medians of the optima were nevertheless within 1.25 RGB units for all anaglyphic color and filter combinations (Figure 11).

*L*

_{0}) only if the ratio of bright and dark dots is 1:1. This assumption is built in Equation 4. If the ratio of bright dots in the entire display is

*n*, the final space averaged luminance can be calculated

*post hoc*as \(\bar L = n{L_{bright}} + ( {1 - n} ){L_{dark}}\), where

*L*=

_{bright}*L*

_{0}(1 +

*C*

_{0}) and

*L*=

_{dark}*L*

_{0}(1 −

*C*

_{0}).

^{2}= 4 logical colors. Where more than two states of pixels are needed, the algorithm must be run multiple times for different combinations of mean luminance and contrast. For instance, if pixels can have three states (e.g., dark, background and bright) and they can be varied independently in the two eyes, we would require 3

^{2}logical colors. To generate the nine logical colors, the algorithm must be run three times, each time for a combination of two different states. In the 12 resulting logical colors, those where the left and right images are in identical state (e.g., dark in both eyes) will be obtained twice.

*Journal of Vision,*16, 14. [CrossRef]

*Journal of the Society for Information Display,*17, 467–471. [CrossRef]

*Encyclopedia of Imaging Science and Technology*(pp. 172–188): Wiley.

*Graefe's Archive for Clinical and Experimental Ophthalmology,*257, 413–423. [CrossRef]

*Ghosting reduction method for color anaglyphs*. Paper presented at the Electronic Imaging.

*European Archives of Psychiatry and Clinical Neuroscience,*241, 115–118. [CrossRef]

*Investigative Ophthalmology & Visual Science,*32, 310–318.

*Perception,*17, 483–495. [CrossRef]

*Bell System Technical Journal,*39, 1125–1162. [CrossRef]

*Proceedings of the National Academy of Sciences of the United States of America,*77, 2348–2351. [CrossRef]

*Bell System Technical Journal,*41, 663–676. [CrossRef]

*What's new in Psychtoolbox-3?*Paper presented at the Thirtieth European Conference on Visual Perception, Arezzo.

*IEEE Transactions on Image Processing,*9, 897–908. [CrossRef]

*Investigative Ophthalmology & Visual Science,*33, 2423–2428.

*Journal of Vision,*9, 8 1–10. [CrossRef]

*Perception,*41, 648–660. [CrossRef]

*Perception,*15, 27–36. [CrossRef]

*Spatial Vision,*10, 437–442. [CrossRef]

*Naturwissenschaften,*10, 751–761. [CrossRef]

*Scientific Reports,*7, 5587. [CrossRef]

*A first course in probability*(9 ed.). Boston, MA: Pearson.

*Displays,*26, 177–183. [CrossRef]

*Vision Research,*40, 2881–2884. [CrossRef]

*IEEE Transactions on Broadcasting,*57, 445–453. [CrossRef]

*Journal of Electronic Imaging,*21, 1–8, 8. [CrossRef]

*Human vision, visual processing, and digital display III*, 1666, 351–364. Paper presented at the SPIE - The International Society for Optical Engineering.

*Philosophical Transactions of the Royal Society of London,*128, 371–394. [CrossRef]

*Determinants of perceived image quality: ghosting vs. brightness*. Paper presented at the Electronic Imaging 2003.

*Journal of Electronic Imaging,*21, 1–22, 22. [CrossRef]