Skip to content

Cone isolating stimuli

Brian Wandell edited this page Jan 7, 2018 · 4 revisions

There are several functions that can be combined to create cone-isolating stimuli for simulation. Here are the ideas. The two critical routines are humanConeIsolating and humanConeContrast

Some of the graphs will look better if you set the color order of your plot lines this way

   co = [1  0  0; 0 0.5 0; 0  0  1;
      0 0.75 0.75; 0.75 0 0.75; 0.75 0.75 0; 0.25 0.25 0.25];
   set(groot,'defaultAxesColorOrder',co)

The RGB directions for cone isolation

We calculate cone isolating stimuli for a particular display and a particular set of human cone fundamentals.

In this example, we use the Apple LCD that is part of the ISETBIO display data. We also assume the standard Stockman cone fundamentals.

We use the humanConeIsolating function to calculate the linear RGB directions that stimulate each of the three human cones. The RGB values for the L,M, and S cones are returned in the columns of the rgbDirs matrix.

dsp = displayCreate('LCD-Apple');
[rgbDirs, spd] = humanConeIsolating(dsp);
disp(rgbDirs)
    0.5000   -0.5000    0.0867
   -0.0579    0.1914   -0.0741
   -0.0011   -0.0087    0.5000

The humanConeIsolating function returns values with a peak of 0.5 in each column so that these RGB directions can be added to a steady background (which we assume is 0.5,0.5,0.5) on the display. This way, the largest scale value for each of the cone types is 1.

The display SPD for cone isolation

These are the spectral power distributions of the three cone-isolating directions.

wave = displayGet(dsp,'wave');
vcNewGraphWin; plot(wave,spd); grid on
xlabel('Wave (nm)'); ylabel('Relative energy')

These values are both positive and negative, and they are intended to be added into the steady gray background (0.5,0.5,0.5) of the display. The Apple LCD has a particularly long red primary. Consequently, the amplitude of that primary is relatively high compared to the green primary that balances it. The blue primary dominates, of course, for the S-cone isolating case.

Confirming cone isolation

coneFile = fullfile(isetbioDataPath,'human','stockman');
cones = ieReadSpectra(coneFile,wave);
id = cones'*spd;
id = id/max(id(:))

id =

    0.3965   -0.0000    0.0000
   -0.0000    0.4034    0.0000
         0   -0.0000    1.0000

Cone contrast

The function 'humanConeContrast' uses the display information to calculate the cone contrast given this display. The code that computes the contrast is

dsp   = displayCreate;                        % Display information
wave  = displayGet(dsp,'wave');
bgSPD = displayGet(dsp,'spd')*0.5*ones(3,1);  % SPD of the gray background
[~,sigSPD]   = humanConeIsolating(dsp);       % SPD of the cone isolating signals
coneContrast = humanConeContrast(sigSPD, bgSPD, wave,'energy')
coneContrast =

    0.1813   -0.0000    0.0000
   -0.0000    0.2125    0.0000
         0   -0.0000    0.9144

For this display, which has a wide gamut, it appears that we can achieve a high cone contrast (around 20%) for the L and M cones and 90% for the S-cones. Those are bigger numbers than back in the CRT days.

Clone this wiki locally