There is an algorithm that you can apply to a binary (eg strictly black and white) image. The algorithm turns a pixel black if any of its neighbors were black. Thus, black objects grow and white ones shrink. One might apply this algorithm multiple times, and the boundary moves blackward by one pixel with each iteration.
Of course, it could move the other way, too - black and white are arbitrary asignments, in principle.
What’s the name for this? I thought it might be “bleed”, because the effect on letters is like what an ink pen does on blotter paper as the ink bleeds outward from the strokes of the letters, but a little web searching suggests that isn’t it.
That’s right. And erosion followed by dilation is called “opening”, while dilation followed by erosion is called “closing”. These are used to remove noise and clean up edges in binary images.
And also, there is greyscale erosion and dilation. In this case, the value of a pixel is the minimum or maximum value found in its immediate neighbourhood.