# colour.models.logarithmic_function_camera#

colour.models.logarithmic_function_camera(x: FloatingOrArrayLike, style: Union[Literal['cameraLinToLog', 'cameraLogToLin'], str] = 'cameraLinToLog', base: Integer = 2, log_side_slope: Floating = 1, lin_side_slope: Floating = 1, log_side_offset: Floating = 0, lin_side_offset: Floating = 0, lin_side_break: Floating = 0.005, linear_slope: Optional[Floating] = None) FloatingOrNDArray[source]#

Define the camera logarithmic function.

Parameters
• x (FloatingOrArrayLike) – Linear/non-linear data to undergo encoding/decoding.

• style (Union[Literal[('cameraLinToLog', 'cameraLogToLin')], str]) –

Defines the behaviour for the logarithmic function to operate:

• cameraLinToLog: Applies a piece-wise function with logarithmic and linear segments on linear values, converting them to non-linear values.

• cameraLogToLin: Applies a piece-wise function with logarithmic and linear segments on non-linear values, converting them to linear values.

• base (Integer) – Logarithmic base used for the conversion.

• log_side_slope (Floating) – Slope (or gain) applied to the log side of the logarithmic segment. The default value is 1.

• lin_side_slope (Floating) – Slope of the linear side of the logarithmic segment. The default value is 1.

• log_side_offset (Floating) – Offset applied to the log side of the logarithmic segment. The default value is 0.

• lin_side_offset (Floating) – Offset applied to the linear side of the logarithmic segment. The default value is 0.

• lin_side_break (Floating) – Break-point, defined in linear space, at which the piece-wise function transitions between the logarithmic and linear segments.

• linear_slope (Optional[Floating]) – Slope of the linear portion of the curve. The default value is None.

Returns

Encoded/Decoded data.

Return type

Examples

```>>> logarithmic_function_camera(
...    0.18, 'cameraLinToLog')
-2.4739311...
>>> logarithmic_function_camera(
...    -2.4739311883324122, 'cameraLogToLin')
0.1800000...
```