colour_hdri.tonemapping_operator_exponentiation_mapping#

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

Perform given RGB array tonemapping using the exponentiation mapping method.

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

  • p (float) – \(p\).

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

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

Returns:

Tonemapped RGB array.

Return type:

numpy.ndarray

References

[Sch94]

Examples

>>> tonemapping_operator_exponentiation_mapping(
...     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],
...             ],
...         ]
...     )
... )  
array([[[ 0.1194997...,  0.0874388...,  0.0587783...],
        [ 0.3478122...,  0.1379590...,  0.0971544...]],

       [[ 1.0959009...,  0.5362936...,  0.3342115...],
        [ 1.6399638...,  0.8549608...,  0.5518382...]]])