Background | Testing | Calculation | Imatest Instructions | Inputs |
Overview
Normalization “factors out” the level of the light source used in testing. It allows for easier comparison between tests performed with different hardware.
Normalization Methods
1) None
With this method, the test images under analysis are not normalized.
This is the simplest of the normalization methods (don’t normalize). It has two main benefits:
- Easy to get started (no extra info is needed).
- Stray light metric will be in units of digital number (DN) and similar intuition to noise levels can be used.
- Can directly analyze and see how the stray light manifests itself in the images after any image signal processing.
Inputs
- None
Normalization Factor
The normalization factor for this method is always 1.
Metric Range
Calculation | Best Possible Measurement | Worst Possible Measurement |
Transmission | 0 | Maximum digital number in an image |
Attenuation | Positive Infinity | One divided by the maximum digital number in an image |
2) Level
With this method, the user enters the level in units of digital number that is used to normalize the test images under analysis. A normalization level can be computed using the methods described in the Normalization Compensation Background section below. An example level calculation is provided on the stray light documentation landing page.
Inputs
- Normalization Level in digital numbers [DN]
Normalization Factor
The normalization factor for this method is the normalization level entered by the user.
Metric Range
Calculation | Best Possible Measurement | Worst Possible Measurement |
Transmission | 0 | 1 |
Attenuation | Positive Infinity | 1 |
Note: the above levels assume that the user-provided level will produce stray light in a 0-1 range for a transmission calculation. It is possible to choose a level that breaks this assumption.
3) Reference Image
With this method, a reference image is used for computing the point source rejection ratio (PSRR) metric or extended source rejection ratio (ESRR) [1]. The mean level from the direct image of the source within the reference image is used to normalize the images under test. This image may require lower light level (e.g., with use of ND filters) and/or shorter camera exposure time than that which was used for the test images, so that the direct image of the source is not saturated in the reference image. The normalization can be compensated to produce a “test image-equivalent” normalization factor by using the normalization compensation settings (ND filter settings and ratio settings).
Inputs
- Reference image filename (fully qualified path to image file)
- (Optional) Normalization compensation factors: Used to compensate the base normalization factor derived from the reference image
- (Optional) ND measurement type (none, density, or transmission)
- (Optional) ND measurement value (density or transmission value of the ND filter, if used for the reference image)
- (Optional) Integration time ratio: The ratio of the reference integration time to the analysis integration time (i.e., value for reference image divided by value for analysis image).
- (Optional) Gain ratio: The ratio of the reference gain to the analysis gain (i.e., value for reference image divided by value for analysis image).
- (Optional) Light level ratio: The ratio of the reference light level to the analysis light level (i.e., value for reference image divided by value for analysis image).
Assumptions
- The direct image of the source is not saturated in the reference image
- The correct compensation settings are used to compute a “test image-equivalent” normalization factor (e.g., factoring in the difference in light level used for the reference image)
Normalization Factor
The normalization factor is derived from the mean level of the direct image of the source within the reference image. This level is then compensated using the input compensation factors (ND filter settings and ratio settings). See the Normalization Compensation Background section below for detail on the method.
- Capture an image of the source.
- Note that the image of the source should not be saturated.
- If it is, adjust the level of the source (directly or with ND filters) and/or with the exposure settings of the camera until the image of the source is not saturated.
- Record the parameters used to generate the reference image.
- Create the mask of the source to identify the pixels in the image that correspond to the direct image of the light source.
- Take the mean of the mask region pixels to use as the base normalization factor.
- Compensate the base normalization factor using the Normalization Compensation settings (ND filter settings and ratio settings) to compute a compensated normalization factor. See the Normalization Compensation Background section below for more detail. This is the final normalization factor in units of digital number (DN). Note that if compensation settings were used, this number will is likely above the saturation level of the image.
Metric Range
Calculation | Best Possible Measurement | Worst Possible Measurement |
Transmission | 0 | 1 |
Attenuation | Positive Infinity | 1 |
Note that due to numerical and algorithmic issues values may appear outside of the bounds above.
Normalization Compensation
A key assumption of the test is that the level used to normalize the test image data (i.e., the normalization factor) is below saturation. Saturation, or the dynamic range of the camera under test, inherently limits the dynamic range of the test itself. Normalizing by saturation level provides relatively meaningless results because the level of saturated data is ambiguous. If normalizing by saturation, the resulting metric image will have values ranging from 0 to 1 where 1 corresponds to saturation level. For many cameras, the direct image of the source may need to be saturated in order to induce stray light in the image. In this case we can use the information from separate well-exposed reference images where the light level has been attenuated such that the direct image of the source is not saturated. Depending on the controls available to the camera, there are different techniques that can be used to produce an unsaturated image of the source and then a “test image-equivalent” (compensated) normalization factor, such as [2]:
- Adjust the exposure time \(t\)
- Adjust the system gain \(\rho\)
- Adjust the source light level \(L\), e.g., with ND filters and/or direct control of light source power
These techniques can be used individually or combined to form a compensation factor \(C\) that would serve as a multiplier for the base normalization factor \(N_{base} \) to compute a compensated normalization factor \(N_{compensated} \) (which is finally used to normalize the test image data). In this case, the base normalization factor \(N_{base} \) is the image level (digital number or pixel value) of the direct image of the source from the reference image [2]. The overall process can be described with a few simple equations:
\( \text{normalized stray light} = \frac{\text{input image data [DN]}}{N_{compensated}\text{ [DN]}} \)
where \(N_{compensated} = N_{base}\cdot C\)
and \(C = \frac{t_{test}}{t_{reference}}\cdot\frac{\rho_{test}}{\rho_{reference}}\cdot\frac{L_{test}}{L_{reference}} \)
Note that these techniques assume that the camera data is linear or linearizable and that the reciprocity law holds [2]. The following section provides an example normalized stray light calculation with use of a compensation factor.

Figure 2: An on-axis reference image showing an unsaturated direct image of the light source. The image was captured using a shorter camera exposure time than the test images and with an ND 2.5 filter in front of the light source. In the separate test images (not shown), the direct image of the source is saturated and significantly blooming to reveal stray light.
References
[1] B. Bouce, et. al, 1974. “GUERAP II – USER’S GUIDE”. Perkin-Elmer Corporation. AD-784 874.
[2] Jackson S. Knappen, “Comprehensive stray light (flare) testing: Lessons learned” in Electronic Imaging, 2023, pp 127-1 – 127-7, https://doi.org/10.2352/EI.2023.35.16.AVM-127