Image Threshold

Thresholding is a non-linear operation that converts a gray-scale image into a binary image where the two levels are assigned to pixels that are below or above the specified threshold value. You can apply a threshold to data directly from the command line, e.g.,

myBinaryImage = myGrayImage > thresholdValue ? 255 : 0

It is however far more efficient to use the ImageThreshold operation which also provides several methods for finding the "optimal" threshold value for a given image. ImageThreshold provides the following methods for determining the threshold value:

Thresholding methods

  1. Automatically calculate a threshold value using an iterative method.
  2. Image histogram is a simple bimodal distribution.
  3. Adaptive thresholding. Evaluates threshold based on the last 8 pixels in each row, using alternating rows. Note that this method is not supported when used as part of the operation ImageEdgeDetection.
  4. Fuzzy thresholding using entropy as the measure for "fuzziness".
  5. Fuzzy thresholding using a method that minimizes a "fuzziness" measure involving the mean gray level in the object and background.
  6. Default, in which case you must use the /T flag to specify a manually selected threshold value.

Last updated: Thursday, December 23, 2004