Erosion

effects-erosion-2504.webp

Description

This effect/filter simulates image erosion, an effect which will enlarge the darkest pixels in the image by replacing the pixel by the local (3x3) minimum. It is the opposite of the Dilation effect.

Parameters

Parameter

Value

Description

1st / 2nd / 3rd / 4th Plane Threshold

Integer

Limits the maximum change for each plane, default is 65535. If 0, plane will remain unchanged.

Coordinates

Integer

Flag which specifies the pixel to refer to. Default is 255, i.e. all eight pixels are used.

Notes

The local 3x3 matrix looks like this (P represents the pixel):

1 2 3
4 P 5
6 7 8

The parameter Coordinates is the decimal value of the binary-notation of this matrix. Each point in the matrix is represented as a bit in a binary number[1] with 8 bits.

Example 1:

Pixels #1, 2, and 3 are to be used for the dilation effect. Coordinates must be set to 000001112, or 22 + 21 + 20 = 4 + 2 + 1 = 710

Example 2:

Pixels #1, 3, 6, and 8 are to be used. Coordinates must be set to 101001012, or 27 + 25 + 22 + 20 = 128 + 32 + 4 + 1 = 16510