Mathematical Morphology

Paint a binary or grayscale grid; apply erode, dilate, open, close, and related morphology operators.