158 |
# Gamma correction used with the perceptual non-linearity in YtoL and LtoY |
# Gamma correction used with the perceptual non-linearity in YtoL and LtoY |
159 |
# conversion functions. |
# conversion functions. |
160 |
# |
# |
161 |
gamma = 2 |
gamma = 2.2 |
162 |
# |
# |
163 |
# Usually, the default display gamma of 1.0 actually yields an intensity |
# The uncorrected display gamma of PC's is typically 2.2, i.e., |
164 |
# exponent of 0.5 so gamma correction of 2.0 here should result in linear |
# RGB values map to physical intensities with an exponent of 2.2. |
165 |
|
# So, gamma correction of 2.2 here should result in linear |
166 |
# intensity. (The CIE L* computation assumes linear intensity). |
# intensity. (The CIE L* computation assumes linear intensity). |
167 |
|
|
168 |
def YSTtoRGB(v): |
def YSTtoRGB(v): |