The first example shows the basic effects of graylevel dilation. The result of dilating the following image with a 3x3 kernel,
gives us:
The highlights on the bulb surface have increased in size and have also become squared off as an artifact of the structuring element shape. The dark body of the cube has shrunk in size since it is darker than its surroundings, while within the outlines of the cube itself, the darkest top surface has shrunk the most. Many of the surfaces have a more uniform intensity since dark spots have been filled in by the dilation. Dilating the same image with a 5x5 kernel gives us:
Dilating this result again with a 5x5 kernel, gives:
In the next example we'll see that the circle becomes smaller and smaller every time we dilate it. The result of dilating the following image with a 5x5 kernel,
gives:
Dilating this image a second time with the 5x5 kernel gives:
and dilating it for the third time with the 5x5 kernel:
Dilation can also be used to remove 'pepper'-noise. Dilating the following image with a 3x3 kernel,
gives: