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.
Binarize — convert any image to black and white
ColorNegate — flip black and white
MorphologicalTransform — general block-based binary morphological operation
MorphologicalGraph — generate a graph from an image skeleton
MorphologicalComponents — identify connected components
CornerNeighbors — option to specify neighborhood configuration
ComponentMeasurements — component shape and color analysis
Colorize — color every component differently