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:
- (Optionally) Subtracting the dark level
- Clipping the image
- Applying the normalization factor
- (Optionally) Applying a data transformation
Dark-Level Subtraction
(Optionally) subtract off the user-provided dark level.
\(\text{image [DN]} = \text{image [DN]}-\text{dark level [DN]}\)
Clipping
Clipping helps address three cases:
- The possibility of negative values from dark-level subtraction
- Attenuation normalization transforming 0 in the image into infinity
- Logarithmic data transforms being undefined at 0
Any image values less than the user-provided dark level are clipped to
\(\text{clipped image [DN]} = \text{max}\left(\text{image [DN]}, \text{clipping value[DN]}\right)\)
Where the clipping value should be:
- 1: attenuation calculation
- 1: logarithmic data transform
- 0: otherwise
Normalization Factor Application
Transmission
The transmission stray light metric image calculation takes the test image and divides it by a normalization factor.
\(\text{stray light metric image} = \frac{\text{clipped image [DN]}}{\text{normalization factor [DN]}} \)
With appropriate normalization factors, this is used to compute the Point Source Transmission (PST) [1] and Point Source Rejection Ratio (PSRR) [2] metrics.
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.
\(\text{stray light metric image} = \frac{\text{normalization factor [DN]}}{\text{clipped image [DN]}}\)
With appropriate normalization factors, this is used to compute the flare attenuation metric proposed within IEEE-P2020 [3].
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 zeross 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.
Name | Transform |
Linear |
\(y=x\) |
Log 10 |
\(y=\log_{10}(x)\) |
dB Power |
\(y=10\cdot\log_{10}(x)\) |
dB Voltage |
\(y=20\cdot\log_{10}(x)\) |
Log 2 |
\(y=\log_{2}(x)\) |
Natural Log |
\(y=\ln(x)\) |
Note: If using any of the logarithmic data transforms (any but linear), it is recommended to clip the image values to one.
References
[1] E. Fest. 2013. “Stray Light Analysis and Control”. SPIE Press. ISBN: 9780819493255. DOI: https://doi.org/10.1117/3.1000980.
[2] B. Bouce, et. al, 1974. “GUERAP II – USER’S GUIDE”. Perkin-Elmer Corporation. AD-784 874.
[3] IEEE-P2020 Automotive Image Quality Working Group. https://site.ieee.org/sagroups-2020/