Thresholding

Node Icon

Otsu's thresholding is a method for automatically selecting a threshold value for image segmentation. The basic idea is to divide an image into two classes (foreground and background) based on a threshold value. The threshold value is chosen such that it minimizes the intra-class variance of the two classes. This method is particularly useful for images that have bimodal histograms, where the background and foreground pixels have distinct intensity levels. The threshold value is calculated by maximizing the inter-class variance. Otsu's thresholding is a simple and efficient method for image segmentation, and is widely used in image processing and computer vision applications.

Inputs

Input

Input image(s).

Type: Image, List, Required, Single

Outputs

Output

Output mask(s).

Type: Mask, List

Threshold

The threshold value found using Otsu's method.

Type: Numeric Array, List

Settings

Bins Integer

Set the number of image grayscale values, or bins, when finding the threshold.

Use Bin Midpoint as Threshold Boolean

Set threshold as the midpoint of the bin. If False, the end of the bin will be used. This has a small effect if the number of bins is large.

See also

Keywords: