GitHub - gfxdisp/stelaCSF: stelaCSF - A Unified Model of Contrast Sensitivity as the Function of Spatio-Temporal Frequency, Eccentricity, Luminance and Area (original) (raw)

stelaCSF: A unified model of contrast sensitivity as the function of Spatio-Temporal frequency, Eccentricity, Luminance and Area

This repository contains both the code and the data for a contrast sensitivity model, as the function of

The detais about the model and the dataset can be found on the project web site and in the paper:

Mantiuk, Rafał K, Maliha Ashraf, and Alexandre Chapiro. “StelaCSF - A Unified Model of Contrast Sensitivity as the Function of Spatio-Temporal Frequency , Eccentricity , Luminance and Area.” ACM Transactions on Graphics 41, no. 4 (2022): 145.https://doi.org/10.1145/3528223.3530115

Code

Currently the code is provided as a Matlab class in the directory matlab.

Example

To plot the CSF as the function of temporal frequency:

clf;

csf_model = CSF_stelaCSF();
t_freq = linspace( 0, 60 )'; %Hz, must be a column vector
csf_pars = struct( 's_frequency', 4, 't_frequency', t_freq, 'orientation', 0, 'luminance', 100, 'area', 1, 'eccentricity', 0 );          
S = csf_model.sensitivity( csf_pars );        

plot( t_freq, S );
set( gca, 'YScale', 'log' );
xlabel( 'Temporal frequency [Hz]' );
ylabel( 'Sensitivity' );

Check also `matlab/example_plot_csf.m'.

Data

Each datapoint represent a Gabor patch at the detection threshold, either for individual observer, or averaged across all observers. The sensitivity is averaged the log-contrast space.

The data is stored in the CSV files:

If no individual data is available in a dataset/paper, it is excluded from data_individual.csv.

The columns are identical as in data_individual.csv but without the columns observer and age.

The background IDs are unique across all datasets so that the tables data* and backgrounds can be merged using bkg_id as the key.

bkg_id - the unique ID of the background colour L, M, S - LMS colour coordinates R - rod response or scotopic luminance (CIE 1951 scotopic luminous function) bkg_label - string label of the background (e.g. 'red', 'white', 'd65') dataset - the ID of the dataset

The colour directions IDs are unique across all datasets so that the tables data* and color_direction can be merged using color_direction as the key.

col_dir_id - the unique ID of the colour direction L_delta ,M_delta, S_delta - the vector defining the direction in the LMS colour space dataset - the ID of the dataset

Columns: