public class Dilate extends Object implements ConnectedComponentProcessor, KernelProcessor<Float,FImage>
MaxFilter for greyscale dilation.| Modifier and Type | Field and Description |
|---|---|
protected int |
cx |
protected int |
cy |
protected StructuringElement |
element |
protected int |
sh |
protected int |
sw |
| Constructor and Description |
|---|
Dilate()
Construct the dilate operator with a BOX structuring element
|
Dilate(StructuringElement se)
Construct the dilate operator with the given structuring element
|
| Modifier and Type | Method and Description |
|---|---|
static void |
dilate(FImage img,
int times)
Apply dilation 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 Dilate(StructuringElement se)
se - the structuring elementpublic Dilate()
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 dilate(FImage img, int times)
StructuringElement.BOX elementimg - the imagetimes - the number of times to apply the dilation