colour_hdri.tonemapping_operator_Reinhard2004#

colour_hdri.tonemapping_operator_Reinhard2004(RGB: ArrayLike, f: float = 0, m: float = 0.3, a: float = 0, c: float = 0, colourspace: RGB_Colourspace = RGB_COLOURSPACES['sRGB']) NDArrayFloat[source]#

Perform given RGB array tonemapping using Reinhard and Devlin (2004) method.

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

  • f (float) – \(f\).

  • m (float) – \(m\).

  • a (float) – \(a\).

  • c (float) – \(c\).

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

Returns:

Tonemapped RGB array.

Return type:

numpy.ndarray

References

[RD05]

Examples

>>> tonemapping_operator_Reinhard2004(
...     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],
...             ],
...         ]
...     ),
...     -10,
... )  
array([[[ 0.0216792...,  0.0159556...,  0.0107821...],
        [ 0.0605894...,  0.0249445...,  0.0176972...]],

       [[ 0.1688972...,  0.0904532...,  0.0583584...],
        [ 0.2331935...,  0.1368456...,  0.0928316...]]])