colour.log_encoding#

colour.log_encoding(value: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], function: Literal['ACEScc', 'ACEScct', 'ACESproxy', 'ARRI LogC3', 'ARRI LogC4', 'Apple Log Profile', 'Canon Log', 'Canon Log 2', 'Canon Log 3', 'Cineon', 'D-Log', 'ERIMM RGB', 'F-Log', 'F-Log2', 'Filmic Pro 6', 'L-Log', 'Log2', 'Log3G10', 'Log3G12', 'N-Log', 'PLog', 'Panalog', 'Protune', 'REDLog', 'REDLogFilm', 'S-Log', 'S-Log2', 'S-Log3', 'T-Log', 'V-Log', 'ViperLog'] | str = 'Cineon', **kwargs: Any) ndarray[Any, dtype[float16 | float32 | float64]] | ndarray[Any, dtype[int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64]][source]#

Encode scene-referred exposure values to \(R'G'B'\) video component signal value using given log encoding function.

Parameters:
Returns:

Log values.

Return type:

numpy.ndarray

Examples

>>> log_encoding(0.18)  
0.4573196...
>>> log_encoding(0.18, function="ACEScc")  
0.4135884...
>>> log_encoding(0.18, function="PLog", log_reference=400)
... 
0.3910068...
>>> log_encoding(0.18, function="S-Log")  
0.3849708...