MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / csf

Function csf

deps/perceptualdiff-master/metric.cpp:105–111  ·  view source on GitHub ↗

computes the contrast sensitivity function (Barten SPIE 1989) given the cycles per degree (cpd) and luminance (lum)

Source from the content-addressed store, hash-verified

103 // computes the contrast sensitivity function (Barten SPIE 1989)
104 // given the cycles per degree (cpd) and luminance (lum)
105 static float csf(const float cpd, const float lum)
106 {
107 const auto a = 440.f * powf((1.f + 0.7f / lum), -0.2f);
108 const auto b = 0.3f * powf((1.0f + 100.0f / lum), 0.15f);
109
110 return a * cpd * expf(-b * cpd) * sqrtf(1.0f + 0.06f * expf(b * cpd));
111 }
112
113
114 /*

Callers 1

yee_compareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected