colour.models.log_encoding_VLog#

colour.models.log_encoding_VLog(L_in: ArrayLike, bit_depth: int = 10, out_normalised_code_value: bool = True, in_reflection: bool = True, constants: Structure = CONSTANTS_VLOG) NDArrayFloat[source]#

Define the Panasonic V-Log log encoding curve / opto-electronic transfer function.

Parameters:
  • L_in (ArrayLike) – Linear reflection data :math`L_{in}`.

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

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

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

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

Returns:

Non-linear data \(V_{out}\).

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

L_in

[0, 1]

[0, 1]

Range

Scale - Reference

Scale - 1

V_out

[0, 1]

[0, 1]

References

[Panasonic14]

Examples

>>> log_encoding_VLog(0.18)  
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].