Segmentation > Adaptive Threshold

Selects pixels based on their intensity relative to some statistic of the surrounding neighborhood.

In the common Percentage mode, with “Statistic” set to Box Mean, pixel values are compared to their local average grayscale value. For example, if Percentage and Box Mean modes are checked, “Select” is set to Dark, Percentage value is 98, and Window Size is 30, then if a pixel is less than 98% of the average grayscale value in a 30×30 pixel window centered around it, it will be selected. If “Select” is set to Bright, then the pixel must be greater than 98% of its local 30×30 window average to be selected.

The window size is typically best set to be just larger than the size of the largest feature one is hoping to capture. The Distance Line tool can help approximate this size.

1. Select

  • Dark: Selects pixels which meet or fall below the criteria
  • Bright: Selects pixels which meet or exceed the criteria
  • Both: Selects pixels that are the + / – the “Departure” value, relative to their neighborhood statistic. Only applies to “Departure” mode.

2. Statistic

  • Box Mean: Critical stat for each pixel is the mean of its neighborhood
  • Box Median: Critical stat for each pixel is the median of its neighborhood
  • Gaussian Mean: Critical stat for each pixel is the Gaussian mean of its neighborhood

3. Dynamic

  • On: Critical difference or percentage for each pixel will be scaled based on local variance
    - Direct: Higher local variance will raise critical difference or percentage
    - Inverse: Higher local variance will lower critical difference or percentage
  • Weight: Sets how strong the local variance will scale the critical difference or percentage

4. Mask

Only considers and thresholds pixels within the selection of the mask image

5. Operation

  • Departure: Sets the critical threshold for each pixel as its difference from its neighborhood statistic
  • Percentage: Sets the critical threshold for each pixel as its percentage of its neighborhood statistic

6. Percentage/Departure Value

Sets the critical value each pixel get assessed relative to (Recommended: Percentage = 100)

7. Window Size

Size of the local neighborhood that each pixel is considered against (Recommended: 30)

Tips

  • To determine a good starting window, using the line tool do some rough measurements of the features you are interested in thresholding
  • Starting Window Size Dark Selection: 90, reduce to reduce selection, increase to increase selection. Bright Selection: 120, reduce to increase selection, increase to reduce selection.
  • You can limit the threshold to a region of interest set by a Companion mask.

Need more help with this?
Chat with an expert now ››

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.