binary_thresholdbinary_thresholdBinaryThresholdBinaryThresholdBinaryThresholdbinary_threshold segments a single-channel ImageImageImageImageimageimage
using an automatically determined global threshold and returns the
segmented region in RegionRegionRegionRegionregionregion. This is, e.g., useful for the
segmentation of characters on a homogeneously illuminated background.
binary_thresholdbinary_thresholdBinaryThresholdBinaryThresholdBinaryThresholdbinary_threshold also returns the used threshold in
UsedThresholdUsedThresholdUsedThresholdUsedThresholdusedThresholdused_threshold.
The used threshold is determined by the method that is given in
MethodMethodMethodMethodmethodmethod. Currently the operator provides the following two
methods: 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability" and 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo".
Both methods should only be used for images that have a bimodal
histogram.
The method 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo" provides the same functionality
that has been provided by the operator bin_thresholdbin_thresholdBinThresholdBinThresholdBinThresholdbin_threshold. The
method 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability" tends to determine smaller values
for UsedThresholdUsedThresholdUsedThresholdUsedThresholdusedThresholdused_threshold. Furthermore, it is less sensitive to thin
isolated peaks in the histogram that are far from the rest of the
spectrum and often, it is faster than 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo".
Maximize separability
By selecting MethodMethodMethodMethodmethodmethod = 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability", automatic
thresholding based on the gray-level histogram according to Otsu (see
the paper in References) is invoked. The algorithm first calculates
the histogram of the image and then uses statistical moments to find
the optimal threshold that divides the pixels
into foreground and background and maximizes the separability between
these two classes. This method is only available for byte and uint2
images.
By selecting MethodMethodMethodMethodmethodmethod = 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo"binary_thresholdbinary_thresholdBinaryThresholdBinaryThresholdBinaryThresholdbinary_threshold determines the threshold
in the following way: First, the relative
histogram of the gray values is determined. Then, relevant minima are
extracted from the histogram, which are used as parameters for a
thresholding operation. In order to reduce the number of minima, the
histogram is smoothed with a Gaussian, as in auto_thresholdauto_thresholdAutoThresholdAutoThresholdAutoThresholdauto_threshold.
The mask size is enlarged until there is only one minimum in the
smoothed histogram. Then, the threshold is
set to the position of this minimum.
List of values: 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability", 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo"