public class Erosion extends java.lang.Object implements IApplyInPlace
The filter assigns minimum value of surrounding pixels to each pixel of the result image. Surrounding pixels, which should be processed, are specified by structuring element: 1 - to process the neighbor, 0 - to skip it. The filter especially useful for binary image processing, where it removes pixels, which are not surrounded by specified amount of neighbors. It gives ability to remove noisy pixels (stand-alone pixels) or shrink objects.
| Constructor and Description |
|---|
Erosion()
Initialize a new instance of the Erosion class.
|
Erosion(int radius)
Initialize a new instance of the Erosion class.
|
Erosion(int[][] kernel)
Initialize a new instance of the Erosion class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyInPlace(FastBitmap fastBitmap)
Apply filter to an image.
|
public Erosion()
public Erosion(int radius)
radius - Radius.public Erosion(int[][] kernel)
kernel - Kernel.public void applyInPlace(FastBitmap fastBitmap)
IApplyInPlaceapplyInPlace in interface IApplyInPlacefastBitmap - Image to be processed.