Local auto-threshold
Description
Binarise an image in the workspace such that the output only has pixel values of 0 and 255. Uses the built-in ImageJ global and 2D local auto-thresholding algorithms.Note: Currently only works on 8-bit images. Images with other bit depths will be automatically converted to 8-bit based on the "Fill target range (normalise)" scaling method from the "Image type converter" module.
Parameters
- Input image
- Description: Image to apply threshold to.
- Type: InputImageP
- Apply to input image
- Description: Select if the threshold should be applied directly to the input image, or if it should be applied to a duplicate, then stored as a different image in the workspace.
- Type: BooleanP
- Default value: true
- Output image
- Description: Name of the output image created during the thresholding process. This image will be added to the workspace.
- Type: OutputImageP
- Threshold mode
- Description: Local thresholding algorithm mode to use.
- Type: ChoiceP
- Default value: Slice-by-slice
- Choices:
- Slice-by-slice
- 3D
- Algorithm (slice-by-slice)
- Type: ChoiceP
- Default value: Bernsen
- Choices:
- Bernsen
- Contrast
- Mean
- Median
- MidGrey
- Niblack
- Otsu
- Phansalkar
- Sauvola
- Algorithm (3D)
- Type: ChoiceP
- Default value: Bernsen
- Choices:
- Bernsen
- Contrast
- Mean
- Median
- Phansalkar
- Threshold multiplier
- Description: Prior to application of automatically-calculated thresholds the threshold value is multiplied by this value. This allows the threshold to be systematically increased or decreased. For example, a "Threshold multiplier" of 0.9 applied to an automatically-calculated threshold of 200 will see the image thresholded at the level 180.
- Type: DoubleP
- Default value: 1.0
- Use lower threshold limit
- Description: Limit the lowest threshold that can be applied to the image. This is used to prevent unintentional segmentation of an image containing only background (i.e. no features present).
- Type: BooleanP
- Default value: false
- Lower threshold limit
- Description: Lowest absolute threshold value that can be applied.
- Type: DoubleP
- Default value: 0.0
- Local radius
- Description: Radius of region to be used when calculating local intensity thresholds. Units controlled by "Spatial units" control.
- Type: DoubleP
- Default value: 1.0
- Spatial units
- Description: Units that the local radius is specified using.
- Type: ChoiceP
- Default value: Pixel
- Choices:
- Calibrated
- Pixel
- Use full Z-range ("Global Z")
- Description: When performing 3D local thresholding, this takes all z-values at a location into account. If disabled, pixels will be sampled in z according to the "Local radius" setting.
- Type: BooleanP
- Default value: false
- Black objects/white background
- Description: Controls the logic of the output image in terms of what is considered foreground and background.
- Type: BooleanP
- Default value: true