AI Glossary / Computer vision and multimodal AI / Intermediate

Log encoding

Definition

Log encoding represents image signals with a logarithmic or partly logarithmic transfer function. It allocates digital values differently from linear-light encoding, often giving approximately equal code-value intervals to equal exposure changes over much of the range. It is commonly used in camera and post-production workflows.

What it means

A scene can contain very large brightness ratios. Doubling the light corresponds to one exposure stop, whether the change is from a small value to twice that value or from a much larger value to twice that value. A logarithm expresses these multiplicative changes as additive steps.

An image stored this way often looks low in contrast when displayed without the intended viewing transform. That appearance is a consequence of interpretation, not evidence that the camera failed to capture contrast.

“Log” is not a complete color-space specification. The exact transfer function, its version, color primaries, white point, and signal conventions matter. Two files described casually as log may require different conversions before they can be combined correctly.

How it works

Start with a defined scene-linear signal and apply the specified encoding function. Quantize and store the resulting values using an appropriate representation. Practical camera curves can include offsets or nonlogarithmic segments to handle very low signals and other implementation requirements.

For operations that require proportional light values, apply the correct inverse function to recover a linear representation. For viewing, use a color-managed conversion that also handles the destination display and intended rendering.

ARRI's LogC4 specification illustrates why precise names matter: it defines a transfer curve separately from its associated wide-gamut primaries and provides encoding and decoding functions. A generic logarithm chosen by a software developer is not a substitute for the documented camera transform.

Three practical examples

1. Video editing: An editor receives footage from two camera systems. Correct input transforms bring their different encodings into a common working space before the editor judges whether the shots match.

2. Visual effects: A compositor converts suitable log footage to linear light for physically meaningful blending, then follows the agreed output pipeline. Simply adding encoded values would perform a different operation.

3. Vision-data preparation: A team building an image model records whether training frames were log encoded or display rendered. It checks whether production inputs use the same interpretation, avoiding an unnoticed preprocessing mismatch.

Think of it this way

Think of a ruler marked by repeated doubling: one mark represents one unit, the next two, then four, eight, and sixteen. Equal distances on that ruler represent equal ratios rather than equal differences.

The analogy explains the spacing, but a real camera curve is more complicated than this ruler. Its black handling, offsets, range, and color definition must come from the actual specification.

Worked example

Use a deliberately simplified teaching encoding C = 100 + 50 log2(L), with positive relative light value L. This is not a camera standard and has no defined behavior at zero.

For L = 1, C = 100. For L = 2, C = 150. For L = 4, C = 200. Each doubling adds fifty code units. The inverse is L = 2^((C − 100)/50), so code value 175 represents approximately 2.83 relative light units.

Now average the encoded values for L = 1 and L = 4: (100 + 200)/2 = 150. Decoding gives L = 2. However, the arithmetic average in linear light is (1 + 4)/2 = 2.5, which would encode to about 166.1.

The difference demonstrates why the working representation matters. An average in log space is not the same calculation as an average of light. Neither operation should be selected without considering what the image-processing task is intended to do.

Illustrative case study

Fictional case: A small production studio receives an interview and product demonstration from different crews. An assistant labels both folders “log” and applies the same conversion. One set develops unnatural contrast and color, so the editor initially assumes the lighting was inconsistent.

Checking the camera reports reveals different input encodings. The editor assigns each source its correct transform and reassesses the shots in a common viewing pipeline. Creative grading then addresses the remaining visual differences.

This illustrates a workflow error, not a measured benefit or a claim that color management can repair every capture problem.

Common misconceptions and mistakes

Do not equate log encoding with raw data. Raw describes a stage or form of captured data, while log describes a signal mapping; the concepts answer different questions.

Do not assume log creates additional sensor dynamic range or restores clipped highlights. A storage transform cannot recover measurements that were never recorded.

Avoid choosing a conversion because an image looks flat. Verify metadata or production documentation. Also avoid applying the viewing transform twice, discarding necessary precision during intermediate exports, or confusing the transfer curve with the color gamut.

Business use

Understanding log encoding helps production teams specify reliable handoffs between cameras, editors, effects vendors, and delivery systems. It also matters when media become input data for automated inspection or machine learning.

A useful delivery specification names the exact encoding, color space, file representation, and intended viewing transform. Test a short representative clip through the complete pipeline, including export and reimport. Evaluate highlight handling, shadow artifacts, and consistency rather than treating “shot in log” as a quality guarantee.

People also ask

Is an unconverted log image supposed to look finished?

Usually no; the intended viewing transform and creative rendering determine its displayed appearance.

Are all log curves interchangeable?

No. Use the correct named curve and version together with the associated color information.

Should every image calculation happen in log space?

No. Choose the representation appropriate to the operation; light addition and many compositing operations require linear values.

Check your understanding

A highlight is clipped during capture. Will decoding a log file recover its missing detail?

Answer: No. Decoding changes the representation of recorded values; it does not reconstruct unavailable measurements.

Related terms

  • Linear light
  • Transfer function
  • Dynamic range
  • Color space
  • exposure stop
  • lookup table
  • color management

Learn next

Compare a linear ramp with its encoded version, then decode it and check the round trip. Next distinguish an input transform, a creative grade, and a display transform in one documented workflow.

More in Computer vision and multimodal AI

  • Local Laplacian filters - Local Laplacian filters are edge-aware image-processing methods that construct an output Laplacian pyramid using locally centered nonlinear intensity...
  • Local tone mapping - Local tone mapping adjusts an image's tonal values using information about each location's surroundings.
  • Locally adaptive regression kernel (LARK) - A locally adaptive regression kernel (LARK) is a description of a pixel's neighborhood whose shape adapts to local image structure.
  • Log-normal distribution - A log-normal distribution describes a positive random quantity whose logarithm follows a normal distribution.
  • Look-up table - A look-up table, commonly called a LUT, stores output values that can be retrieved using an input value or combination of values.
  • Low-pass filter - A low-pass filter preserves slowly varying components of a signal while reducing more rapidly varying components.

Sources

ARRI, LogC4 Logarithmic Color Space Specification: https://www.arri.com/resource/blob/278790/f3318e8c9c65617d8c5ca3f8b3e32051/2023-05-arri-logc4-specification-data.pdf

The manufacturer's specification was opened. The teaching equation and studio scenario are original and do not reproduce a proprietary camera curve.

Previous: Log area ratio Next: Log-Gaussian Cox process

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer