Stray Light Masking

Masking (shorthand for "light source masking") is the process of creating a mask to exclude the image of the light source from the analysis. The actual image of the light source is desired and therefore is not stray light. 

Methods

Two-Pass Circle (Radius)

Description

The two-pass circle radius method uses two passes to localize the light source. The first pass is any of the masking methods. This first pass is used to find where the light source is. A circle of the prescribed radius is then applied at this location.

Inputs
Calculation
  1. Apply the first pass method to the image to get a mask
    1. If no mask is found, the light source is assumed to be out of the FOV
    2. If a mask is found, the light source is assumed to be in the FOV
  2. Compute the centroid of the mask
  3. Create a mask within a specified radius of the light source
Assumptions
Notes

Image Processing

Description

This method uses image-processing-based methods to mask out the light source.

Inputs
Calculation
Overview
  1. Compute the level threshold
  2. Create an initial mask by finding all of the pixels greater than the threshold
  3. (Optional) Perform an image closing morphology with a disk of the user-specified size. This helps to fill in small holes within the mask
  4. Compute the number of connected components in the mask
    • If zero connected components are found, then the light source is assumed to be out of the FOV
  5. Filter out any connected components that have an area smaller than the user-provided threshold
    • If zero connected components remain, then the light source is assumed to be out of the FOV
  6. Apply the strategy for selecting from one or more connected-component 
Level threshold calculation

If the level threshold type is the percent of max:

  1. Calculate the maximum value
  2. The threshold is the user-provided percentage of this value

If the level threshold type is value:

  1. Use the provided threshold
Multiple Connected Component Strategies

If there is only one connected component:

If there are no connected components:

If the user-provided multiple-connected component strategy is "Don't mask":

If the user-provided multiple-connected component strategy is "Pick Biggest":

Assumptions
Notes

Warnings

Generic Notes