Storing Infrared and UV Captures in AVIF Files
AVIF files can store infrared (IR) and ultraviolet (UV) sensor captures as auxiliary image items. Because AVIF is built upon the ISO Base Media File Format (ISOBMFF) and inherits the structural capabilities of the HEIF (High Efficiency Image File Format) standard, it supports extensible auxiliary image channels alongside a primary image. This article explains the underlying container mechanics, how non-visible light spectrum data is encoded, and the technical requirements for implementing IR and UV auxiliary items within an AVIF container.
The Architectural Foundation: HEIF and ISOBMFF
The AV1 Image File Format (AVIF) uses the container architecture defined by HEIF (ISO/IEC 23008-12). HEIF establishes a clear distinction between the primary image item—typically a standard RGB color image—and associated auxiliary image items. Auxiliary image items are supplementary images designed to provide additional data for rendering, processing, or analysis.
While auxiliary items are most commonly used for alpha transparency channels and depth maps, the underlying specification does not restrict their use to these domains. Instead, it provides a generalized framework for attaching arbitrary monochromatic or multi-channel visual data to a primary display item.
Implementing Non-Visible Light as Auxiliary Items
To store an infrared or ultraviolet capture as an auxiliary item, the file structure utilizes specific box structures defined in the ISOBMFF container:
- Item Declaration (
infebox): The IR or UV capture is declared as its own independent item within the Item Information Box. It is typically compressed using AV1’s monochrome profile at 8-bit, 10-bit, or 12-bit precision, matching the bit-depth of the original sensor capture. - Item Reference (
irefbox): The auxiliary capture is linked to the primary image using an item reference of typeauxl(auxiliary list). This establishes that the secondary item is not an independent image for standard display, but dependent data associated with the primary image. - Auxiliary Type Property (
auxCbox): The auxiliary item is assigned an Auxiliary Type Property box, which contains a Uniform Resource Identifier (URI). This URI explicitly defines the type and purpose of the auxiliary data. While standard URIs exist for alpha and depth channels, custom or standardized URNs can designate specific wavelengths, such as near-infrared (NIR), short-wave infrared (SWIR), or ultraviolet (UV-A/UV-B).
AV1 Codec Advantages for Multispectral Captures
Using AV1 to encode non-visible auxiliary channels provides distinct advantages:
- High Bit-Depth Encoding: Scientific and computational imaging sensors often capture IR and UV data in 10-bit, 12-bit, or higher linear depths. AV1 supports 10-bit and 12-bit profiles natively.
- Efficient Compression: Sensor captures from non-visible spectra can be compressed using lossy or lossless AV1 intra-frame coding, significantly reducing file sizes compared to uncompressed raw or multi-page TIFF formats.
- Spatial Alignment: Auxiliary items can share the same coordinate space as the primary image or specify spatial transformations within the container to account for sensor parallax or differing sensor resolutions.
Software Compatibility and Parsing
While the AVIF specification fully supports auxiliary items through HEIF mechanisms, viewing software must explicitly support the auxiliary type URI to interpret the data correctly.
Standard consumer decoders and web browsers generally ignore
auxiliary items that do not correspond to alpha transparency channels.
Consequently, client applications intended to process multispectral,
forensic, agricultural, or computational photography data must be
configured to inspect the iref table, extract the
non-visible auxl item, and read accompanying metadata (such
as Exif or XMP) to correctly map the radiometric characteristics of the
IR or UV sensor.