Stray Light Calculations

Stray light (flare) documentation pages

Introduction: Intro to stray light testing and normalized stray light | Outputs from Imatest stray light analysis | History

Background: Examples of stray light | Root Causes | Test overview | Test factors | Test Considerations | Glossary

Calculations: Metric image | Normalization methods | Light source mask methods | Summary Metrics | Analysis Channels | Saturation

Instructions: High-level Imatest analysis instructions (Master and IT) | Computing normalized stray light with Imatest | Motorized Gimbal instructions

Settings: Settings list and INI keys/values | Standards and Recommendations | Configuration file input

Page Contents

This page provides a description of the fundamental calculations that Imatest uses to generate stray light metric images.

Metric Image Calculations

At a high level, the measurement of stray light is very simple: normalize the digital numbers (DNs) of an image, while (optionally) masking out the image of the light source. At a deeper level, it is a four-step process of:

Dark-Level Subtraction

(Optionally) subtract off the user-provided dark level.

Clipping

Clipping helps address three cases:

Any image values less than the user-provided dark level are clipped to

 

Where the clipping value should be:

Normalization Factor Application

Transmission

The transmission stray light metric image calculation takes the test image and divides it by a normalization factor.

With appropriate normalization factors, this is used to compute:

For a "transmission" calculation, no stray light is indicated with a value of zero, and the worst possible stray light is indicated with a value of one.

Attenuation

The attenuation stray light metric image calculation takes a normalization factor and divides it by the test image.

 

With appropriate normalization factors, this is used to compute the flare attenuation metric proposed within IEEE-P2020 pre-release [4].

For an "attenuation" calculation, no stray light is indicated with a value of infinity, and the worst possible stray light is indicated with a value of one.

Note: zero is a valid image value (corresponding to no measurable stray light from the test configuration). When using the attenuation calculation, these zeros get transformed to infinity, which in turn will reduce the meaningfulness of some summary metrics (e.g., mean, max). To compensate for this, it is recommended to clip the image values to one.

Data Transforms

There are many data transforms that can be applied to produce the metric image.

NameTransform
Linear

Log 10

dB Power

dB Voltage

Log 2

Natural Log

Note: If using any of the logarithmic data transforms (any except linear), it is recommended to clip the image values to one.

Downsampling

The metric image may be downsampled. The current downsampling options are

NameDescriptionAdditional Inputs
Full Resolution

Use the full-resolution image

N/A

Scale FactorApply a downsampling scale factorScale Factor: the amount to downsample the image, e.g., 2 will do a 2x2 downsampling.
Output Image Size

Select the desired output image size

Desired Image Size (rows and columns)

Output Image RowsSelect the desired number of rows in the output image. The aspect ratio of the downsampled and original image will be kept approximately constant.

Desired Number of Rows

Output Image ColumnsSelect the desired number of columns in the output image. The aspect ratio of the downsampled and original image will be kept approximately constant.

Desired Number of Columns

References

  1. E. Fest, Stray Light Analysis and Control. Bellingham, WA, USA: SPIE Press, 2013. [Online]. Available: https://spie.org/Publications/Book/1000980. ISBN: 9780819493255. ↩
  2. B. Bouce et al., “GUERAP II users guide,” Perkin-Elmer Corp., 1974. ↩
  3. IEEE Standard for Automotive System Image Quality, IEEE Std 2020-2024, 2024, doi: 10.1109/IEEESTD.2024.10935839. ↩a ↩b
  4. IEEE Draft Standard for Automotive System Image Quality, IEEE Std P2020/D3, Jun. 2022. [Online]. Available: https://ieeexplore.ieee.org/document/9969530. ↩