Stockman & Sharpe (2000) — Cone Fundamentals
CIE 170-1:2006 2° cone fundamentals. Three cone classes — L (long, ~570 nm peak), M (medium, ~543 nm peak), S (short, ~442 nm peak) — define the first stage of colour vision. The Stockman-Sharpe fundamentals are the internationally accepted standard for cone spectral sensitivity, derived from colour matching experiments with confirmed dichromats.
This tool uses 10-nm sampled fundamentals from 390–730 nm, normalised to unity peak. The Hunt-Pointer-Estevez matrix converts linear sRGB to cone LMS excitations.
DKL Colour Space — Opponent Channels
Derrington, Krauskopf & Lennie (1984): Three post-receptoral opponent mechanisms form the basis of the DKL colour space used in vision research.
- L-M — Red-green chromatic channel (parvocellular pathway)
- S-(L+M) — Blue-yellow chromatic channel (koniocellular pathway)
- L+M — Achromatic luminance channel (magnocellular pathway)
Retinal Ganglion Cells — Center-Surround DoG
Retinal ganglion cells are modelled using a Difference-of-Gaussians (DoG) receptive field. The center is narrow (excitatory), the surround is wide (inhibitory). ON-center cells respond to luminance increments; OFF-center cells respond to decrements.
Contrast Sensitivity Function (CSF)
Watson & Ahumada (2005): The CSF describes the sensitivity of the visual system as a function of spatial frequency, temporal frequency, and retinal illuminance. Sensitivity follows a bandpass shape peaking around 3–5 cpd spatially and 8–10 Hz temporally under photopic conditions.
V1 Simple & Complex Cells — Gabor Model
Hubel & Wiesel (1962); Daugman (1985): V1 simple cells are well-modelled by Gabor filters. Complex cell energy = sum of squared quadrature responses. Divisive normalization (Heeger 1992) controls gain across the population.
V2 Texture Boundaries & V4 Colour Cells
V2: Gradient magnitude of V1 complex energy map detects texture boundaries. V4: Colour-selective neurons tuned to directions in DKL opponent space.
Colour Vision Deficiency (CVD)
Brettel, Vienot & Mollon (1997): CVD simulation using linear transformation matrices in LMS space. Protanopia (L absent), Deuteranopia (M absent), Tritanopia (S absent). Extreme dichromacy only.
LMS / HPE
|L| | 0.4002 0.7076 -0.0808 | |R_lin|
|M| = |-0.2263 1.1653 0.0457 | |G_lin|
|S| | 0.0000 0.0000 0.9182 | |B_lin|
sRGB EOTF (IEC 61966-2-1):
V ≤ 0.04045: L = V/12.92
V > 0.04045: L = ((V+0.055)/1.055)^2.4
Relative luminance:
Y = 0.2126·R_lin + 0.7152·G_lin + 0.0722·B_lin
Opponent
RG = L − M (red-green, parvo)
BY = S − 0.5(L + M) (blue-yellow, konio)
Lum = L + M (achromatic, magno)
CVD simulation (Brettel 1997 matrices):
Protanopia: [0.000 1.051 -0.051; 0 1 0; 0 0 1]
Deuteranopia:[1 0 0; 0.951 0.000 0.049; 0 0 1]
Tritanopia: [1 0 0; 0 1 0; -0.867 1.867 0.000]
Applied in linear RGB → LMS → modified LMS → RGB
DoG / Ganglion
DoG(x,y) = G(x,y; σ_c) − w · G(x,y; σ_s)
G(x,y; σ) = exp(−(x²+y²) / (2σ²))
σ_c = center sigma (narrow, excitatory)
σ_s = surround sigma (wide, inhibitory)
w = surround weight (relative gain)
ON-center: response = max(DoG * lum, 0)
OFF-center: response = max(−DoG * lum, 0)
Kernel is zero-mean normalised before convolution.
Gabor / V1
G(x,y; θ,f,σ,φ) = exp(−(x'²+y'²)/(2σ²)) · cos(2πf·x' + φ)
x' = x·cos(θ) + y·sin(θ)
y' = −x·sin(θ) + y·cos(θ)
Complex cell energy (quadrature pair):
E = √(even² + odd²), even: φ=0, odd: φ=π/2
Divisive normalisation (Heeger 1992):
R_norm = R / (σ_pool · G_blur(R) + ε)
Hypercolumn preferred orientation:
θ_pref = argmax_o { E_o(x,y) }
Selectivity = E_best / Σ E_all
CSF
area = π · (pupil/2)²
retIllu ∝ area (trolands proxy)
f_peak = 3.0 + 0.2 · retIllu
S_spatial = exp(−0.5 · (log(spf/f_peak)/bw)²)
S_temporal = exp(−0.5 · ((tf−8)/6)²)
CSF = clamp01(S_spatial · S_temporal)
Predicted detectability ≈ CSF × 100%
Limitations
- Educational Approximation: These models are simplified for interactive exploration.
- No Temporal Dynamics: The pipeline processes static images. Temporal frequency affects stimulus generation and CSF but not retinal adaptation.
- 2D Only: No depth, binocular disparity, or 3D scene understanding.
- Fixed Cone Sampling: Uniform cone mosaic — no foveal density gradient.
- No Chromatic Aberration: Eye's LCA is not modelled.
- No Adaptation: No Von Kries adaptation, dark/light adaptation, or after-images.
- CPU Processing: All convolutions on CPU. Large images or many orientations may be slow.
Cone Fundamentals & Opponent Theory
[2] Derrington, A.M., Krauskopf, J. & Lennie, P. (1984). Chromatic mechanisms in lateral geniculate nucleus of macaque. Journal of Physiology, 357, 241–265.
[3] De Valois, R.L. & De Valois, K.K. (1993). A multi-stage color model. Vision Research, 33(8), 1053–1065.
[4] Hunt, R.W.G. (2004). The Reproduction of Colour, 6th ed. Wiley.
Contrast Sensitivity & Spatial Vision
[6] Watson, A.B. & Ahumada, A.J. (2005). A standard model for foveal detection of spatial contrast. Journal of Vision, 5(9), 717–740.
[7] Wyszecki, G. & Stiles, W.S. (1982). Color Science, 2nd ed. Wiley.
Retinal & Cortical Models
[9] Daugman, J.G. (1985). Uncertainty relation for resolution in space, spatial frequency, and orientation optimized by two-dimensional visual cortical filters. JOSA A, 2(7), 1160–1169.
[10] Heeger, D.J. (1992). Normalization of cell responses in cat striate cortex. Visual Neuroscience, 9(2), 181–197.
[11] Rodieck, R.W. (1965). Quantitative analysis of cat retinal ganglion cell response to visual stimuli. Vision Research, 5(11), 583–601.
Colour Vision Deficiency
[13] Machado, G.M., Oliveira, M.M. & Fernandes, L.A.F. (2009). A physiologically-based model for simulation of color vision deficiency. IEEE TVCG, 15(6), 1291–1298.
About this tool
This tool implements a simplified visual pipeline from retina through cortex with cone spectral sensitivity, CSF-based detectability, CVD simulation, spike raster and population analysis — entirely client-side. Educational approximation — not a substitute for clinical or psychophysical testing.
Enter hex colours (one per line or comma-separated). Computes LMS cone excitations, opponent channel values, and CSF-based detectability for each colour at the current stimulus parameters.
2. HPE Matrix — Convert linear RGB → LMS cone excitations
3. Opponent Channels — L-M (parvo), S-(L+M) (konio), L+M (magno)
4. Retinal Ganglion DoG — Center-surround spatial filtering (ON/OFF cells)
5. LGN Relay — Opponent signal segregation (parvo/konio/magnocellular)
6. V1 Simple Cells — Gabor filter bank (N orientations × quadrature pairs)
7. V1 Complex Cells — Quadrature energy √(even² + odd²)
8. Divisive Normalisation — Population gain control (Heeger 1992)
9. Hypercolumn Map — Preferred orientation per pixel (argmax energy)
10. V2 Texture Boundary — Gradient of V1 energy → texture edges
11. V4 Colour Selectivity — Opponent direction dot product → colour neurons
12. Spike Raster — Poisson sampling of population activity