This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)


creates a binary image from image by replacing all values above the upper threshold with , also including pixels with intensities above the lower threshold that are connected to the foreground.
uses t as the upper threshold, automatically choosing a suitable value for the lower threshold.
chooses the lower and the upper threshold automatically.
  • MorphologicalBinarize effectively performs hysteresis thresholding and is typically used as part of edge-detection methods.
  • MorphologicalBinarize works with any image. It converts multichannel and color images into grayscale images, then produces an image in which every pixel has value or .
  • The option setting CornerNeighbors->False treats only the four pixels in the coordinate directions as adjacent.
Binarization of an image using double thresholding:
Binarization of an image using double thresholding:
Click for copyable input
Find connected foreground regions between the two specified thresholds:
Compute the lower threshold as a function of the upper threshold:
Use a fixed lower threshold and compute the upper threshold automatically:
New in 8