This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
Mathematical Morphology
Combining methods from set theory, topology, and discrete mathematics, mathematical morphology provides a powerful approach to processing images and other discrete data. Mathematica includes an extensive and efficient implementation of mathematical morphology, fully integrated with Mathematica's general image and data processing.
Image Preparation
Binarize convert any image to black and white
ColorNegate flip black and white
Basic Operations
Dilation  ▪ Erosion  ▪ Opening  ▪ Closing
Morphological Transforms
MorphologicalTransform general block-based binary morphological operation
MorphologicalGraph generate a graph from an image skeleton
Morphological Analysis
MorphologicalComponents identify connected components
CornerNeighbors option to specify neighborhood configuration
Component Analysis
ComponentMeasurements component shape and color analysis
Colorize color every component differently