Auto Threshold
The Auto Threshold module will automatically threshold the current image into a binary black
and white image. The threshold level is automatically determined based on the method selected.
The appropriate method to use will depend on your application. Select Cluster (Otsu)
if you are looking for a standard
technique that is most often referenced by the current machine vision literature.
This module is useful when working with blob analysis or shape recognition whose background image
can change and a manual threshold is not reliable enough.
The following briefly outlines the algorithms used by the thresholding methods to allow you to chose
the most appropriate for your application. Note that they all operate on the image's histogram.
- Two Peaks - Detects the two highest peaks in the histogram separated by the distance specified. The
distance will ensure that peaks close to each other are not selected. The threshold is then found
by finding the deepest valley between these two peaks.
- Mean Level - the average pixel value is determined using the image histogram. All pixel intensities below that value are
set to black with all pixel intensities above the mean set to white.
- Black Percent - Also known as P-Tile. The threshold level is set based on the specified percent
of suggested dark pixels (or background) there are in the image. The histogram is used to indicate
how much of the image at a certain threshold would be set to black. Once this amount exceeds the
specified percent the current histogram index (0-255) is used as the threshold.
- Edge Percent - Similar to the black percent the edge percent threshold is
determined by the specified percent of edge pixels that exist below the
threshold. Instead of just counting every pixel the edge percent basis its
measurement on how much a pixel is part of an edge by performing a laplacian
filter prior to threshold determination.
- Entropy (Kapur) - Utilizes Kapur's entropy formula to find the threshold
that minimizes the entropy between the two halves of the histogram
created by a threshold.
- Cluster (Otsu) - One of the most popular threshold techniques that creates
two clusters (white and black) around a threshold T and successively tests
the within-class variance of the clusters for a minimum. This algorithm
can also be thought of as maximizing the between-class variance.
- Symmetry - Assumes that the largest peak in the histogram is somewhat symmetrical
and uses that symmetry to create a threshold just before the beginning of the
largest peak. This technique is particularly useful to segment objects from large
background planes.
- Triangle - Works well with histograms that don't have well defined peaks. This
technique finds the maximum distance between a suggested threshold value and a
line that connects the first non-zero pixel intensity with the highest peak.
Inherent in this technique is the distance of a point to a line equation.
Example
| Source Image | Thresholded |
 |  |
See Also
Manual Thresholding
For more information
FIP - Image Processing Fundamentals
|