4
$\begingroup$

What is the difference between the Dilate/Erode nodes Step and Distance modes? I can tell they are doing different things, but I'm interested in the technical details and the documentation does not cover it.

$\endgroup$

1 Answer 1

6
$\begingroup$

In Step and Distance mode, the Erode/Dilate node samples through all pixels and compares their value to the neighbouring pixels. If a neighbouring pixel has a lesser value, than it is matched the sample pixels value.

The following pseudo python shall demonstrate.

FOREACH a OF allPixels:
    FOREACH b NEXT TO a:
        IF (a > b):
            b = a

In Step mode, the adjacent pixels are right, top, left, bottom.

dilate step mode

In Distance mode, the adjacent pixels include diagonal connections.

dilate distance mode

Here is a comparison of an example.

dilate step distance mode

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .