1
$\begingroup$

What exactly is erosion and dilation? What is the difference between them in digital image processing? Can anyone explain the process that is happening behind the scenes of erosion and dilation?

$\endgroup$
1
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it is about definitions in general image processing and has no physics conceptual content. $\endgroup$
    – Bill N
    Apr 24, 2019 at 14:06

1 Answer 1

1
$\begingroup$

There are several procedures, I’ll talk about erosion and dilation which are used on grayscale images.

You firstly has to define the boundary between white and black. For example you use a 8 bit image and define black (grayscale 0) and white (grayscale 255) with the boundary value of 128. Erosion and dilation are defined in relation to white pixels.

Now you decide the “thickness” of the erosion / dilation, for example 3 pixels for dilation. For each pixel in the image, which is temporarily defined as white, the algorithm looks over 3 pixels around and if “black” pixels are found in this distance they get the same grayscale value as the currently viewed pixel. With erosion it’s the other way, for every as black defined pixel, 3 pixels around get the same grayscale value as the “black” pixel.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.