colour.models.log_encoding_VLog#

colour.models.log_encoding_VLog(L_in: 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 Panasonic V-Log log encoding opto-electronic transfer function (OETF).

Parameters:
  • L_in (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) – Linear reflection data \(L_{in}\).

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

  • out_normalised_code_value (bool) – Whether the Panasonic V-Log non-linear data \(V_{out}\) is encoded as normalised code values.

  • in_reflection (bool) – Whether the light level \(L_{in}\) to a camera is reflection.

  • constants (Structure | None) – Panasonic V-Log constants.

Returns:

Panasonic V-Log mon-linear encoded data \(V_{out}\).

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

L_in

1

1

Range

Scale - Reference

Scale - 1

V_out

1

1

References

[Panasonic14]

Examples

>>> log_encoding_VLog(0.18)
np.float64(0.4233114...)

The values of Fig.2.2 V-Log Code Value table in [Panasonic14] are obtained as follows:

>>> L_in = np.array([0, 18, 90]) / 100
>>> np.around(log_encoding_VLog(L_in, 10, False) * 100).astype(np.int_)
array([ 7, 42, 61])
>>> np.around(log_encoding_VLog(L_in) * (2**10 - 1)).astype(np.int_)
array([128, 433, 602])
>>> np.around(log_encoding_VLog(L_in) * (2**12 - 1)).astype(np.int_)
array([ 512, 1733, 2409])

Note that some values in the last column values of Fig.2.2 V-Log Code Value table in [Panasonic14] are different by a code: [512, 1732, 2408].