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.
convert any image to black and white
flip black and white
identify connected components
option to specify neighborhood configuration