{'fraction_non_alphanumeric': 0.03333072835261019, 'fraction_numerical': 0.021256642700844014, 'mean_word_length': 4.9950808151791986, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Information gains from commercial spectral filters in anomalous trichromacy

: Red-green color discrimination is compromised in anomalous trichromacy, the most common inherited color vision deficiency. This computational analysis tested whether three commercial optical filters with medium-to-long-wavelength stop bands increased information about colored surfaces. The surfaces were sampled from 50 hyperspectral images of outdoor scenes. At best, potential gains in the effective number of surfaces discriminable solely by color reached 9% in protanomaly and 15% in deuteranomaly, much less than with normal trichromacy. Gains were still less with lower scene illumination and more severe color vision deficiency. Stop-band filters may offer little improvement in objective real-world color discrimination.


Introduction
Normal human color vision depends on the presence of three different light-sensitive pigments in retinal cone photoreceptor cells [1]. These pigments, referred to as long-, medium-, and short-wavelength-sensitive (L, M, and S), or just red, green, and blue, are characterized by their wavelengths λ max of peak sensitivity. For L and M pigments, λ max varies somewhat across individuals. The longest-wavelength L pigment has a λ max of about 559 nm, the shortestwavelength M pigment about 530 nm, and the S pigment about 426 nm [2][3][4]. The gap of almost 30 nm between the peaks of the L and M pigments underpins normal trichromatic vision.
Of the various inherited color vision deficiencies [5,6], anomalous trichromacy is the most common, with a prevalence of about 6% in European males [7]. In protanomalous trichromacy, the normal L pigment is replaced by a hybrid M pigment with λ max not more than about 536 nm, and in deuteranomalous trichromacy, the normal M pigment is replaced by a hybrid L pigment with λ max not less than about 549 nm. The exact values depend on which of several hybrid pigments is expressed [4,8,9]. The S pigment lacks this variability [4].
Since red-green color discrimination depends on differences between signals from L and M cones, the reduced spectral spacing of at most 6 nm in protanomaly and 10 nm in deuteranomaly means that discrimination is impaired with some stimuli [10]. The degree of impairment is related not only to genotype but also to pigment optical density [11].
It has long been thought that wearing optical filters with a notch or stop band in the mediumto-long-wavelength region of the spectrum would help differentiate signals from normal and hybrid cone pigments and so improve color discrimination performance. Overall, evidence for their efficacy has been disappointing [12][13][14][15][16], though theoretical modeling [17] and long-term adaptation experiments with a stop-band filter [18] have pointed to increases in perceived gamut and contrast. Even so, it is important to distinguish between the perceptual benefits of these filters and objective discriminatory performance.
The aim of this work was to test computationally whether stop-band filters increase the information available about colored surfaces in a scene. Information is construed here in the sense of Shannon's mutual information, usually measured in bits [19]. It has the advantage of dealing with cone signal dependencies that are more general than linear ones and of providing a measure that does not require a specific model of discriminatory performance [14,16] or dependence on a specific perceptual color space as, e.g., proposed for dichromacy [20]. It also offers a theoretically best possible limit, i.e., a least upper bound, on achievable performance gains [19,21].
As explained later, mutual information can be interpreted in the present context in terms of the effective number of surfaces in a scene that can be discriminated from each other solely by their color. These surfaces can refer to arbitrarily small surface elements in the scene or to extended areas, since the analysis is indifferent to what physically defines surfaces and objects [22]. It was assumed that illumination remained constant [23] and that cone signal processing was limited by phototransduction noise [24,25].
Three commercial stop-band filters were tested, one from Vino Optics (https://www.vino.vi/) and two from EnChroma (https://enchroma.com/). Estimates were made of the information available to an individual with anomalous trichromacy viewing outdoor scenes with and without one of the filters. The scenes were represented by 50 hyperspectral radiance images characteristic of everyday outdoor environments. For protanomaly and deuteranomaly, the λ max of a hypothetical hybrid pigment was varied systematically through the observed range [4], and then beyond, up to the λ max of the normal pigment it replaced.
Outdoor scenes were chosen because their statistics are relevant to natural vision [26]. To provide a reference level for performance with these scenes, information estimates were also made with the approximately uniform color palettes of matt Munsell chips [27] and Natural Colour System (NCS) standard color references [28].
Reliable gains in information with the stop-band filters were found to be small. In the best conditions tested, the potential increase in the effective number of discriminable surfaces was 9% in protanomaly and 15% in deuteranomaly, much less than with normal trichromacy.

Filters
The spectral filters tested were the Oxy-Iso Color Blindness Clip-on 1.5 mm Lens Blanks from Vino Optics ("Vino" for short) and two filters from EnChroma Color Blind Glasses, Receptor 64-14-150 BLK 02 ("EnChroma R") and Explorer MTSLV 03 ("EnChroma E"). The Vino filters were made available in 2019 and the EnChroma filters in 2015. The spectral transmittance of each filter was measured with a Shimadzu UV-3600i Plus UV-VIS-NIR spectrophotometer (Shimadzu Scientific Instruments, Inc.) in the spectral range 400-720 nm with a spectral resolution of 0.1 nm. Measurements were carried out with 0/0 geometry. Variations of transmittance with measuring position across the lenses were negligible. Figure 1 shows the recorded spectral transmittances normalized to unity.

Scenes
Scene data were taken from a set of 50 hyperspectral images of outdoor scenes drawn from the main land-cover classes, similar to those used previously [29]. Figure 2 shows rendered sRGB color images of the scenes [30].
Details of the hyperspectral image acquisition and calibration are described in [32]. Each image had dimensions approximately 1344 × 1024 pixels, corresponding to a camera angle of approximately 6.9°× 5.3°, and spectral range 400-720 nm sampled at 10-nm intervals. The images were processed as effective spectral reflectance images [32]. A radiance image was generated by taking the product of the reflectance image and a daylight illuminant spectrum with correlated color temperature 6500 K [33] representing average daylight, assumed to be constant throughout, cf. [23]. As in [31], reflectance images were downsampled by spatial averaging  over 4 × 4 pixels to reduce non-imaging noise in the unaveraged source data and pixel-pixel correlations with the 1.3-pixel line-spread function of the hyperspectral camera. To further reduce noise, images were smoothed spectrally by averaging over adjacent wavelengths. The array size of each processed image was approximately 336 × 256 × 33. For each scene, 10 4 points were sampled randomly from the processed image, so that each point refers to a unique 4 × 4-pixel average. Spectral reflectances of the reference NCS set were recorded in-house with a Konica Minolta CM-2600d spectrophotometer. Spectral reflectances of the matt Munsell set were taken from measurements by Parkkinen et al. [34]. Radiant spectra were again generated by taking the product of each reflectance spectrum and a daylight illuminant spectrum with correlated color temperature 6500 K. The illumination level was the same as with the outdoor scenes. The full NCS and Munsell sets were used since each contains less than 10 4 surfaces.

Cone sensitivities and spectral shifts
At each point in the scene, the radiance spectrum was converted into estimated L, M, and S cone excitations, based on the Stockman and Sharpe 2°cone pigment spectral sensitivities, lens, and macular pigment data [3,35]. Details are given in [32]. Hybrid cone excitations were estimated similarly. Thus spectrally shifted absorption spectra were derived from a quadratic loess fit [36,37] to the normal L, M, and S absorption spectra on a radiance-versus-log-wavelength scale, with optimal loess bandwidth determined by cross-validation [38].
The observed variation in the λ max of hybrid pigments is discrete [8]. For the analysis, however, it was replaced by a hypothetical hybrid pigment whose λ max varied continuously. For protanomaly it ranged from 530 nm to the observed maximum of 536 nm [4] and then up to 559 nm, and for deuteranomaly from 559 nm to the observed minimum of 549 [4] and then down to 530 nm. Optical density was kept constant [39,40].

Cone noise
Because of its importance, cone noise was modeled in several ways. The relationship of its amplitude to the background or reference level can be described by a Weber-like function over a wide range of light levels [41], though what constitutes the reference level depends on local scene properties, which may be difficult to specify [42]. It was modeled initially as a Gaussian process whose standard deviation (SD) at each point was specified relative to the cone excitation either locally at that point or globally by the average over the scene, producing different degrees of Weber-like behavior. For comparison with these local and global Gaussian processes, cone noise was also modeled as a discrete Poisson process. Since the Poisson SD, σ say, coincides with the square root of the mean µ, it cannot produce Weber-like behavior [41]. For computational Color images of the 50 scenes used in the study. Each image is rendered as an sRGB image [30] from a hyperspectral reflectance image with a daylight illuminant of correlated color temperature 6500 K. Adapted from [31]. purposes, therefore, the value of µ at each point was defined by uniformly scaling L, M, and S cone excitations so that the median over the scene of the quotients σ/µ = µ −1/2 coincided with the specified relative SD.
Variation of the relative SD across L, M, and S cone was guided by Stiles' psychophysical increment threshold measurements [43], which delivered Weber fractions of 1.8%, 1.9%, and 8.7%, respectively [44], with the larger value for S cones reflecting their functional differences [45]. For brevity, representative values of the relative SD are given just for L cones, with values for M and S cones scaled up appropriately (although the scaling for M cones is negligible). For example, a representative relative SD of 2% was implemented as 2.0%, 2.1%, and 9.7% for L, M, and S cones, respectively.
Observers were not assumed to be necessarily adapted to the filters, which attenuate L and M cone signals to about one third. Because of uncertainties about the amplitude of cone noise, a range of relative SDs of 1%, 2%, 5%, and 10% were tested. Relative SDs below 1% were excluded for reasons set out later.

Mutual information
Under the assumption that points were drawn randomly from each scene, the spectral radiance at each point, with and without spectral filters, was treated as a random variable, X say. Similarly, the corresponding L, M, and S cone excitations, including cone noise, were treated as another random variable, Y say. Further detail is available in [22,32]. The amount of information that Y provides about X is given [19] by the mutual information, I (X; Y). It was estimated numerically with an offset version [46] of the Kozachenko-Leonenko kth-nearest-neighbor estimator [47,48] that gives improved convergence. As in [32], it is emphasized that estimates of I (X; Y) refer to the underlying continuous spectral radiance distributions, not the discrete hyperspectral samples taken from them.
The analysis exploited the following information-theoretic property. The inverse logarithm of the mutual information I (X; Y) gives the approximate number of surfaces or parts of surfaces in a scene that can be discriminated by their color, allowing for their different abundances or relative frequencies [22,49], in other words, the effective number of discriminable surfaces [19,50].
The mutual information estimates between steady spectral radiances and cone excitations obtained here should be distinguished from those between successive cone excitations in response to fluctuating illumination [23].

Information from outdoor scenes
Results are presented first for local Gaussian cone noise with a minimum representative relative SD of 2%. As shown later, mean filter effects were broadly similar with global Gaussian noise, and, after excluding surfaces with low reflectance, also with Poisson noise. Figure 3 shows estimates of mutual information averaged over the 50 scenes plotted against the wavelength of maximum sensitivity λ max of a hypothetical hybrid pigment undergoing continuous spectral shifts in protanomaly (left panel) and deuteranomaly (right panel). Data are shown with and without the three filters. Since mutual information is measured in bits, a change from, say, 4.8 to 5.8 bits constitutes a factor of 2 on a linear scale. The light-gray regions indicate the observed ranges of λ max in protanomaly, i.e. 530 nm to 536 nm, and in deuteranomaly, i.e. 549 nm to 559 nm [4]. The mid-gray regions indicate variations in λ max that extend beyond the observed ranges.
Within the observed λ max ranges, there are evident increases in estimated mutual information with the EnChroma R and E filters, but not with the Vino filter. Beyond the observed ranges, there are increases with all three filters. In the limit, where λ max reaches 559 nm in protanomaly and 530 nm in deuteranomaly, there are also increases for normal trichromats, which set a Information about colored surfaces available to an observer with anomalous trichromacy viewing outdoor scenes with and without a stop-band filter. Estimates of mutual information [19] averaged over 50 hyperspectral images are plotted against the wavelength of peak sensitivity λ max of a spectrally shifted hypothetical hybrid pigment, with light-gray regions indicating the observed ranges of λ max [4]. In protanomaly, the normal L pigment is replaced by a hybrid M pigment with a λ max of not more than about 536 nm; in deuteranomaly, the normal M pigment is replaced by a hybrid L pigment with a λ max of not less than about 549 nm [2,4,8]. The mid-gray regions indicate variations in λ max that extend beyond the observed ranges. Data are for local Gaussian cone noise with minimum representative relative SD 2%.
ceiling on what improvements are available to observers with reduced spectral spacing between medium-to-long-wavelength pigments.
Numerically, the estimated gains in mutual information with the EnChroma R and E filters were, respectively, 0.14 bits and 0.12 bits in protanomaly and 0.20 bits and 0.18 bits in deuteranomaly, each with the maximum observed spectral shift of the hybrid pigment. For comparison, the estimated gain in trichromacy over protanomaly was 0.49 bits and over deuteranomaly 0.34 bits.
Are these gains statistically reliable? Most of the variance in mutual information estimates at each λ max comes from the different compositions of the outdoor scenes rather than from differences in the filters. Each filter's effect is revealed more clearly by taking the difference in estimates with and without the filter for each scene and then averaging over scenes. The inverse logarithm of the average gives the estimated gain in the effective number of discriminable surfaces (Section 2.5). Since this number may give a better intuition of the effect of the filters, subsequent data are given as inverse logarithms. In what follows, the hybrid pigment λ max was assumed again to be 536 nm in protanomaly and 549 nm in deuteranomaly. Table 1, first three data columns, shows average estimated gains in the effective number of discriminable surfaces with 95% confidence limits in parentheses. These limits reflect both variations in cone excitations over scenes and the representative level of cone noise. Gains greater than unity signify better performance, less than unity worse performance. Table 1, fourth data column, shows the average gains with normal trichromatic pigments in place of the corresponding hybrid pigment with no filter. These gains quantify the advantage of normal trichromacy over anomalous trichromacy. a Entries in the first three data columns are the proportional increases in the effective number of discriminable surfaces viewed with and without stop-band filters Vino, EnChroma R, EnChroma E. The normal and hybrid cone pigments were assumed to have λ max of 530 and 536 nm in protanomaly and λ max of 559 and 549 nm in deuteranomaly [4]. Entries in the fourth data column are the proportional increases with normal L and M pigments in place of the hybrid pigments, i.e, with λ max 530 and 559 nm. Gains greater than unity signify improved discrimination. Estimated 95% confidence limits in parentheses are based on Efron's BCa bootstrap method with 1000 bootstrap replications [51]. The relative standard deviation of Gaussian noise of 2% was defined with respect to the cone excitation at each image point. All entries rounded to 2 decimal digits.
There were no reliable gains with the Vino filter, but there were potentially reliable gains with the EnChroma R and E filters: in protanomaly 9% and 8%, respectively, and in deuteranomaly 15% and 13%, respectively, which fell to 8% and 7%, respectively, with closer hybrid and normal pigment λ max (not shown). For comparison, normal trichromacy provided reliable gains of 42% over protanomaly and 27% over deuteranomaly.
These estimated gains do, however, depend on the amplitude of representative cone noise and the particular spectral distributions of surfaces in outdoor scenes.

Information from approximately uniform color palettes
Are filter gains different with distributions of surface colors that are colorimetrically more uniform? Table 2 shows average estimated gains in the effective number of discriminable Munsell surfaces with 95% confidence limits in parentheses. Table 3 shows corresponding gains for NCS surfaces. Since there was only one instance of the Munsell palette and of the NCS palette, confidence limits reflect only cone noise.  All three filters gave potentially reliable gains with these palettes. The average estimated gain with Munsell surfaces was about 44% and with NCS surfaces about 15%. But the normal trichromatic advantage was also greater with these palettes than with outdoor scenes. Thus when filter gains were expressed relative to the normal trichromatic advantage, they were greater with outdoor scenes than with the palettes. This finding adds to others suggesting that in outdoor environments observers with red-green color deficiency are less disadvantaged than expected from traditional laboratory color vision tests [52][53][54][55][56].
Why should outdoor scenes offer improved performance? The distributions of natural colors have been considered elsewhere [57][58][59][60]. Any bias they exhibit towards the normal trichromatic yellow-blue axis could reduce the disadvantages of anomalous trichromacy.

Cone noise amplitude
How does the amplitude of cone noise affect filter gains? The analysis summarized in Table 1 was repeated with relative SDs of 1%, 5%, and 10%. Results are summarized in Table 4, Appendix A. There were no reliable gains with the Vino filter but there were with the EnChroma R and E filters, for all relative SDs. The gains increased as noise amplitude decreased, though the normal trichromatic advantage also increased, and more rapidly, most noticeably at the smallest amplitude. In the absence of a principled cost function, a relative SD of 2% was taken as near optimum.

Cone noise distribution
To test the influence of the model noise distribution on filter gains, the analysis summarized in Table 1 was repeated with global Gaussian noise and with Poisson noise. Results are summarized in Tables 5 and 6 in Appendix B for noise with a representative relative SD of 2%.
With global Gaussian noise, there were no reliable gains with the Vino filter, but there were with the EnChroma R and E filters, albeit smaller than with local Gaussian noise. For Poisson noise, none of the filters gave reliable gains, except potentially the Vino filter in deuteranomaly.
A possible explanation, apart from the discreteness of Poisson processes, is that both the global Gaussian and Poisson processes produce greater variation at low mean levels than the corresponding local Gaussian process (Section 2.4). If low-reflectance surfaces are therefore excluded, performance should improve. The analysis was repeated with points omitted if their spectral reflectances were less than 10% over wavelengths 420-700 nm [31]. The revised gains without low-reflectance surfaces are shown in Table 7. There were potentially reliable gains with the Vino filter in deuteranomaly and with both the EnChroma R and E filters in protanomaly and deuteranomaly.

Discussion
For individuals with anomalous trichromacy, the three chosen commercial stop-band filters appeared to give small or no increases in information about colored surfaces in outdoor scenes. Translated into changes in the effective number of discriminable surfaces, potentially reliable gains with the EnChroma R and E filters, under near optimum conditions, were about 9% in protanomaly and 15% in deuteranomaly. These gains were, though, much less than the gains provided by normal trichromacy of 42% and 27%, respectively. Under the same conditions, the Vino filter gave no reliable gains in either protanomaly or deuteranomaly.
A critical assumption in this analysis was that noise arising in the cone photoreceptors limited color discrimination. Indeed, cone noise may produce most of the noise recorded in individual ganglion cells [24]. Nevertheless, could post-receptor processes for optimizing the mapping of the input contrast range to a neural response range compensate in some manner? Evidence for such a compensatory post-receptor amplification in anomalous trichromacy has been reported both psychophysically [61][62][63] and in fMRI [64]. In fact, by virtue of the so-called data-processing inequality [19], no post-receptor recoding can increase the information about scene surfaces, although there can be benefits in the way colors are perceived and judged [18,61] in the presence of multiple sources of noise [41]. As noted in [65], if recoding could compensate for cone noise, then observers with anomalous trichromacy would show normal spectral discriminations.
There are several limitations to this study. The three filters had spectral transmittance profiles with relatively broad notches in the medium-to-long wavelength region of the spectrum (Fig. 1), but other filters with sharper notches or other tailoring [17] might better separate the normal and hybrid pigment signals. Assumptions about cone noise amplitudes are also important. Departures from optimum values, e.g., at lower light levels, are likely to reduce potential filter gains. Likewise with more severe color vision deficiencies. More generally, procedural factors to do with how observers make surface discriminations were ignored in the analysis [23], in particular, the roles of object salience [66] and observer attention [67] and memory [68,69]. It is not immediately obvious whether their inclusion would improve or worsen potential gains. Finally, only real reflecting surfaces under natural illumination were considered. For any scene viewed on an RGB electronic display, the typically narrower bandwidths of the RGB primaries should give even smaller effects.
Of course, there may be other reasons for individuals with anomalous trichromacy to choose these filters. Users may be concerned less with objectively distinguishing colored surfaces and more with how these filters make the world appear more colorful, especially if they lead to longer-term increases in color awareness [18].
Still, for objective real-world color discriminations, stop-band filters seem to offer, at best, small gains in performance. Whether they are materially useful to an observer with anomalous trichromacy can only be established experimentally, either in the laboratory [56] or actively, outdoors. Table 4 shows average gains in the effective number of discriminable surfaces for local Gaussian cone noise with relative standard deviations SD of 1%, 2%, 5%, and 10%. Data for 2% are from Table 1 and are included for ease of comparison. The first three data columns are for stop-band filters and the fourth data column is for normal trichromatic pigments (95% confidence limits in parentheses).  Table 5 shows average gains in the effective number of discriminable surfaces for global Gaussian cone noise. The first three data columns are for stop-band filters and the fourth data column is for normal trichromatic pigments (95% confidence limits in parentheses). Table 6 shows the corresponding average gains for Poisson cone noise and Table 7 for Poisson cone noise but with low-reflectance surfaces excluded.   Funding. Fundação para a Ciência e a Tecnologia (UIDB/04650/2020); Engineering and Physical Sciences Research Council (GR/R39412/01), EP/B000257/1).