colour.models.log_encoding_NLog#

colour.models.log_encoding_NLog(y: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1], bit_depth: int = 10, out_normalised_code_value: bool = True, in_reflection: bool = True, constants: Structure | None = None) Annotated[ndarray[tuple[Any, ...], dtype[float16 | float32 | float64]], 1][source]#

Apply the Nikon N-Log log encoding opto-electronic transfer function (OETF).

Parameters:
  • y (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) – Linear light reflectance \(y\), where \(y = 0.18\) represents middle grey at Stop 0.

  • bit_depth (int) – Bit-depth used for conversion.

  • out_normalised_code_value (bool) – Whether to return the Nikon N-Log encoded data \(x\) as normalised code values.

  • in_reflection (bool) – Whether the input light level represents reflected light.

  • constants (Structure | None) – Nikon N-Log constants.

Returns:

N-Log 10-bit equivalent code value \(x\).

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

y

1

1

Range

Scale - Reference

Scale - 1

x

1

1

References

[Nikon18]

Examples

>>> log_encoding_NLog(0.18)
0.3636677...