-
-
Notifications
You must be signed in to change notification settings - Fork 274
Description
colour/colour/contrast/barten1999.py
Line 131 in 491b6ef
return as_float(5 - 3 * np.tanh(0.4 * np.log(L * X_0 * Y_0 / 40**2))) |
The np.log
function should be replaced by np.log10
See Beau's work at JOV that traces the log function back to the work by Crawford (1936)
With np.log10
, the Barten (flat) curve in the example should evaluate instead to:
[0.021876435681538915, 0.014184813713158736, 0.00952448986054018, 0.006680496306613172, 0.004924641286022344, 0.0038228778810919495, 0.003118856932347983, 0.002662754642667843, 0.002367458781369199, 0.0021814667512135366]
With np.log10
, the Barten (flat) and Barten (ramp) curves, evaluated at X0=60, L = [0.001, 0.01, 0.1, 1.0, 10.0, 100.0]
are:
Barten (flat):
[0.06299067646573944, 0.021876435681538915, 0.008678146175280605, 0.004311183591087381, 0.0027590747863252907, 0.0021814667512135366]
Barten (ramp):
[0.12598135293147888, 0.04375287136307783, 0.01735629235056121, 0.008622367182174762, 0.0055181495726505814, 0.004362933502427073]
which fit closer to Figure 33 of ITU BT.2246 and also Figure 4 of the following paper:
S. Miller, M. Nezamabadi, S. Daly, "Perceptual Signal Coding for More Efficient Usage of Bit Codes," SMPTE Meeting Presentation, 2012