Color/Tone analysis for images with saturation level offsets or nonstandard bit depth
Table of contents
Introduction
Starting in Imatest version 24.1, the functionality of the saturation level setting from Color/Tone and Stepchart has been modified to better support the analysis of diverse image data ranges. The updated saturation level setting influences how image data is scaled/normalized for calculations during analysis. This modification allows for more precise control over the handling of image data and is particularly useful for dealing with images that have a saturation level offset or nonstandard bit depth (e.g., 10, 12, or 14 -bit image data).
Note: In older versions of Imatest, the saturation level setting is utilized for plotting and limited dynamic range (DR) calculations. Its functionality is expanded in 24.1.
Saturation level setting instructions
The saturation level setting controls Imatest’s interpretation of the maximum pixel level for the input image (corresponding to saturation level) and, starting in Imatest version 24.1, affects how the the image data is normalized/scaled for certain calculations.
If a user is analyzing an image with either a nonstandard bit depth or a saturation level offset, i.e., a saturation level that is lower than the max possible value for the image bit depth, they should set the saturation level setting to “Manually-entered saturation level” and enter the known saturation level of their image. Alternatively, if any of the patch regions in the image are known to be saturated, the user can select “Maximum detected patch level” for Imatest to automatically detect the saturation level from the patch regions-of-interest (ROIs).
The full list of options available in Imatest version 24.1 are described in the table below:
Saturation Level Option | Description |
---|---|
Standard file: 255 (or 65535…) | The saturation level is automatically set based on the data type and container size of the image data. This is the default setting and reflects legacy behavior. The image file is assumed to have standard bit depth (e.g., 8, 16, or 32 -bit data) and standard saturation level. For example, for standard 8-bit image data, saturation level will be set to 255. For a 16-bit image, saturation level will be set to 65535, and for a 32-bit image, saturation level will be set to 4294967295. |
ITU-R Rec. 601 (BT. 601: 235) | The saturation level is set to 235. This is a legacy setting. |
Maximum detected patch level | The saturation level is set to the maximum detected value from the patch regions in the image. This setting can be useful if the image data is of nonstandard bit depth (e.g., 12-bit data) or if there is a saturation level offset, so long as the image is exposed to saturate the brightest patches. |
Manually-entered saturation level | The saturation level is set to the value entered by the user. This setting can be useful if the image data is of nonstandard bit depth or if there is a saturation level offset. For example, for an image that has 12-bit data, enter 4095 as the saturation level (2^12 – 1 = 4095). |
Note: Monochrome or raw images have the alternative option of bit shifting the image data from the Monochrome read window (not available for multi-channel images). Performing a bit shift changes the digital numbers (DN) in the image, which may not be desirable for certain analyses. If a user has selected the option to bit shift their image to a standard bit depth, they should use the default option for the saturation level setting (i.e., they should not also manually enter the saturation level for the original image data).
Background
The bit depth of an image is the number of bits that are used to define the allowable range of pixel values, or digital numbers (DN). For example, an 8-bit image uses 8 bits of information to store DN ranging from 0 to 255, where. For a monochrome 8-bit image, a DN of 0 produces black while a DN of 255 produces white.
Image data are normally stored as unsigned integers (“UINT”) with either 8, 16, 32, or 64 bits of information, where 8 and 16 are most common. These are “standard bit depths”, in that there exists standard data types for representing the data in software, i.e., UINT8, UINT16, UINT32, and UINT64.
Examples of standard bit depths
Bit depth | Maximum allowable value |
---|---|
8-bit |
|
16-bit |
|
32-bit |
|
However, there is no strict rule against having images with “nonstandard” bit depth. That is, having image data stored with bit depth different from the standard.
Examples of “nonstandard” bit depths
Bit depth | Maximum allowable value |
---|---|
10-bit | |
12-bit | |
14-bit | |
20-bit |
|
Images with nonstandard bit depth have become increasingly prevalent in imaging, especially common with “raw” image data, or with image data output from HDR sensors. Images with nonstandard bit depth are often stored in standard bit depth files/containers (e.g., 12-bit data stored in a 16-bit file/container). The image data can additionally have a saturation level offset, where the saturation level is less than the max allowable value for the given bit depth.
In Imatest, certain image processing steps and color/tone calculations require normalizing or scaling the image data to have values ranging from 0 to 1. Proper normalization requires taking into account the saturation level as well as any dark level offset/pedestal.
Example analysis with nonstandard bit depth and saturation level offset
The image below is a 20-bit TIFF file, converted from the raw output of a HDR sensor used for automotive imaging applications. The image may appear completely white when viewed on this page. It can be downloaded and viewed properly in external software such as Imatest. The image has nonstandard bit depth (20-bit) and has a saturation level offset (i.e., the saturation level is 129 DN less than 20-bit max), as well as a known dark level offset/pedestal (168 DN) that has not yet been subtracted from the image. Beneath the image is a density reference file, measured for the patches on the 36-patch dynamic range (DR36) test chart in the image, which should be used for analysis in Imatest:
Imatest can perform accurate Color/Tone analysis on the image by setting the saturation level and the pixel offset from the More Settings window.
Since the brightest patch in the image was intentionally saturated during capture, we can use the “Maximum detected patch level” option for the Saturation Level setting. Alternatively, we can use “Manually-entered saturation level” and enter a value of 1048446 (DN). As we have prior knowledge of the dark level offset/pedestal for this sensor, we also set the Pixel offset setting to 168 (DN).
The image should be analyzed as “Bayer RAW (undemosaiced)” with a “GR/BG” pixel color mapping, representing the arrangement of the color filter array:
The image exhibits significant optical and perspective distortion. Region selection will need to be manually adjusted:
After proceeding with the analysis, in the Color/Tone interactive window, select the density reference file for the image. A density reference file for the image is attached to this page, beneath the TIFF file found above:
Data and results will be scaled according to the selected saturation level and pixel offset settings, with results correctly indicating the saturation level as 1048446 DN and the dark level offset as 168 DN: