colour_hdri.tonemapping_operator_logarithmic#

colour_hdri.tonemapping_operator_logarithmic(RGB: ArrayLike, q: float = 1, k: float = 1, colourspace: RGB_Colourspace = RGB_COLOURSPACES['sRGB']) NDArrayFloat[source]#

Perform given RGB array tonemapping using the logarithmic method.

Parameters:
  • RGB (ArrayLike) – RGB array to perform tonemapping onto.

  • q (float) – \(q\).

  • k (float) – \(k\).

  • colourspace (RGB_Colourspace) – RGB colourspace used for internal Luminance computation.

Returns:

Tonemapped RGB array.

Return type:

numpy.ndarray

References

[BADC11b]

Examples

>>> tonemapping_operator_logarithmic(
...     np.array(
...         [
...             [
...                 [0.48046875, 0.35156256, 0.23632812],
...                 [1.39843753, 0.55468757, 0.39062594],
...             ],
...             [
...                 [4.40625388, 2.15625895, 1.34375372],
...                 [6.59375023, 3.43751395, 2.21875829],
...             ],
...         ]
...     ),
...     1.0,
...     25,
... )  
array([[[ 0.0884587...,  0.0647259...,  0.0435102...],
        [ 0.2278222...,  0.0903652...,  0.0636376...]],

       [[ 0.4717487...,  0.2308565...,  0.1438669...],
        [ 0.5727396...,  0.2985858...,  0.1927235...]]])