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 describes the methodologies for computing saturation.
Saturation
Container Max
The Container Max method assumes that the maximum value in the container (data type) is the saturation level.
Data Type | Computed Saturation Level [DN] |
uint8 | 255 |
uint16 | 65535 |
uint32 | 4294967295 |
Caution: This method will fail if the data max is less than the container max, e.g., storing 10 bit/pixel data in a uint16. This failure mode will overestimate the true saturation value.
Image Max
The image max method assumes that the maximum value in the image is the saturation level.
Caution: This method will fail if the image data is less than the saturation level. This failure mode will underestimate the true saturation value.
Note: This is calculated per image. Different scene content may lead to different calculated saturation values.
Image Max (Power Of Two)
The image max (power of two) method attempts to address the failure mode of image max when the maximum value in the image is (slightly) less than saturation. The assumption is that the situation level will be of the form \(2^{N}-1\), where \(N\) is an integer. Under this assumption, the image max is rounded up to the next \(2^{N}-1\).
Image Max (Lower Bound) | Image Max (Upper Bound) | Calculated Saturation [DN] | Calculated Saturation [Bits] |
---|---|---|---|
128 | 255 | 255 | 8 |
256 | 511 | 511 | 9 |
512 | 1023 | 1023 | 10 |
1024 | 2047 | 2047 | 11 |
2048 | 4095 | 4095 | 12 |
4096 | 8191 | 8191 | 13 |
8192 | 16383 | 16383 | 14 |
16384 | 32767 | 32767 | 15 |
32768 | 65535 | 65535 | 16 |
65536 | 131071 | 131071 | 17 |
131072 | 262143 | 262143 | 18 |
262144 | 524287 | 524287 | 19 |
524288 | 1048575 | 1048575 | 20 |
1048576 | 2097151 | 2097151 | 21 |
2097152 | 4194303 | 4194303 | 22 |
4194304 | 8388607 | 8388607 | 23 |
8388608 | 16777215 | 16777215 | 24 |
16777216 | 33554431 | 33554431 | 25 |
33554432 | 67108863 | 67108863 | 26 |
67108864 | 134217727 | 134217727 | 27 |
134217728 | 268435455 | 268435455 | 28 |
268435456 | 536870911 | 536870911 | 29 |
536870912 | 1073741823 | 1073741823 | 30 |
1073741824 | 2147483647 | 2147483647 | 31 |
2147483648 | 4294967295 | 4294967295 | 32 |
Caution: This method will fail if the max of the image data is less than the saturation level. This failure mode will underestimate the true saturation value.
Note: This is calculated per image. Different scene content may lead to different calculated saturation values.
Image Max (Even Power Of Two)
The image max (even power of two) method attempts to address the failure mode of image max when the maximum value in the image is (slightly) less than saturation. The assumption is that the situation level will be of the form \(2^{2n}-1\), where \(n\) is an integer. Under this assumption, the image max is rounded up to the next \(2^{2n}-1\).
Image Max (Lower Bound) | Image Max (Upper Bound) | Calculated Saturation [DN] | Calculated Saturation [Bits] |
---|---|---|---|
64 | 255 | 255 | 8 |
256 | 1023 | 1023 | 10 |
1024 | 4095 | 4095 | 12 |
4096 | 16383 | 16383 | 14 |
16384 | 65535 | 65535 | 16 |
65536 | 262143 | 262143 | 18 |
262144 | 1048575 | 1048575 | 20 |
1048576 | 4194303 | 4194303 | 22 |
4194304 | 16777215 | 16777215 | 24 |
16777216 | 67108863 | 67108863 | 26 |
67108864 | 268435455 | 268435455 | 28 |
268435456 | 1073741823 | 1073741823 | 30 |
1073741824 | 4294967295 | 4294967295 | 32 |
Caution: This method will fail if the max of the image data is less than the saturation level. This failure mode will underestimate the true saturation value.
Note: This is calculated per image. Different scene content may lead to different calculated saturation values.
User-provided Value
This method allows the user to manually enter the saturation value in digital numbers.
Note when known, this or the user-provided bit depth is the recommended method(s).
User-provided Bit Depth
This method allows the user to manually enter the saturation value in bits.
The saturation value is calculated using
\(\mathrm{saturation} = 2^{\mathrm{bit depth}}-1\)
Note when known, this or the user-provided value is the recommended method(s).