public class Erode extends Object implements ConnectedComponentProcessor, KernelProcessor<Float,FImage>
MinFilter for greyscale erosion.| Modifier and Type | Field and Description |
|---|---|
protected int |
cx |
protected int |
cy |
protected StructuringElement |
element |
protected int |
sh |
protected int |
sw |
| Constructor and Description |
|---|
Erode()
Construct the erode operator with a BOX structuring element
|
Erode(StructuringElement se)
Construct the erode operator with the given structuring element
|
| Modifier and Type | Method and Description |
|---|---|
static void |
erode(FImage img,
int times)
Apply erosion some number of times to an image with the default
StructuringElement.BOX element |
int |
getKernelHeight()
Get the height of the kernel required by this processor.
|
int |
getKernelWidth()
Get the width of the kernel required by this processor.
|
void |
process(ConnectedComponent cc)
Perform an operation on the given
ConnectedComponent. |
Float |
processKernel(FImage patch)
Process the patch with this kernel processor and return a value
that will be used to build the convolved image.
|
protected StructuringElement element
protected int cx
protected int cy
protected int sw
protected int sh
public Erode(StructuringElement se)
se - the structuring elementpublic Erode()
public void process(ConnectedComponent cc)
ConnectedComponentProcessorConnectedComponent.process in interface ConnectedComponentProcessorcc - The ConnectedComponent to process.public int getKernelHeight()
KernelProcessorgetKernelHeight in interface KernelProcessor<Float,FImage>public int getKernelWidth()
KernelProcessorgetKernelWidth in interface KernelProcessor<Float,FImage>public Float processKernel(FImage patch)
KernelProcessorprocessKernel in interface KernelProcessor<Float,FImage>patch - The patch of pixels from the image to processpublic static void erode(FImage img, int times)
StructuringElement.BOX elementimg - the imagetimes - the number of times to apply the erosion