Documentation
¶
Index ¶
- func LMSToResp(l, m, s float32) (lc, mc, sc, lmc, grey float32)
- func LuminanceAdapt(bgLum float32) float32
- func ResponseCompression(val float32) float32
- func SRGBLinToLMS(rl, gl, bl float32) (l, m, s float32)
- func SRGBToLMS(r, g, b float32) (l, m, s float32)
- func SRGBToLMSResp(r, g, b float32) (lc, mc, sc, lmc, grey float32)
- func XYZToLMS(x, y, z float32) (l, m, s float32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LMSToResp ¶
LMSToResp converts Long, Medium, Short cone-based values to values that more closely reflect neural responses, including a combined long-medium (yellow) channel (lmc). Uses the CIECAM02 color appearance model (MoroneyFairchildHuntEtAl02) https://en.wikipedia.org/wiki/CIECAM02
func LuminanceAdapt ¶
LuminanceAdapt implements the luminance adaptation function equals 1 at background luminance of 200 so we generally ignore it.. bgLum is background luminance -- 200 default.
func ResponseCompression ¶
ResponseCompression takes a 0-1 normalized LMS value and performs hyperbolic response compression. val must ALREADY have the luminance adaptation applied to it using the luminance adaptation function, which is 1 at a background luminance level of 200 = 2, so you can skip that step if you assume that level of background.
func SRGBLinToLMS ¶
SRGBLinToLMS converts sRGB linear to Long, Medium, Short cone-based responses, using the CAT02 transform from CIECAM02 color appearance model (MoroneyFairchildHuntEtAl02) this is good for representing adaptation but NOT apparently good for representing appearances
func SRGBToLMS ¶
SRGBToLMS converts sRGB to Long, Medium, Short cone-based responses, using the CAT02 transform from CIECAM02 color appearance model (MoroneyFairchildHuntEtAl02)
func SRGBToLMSResp ¶
SRGBToLMSResp converts sRGB to LMS neural response cone values, that more closely reflect neural responses, including a combined long-medium (yellow) channel (lmc). Uses the CIECAM02 color appearance model (MoroneyFairchildHuntEtAl02) https://en.wikipedia.org/wiki/CIECAM02
Types ¶
This section is empty.