Degree of Contrast (DoC) Metric
- Degree of Contrast (DoC) is a generalized contrast energy metric based on center–surround filtering that quantifies spatial contrast structure in visual stimuli.
- It extends classical RMS contrast by incorporating local spatial relationships through zero-sum Difference-of-Gaussians filters, ensuring mathematical robustness.
- DoC links neuroanatomical parameters to psychophysical performance, offering practical insights for diagnosing contrast confounds and modeling visual crowding.
The Degree of Contrast (DoC), also referred to as the generalized contrast energy metric, is a quantitative framework for assessing the spatial contrast structure of visual stimuli, motivated by the receptive field architectures of early visual neurons. DoC extends classical measures such as @@@@1@@@@ contrast by incorporating the local spatial relationships defined by center–surround filters in the retina, LGN, and primary visual cortex. This metric has been shown to robustly predict the psychophysical outcomes of visual crowding, including classic and paradoxical effects across a broad range of tasks, with applications as both a diagnostic for contrast confounds and as a foundational component in models of visual perception (Rodriguez et al., 2020).
1. Theoretical Foundations: Center–Surround Filtering and Semi-Norm Structure
The mathematical grounding of DoC arises from the properties of center–surround receptive fields, classically modeled as a difference of Gaussians (DoG). A standard neuron’s response is modeled as a weighted sum of local luminances using two radially symmetric Gaussians—a narrow excitatory “center” and a broader inhibitory “surround”:
- Foreground (center) mask:
- Background (surround) mask with (empirically, ):
- DoG filter:
Given an image patch , vectorized as , convolution with the DoG filter is represented as linear operator such that .
The generalized contrast energy is then defined as:
Because is constructed from a zero-sum DoG filter, is always non-negative, homogeneous, and subadditive, so defines a semi-norm on the image space.
2. Relation to Classical RMS Contrast
DoC subsumes and generalizes the concept of RMS (Root Mean Square) contrast. In the limiting case where the center mask is a Dirac delta and the surround mask is uniform (i.e., all pixel values equally weighted), the DoG simplifies so that:
with (for pixels). Thus,
with , confirming that RMS contrast is a special (trivial) case of the generalized DoC metric.
3. Neuroanatomical Parameterization and Practical Computation
Parameters for the center–surround Gaussians are chosen to match anatomical constraints, specifically the dendritic field radii of midget ganglion cells that scale with eccentricity as established by Dacey & Petersen (1992). This gives:
- for the center, with from empirical fit,
- for the surround.
Practical computation of DoC for a grayscale patch with known eccentricity and viewing geometry is as follows:
- Calculate in pixels: .
- Build MoF and MoB as Gaussians over , .
- Compute DoG filter .
- Convolve with : .
- Sum squared responses: .
Optionally, normalization by or taking the square root enables direct comparability with RMS or device-invariant analyses.
4. Mapping DoC to Behavioral Performance in Crowding Tasks
The mapping from DoC to expected behavioral outcomes in crowding follows a parametric probabilistic model anchored in experimental psychophysics. For a given task:
- is the DoC of the isolated target image.
- A 10% reduction in maps to 1% correct identification.
Two Gaussian response curves are constructed:
- Target:
- Pooling:
with and for (the empirical contrast at the crowding threshold). The predicted proportion correct is:
Optionally, is multiplied by the empirical ceiling (typically ) for direct comparison to observed psychometric performance.
5. Empirical Predictive Power for Classic and Paradoxical Crowding Effects
DoC has demonstrated quantitative accuracy in predicting outcomes from a variety of crowding experiments, including:
| Experiment/Authors | Key Stimulus Configuration | Predictive Result via DoC Model |
|---|---|---|
| Pelli & Tillman (2008); Freeman & Simoncelli (2011) | Letter “r” with “a” flankers; varying distance and | DoC reproduces crowding curves as function of flanker separation |
| Flom, Weymouth & Kahneman (1963) | Landolt-C with bar flankers at various gaps, | DoC predicts non-monotonic , mirroring minimum at critical distance |
| Manassi, Sayim & Herzog (2012), “Uncrowding” | Vernier with $2,4,8,16$ bar flankers, | DoC increases with more flankers, improves: matches uncrowding |
| Harrison & Bex (2015); Pachai et al. (2016) | Landolt-C with $0,1,5$ surrounding rings (gapped/solid) | Gap lowers DoC more errors; more rings more DoC, fewer errors |
The capacity of DoC to account both for standard (distance- and eccentricity-dependent) crowding effects and for counterintuitive “uncrowding” phenomena supports its role as a general explanatory framework for early-stage contrast-driven crowding (Rodriguez et al., 2020).
6. Implementation Recommendations and Pseudocode
Practical implementation can follow the provided MATLAB-style pseudocode, which builds the DoG filter for the relevant eccentricity and convolving it with the image, then maps the result to behavioral probabilities per the described model:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
function [C, p] = degree_of_contrast(I_patch, ecc_deg, Ex) % I_patch: 2D luminance array % ecc_deg : eccentricity in degrees % Ex : empirical contrast threshold pix_per_deg = monitor_PIXELS_PER_MM / (mm_per_deg * 1000); sigma_F = f_retina(ecc_deg) * pix_per_deg; sigma_B = 5 * sigma_F; halfsize = ceil(3 * sigma_B); [X,Y] = meshgrid(-halfsize:halfsize, -halfsize:halfsize); MoF = exp(-(X.^2+Y.^2)/(2*sigma_F^2))/(2*pi*sigma_F^2); MoB = exp(-(X.^2+Y.^2)/(2*sigma_B^2))/(2*pi*sigma_B^2); h = MoF - MoB; R = conv2(I_patch, h, 'same'); C = sum(R(:).^2); mu_t = C_target_alone; sigma_t = 0.1*mu_t / sqrt(-2*log(0.01)); sigma_p = abs(Ex - mu_t) / sqrt(-2*log(0.01)); Gt = exp(- (C - mu_t).^2/(2*sigma_t^2)); Gp = exp(- (C - mu_t).^2/(2*sigma_p^2)); p = Gt + (1 - Gp); p = 0.85 * p; return end |
7. Scientific Significance and Implications
The DoC metric generalizes classical image contrast concepts by encoding the geometric and topological relationships induced by early center–surround processing. Its reduction to RMS contrast in degenerate cases ensures conceptual continuity, while its predictive validity across multiple psychophysical paradigms—including those previously considered paradoxical—indicates that much of visual crowding may be attributed to early-stage contrast computations. This suggests that higher-level grouping or pooling models, while potentially relevant for "configural" or "semantic" crowding cases, may not be required for the majority of basic crowding phenomena.
Available resources, including code and datasets for DoC benchmarking, can be found at https://github.com/DartmouthGrangerLab/Contrast/ (Rodriguez et al., 2020).