darsia.EOTF#
- class EOTF[source]#
Bases:
objectElectro-optical transfer function (EOTF),the standard transfer function for sRGB, cf. https://en.wikipedia.org/wiki/SRGB
Define look up table (LUT), representing the EOTF.
Methods
adjust(image)Apply EOTF using the look up table.
inverse_approx(image)Apply approximate of the inverse of EOTF using the look up table.
- adjust(image)[source]#
Apply EOTF using the look up table.
- Parameters:
- image
np.ndarray Image in linear RGB (uint8) format.
- image
- Returns:
np.ndarrayImage with tranformed color space, with values in [0,1].
- inverse_approx(image)[source]#
Apply approximate of the inverse of EOTF using the look up table. In order to apply the exact inverse, the expensive function colout.cctf_encoding would have to be applied to all pixels (with values in [0,1]). By restricting the allowed input values to uint8 values, allows for faster LUT.
- Parameters:
- image
np.ndarray Image in gamma-corrected RGB format with values in [0,1].
- image
- Returns:
np.ndarrayImage in linear RGB (uint8) format.