public class HitAndMiss extends Object implements ConnectedComponentProcessor, KernelProcessor<Float,FImage>
Modifier and Type | Field and Description |
---|---|
static HitAndMiss |
CONVEX_CORNERS
Hit and miss operator for detecting convex corners
|
protected int |
cx |
protected int |
cy |
protected StructuringElement[] |
elements |
protected Set<Pixel> |
outputPixels |
protected int |
sh |
protected int |
sw |
Constructor and Description |
---|
HitAndMiss(StructuringElement... ses)
Construct a hit and miss operator with the given
structuring elements.
|
Modifier and Type | Method and Description |
---|---|
int |
getKernelHeight()
Get the height of the kernel required by this processor.
|
int |
getKernelWidth()
Get the width of the kernel required by this processor.
|
Set<Pixel> |
getPixels()
Get the pixels selected by the hit and miss operator
|
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.
|
public static final HitAndMiss CONVEX_CORNERS
protected Set<Pixel> outputPixels
protected StructuringElement[] elements
protected int cx
protected int cy
protected int sw
protected int sh
public HitAndMiss(StructuringElement... ses)
ses
- the structuring elementspublic void process(ConnectedComponent cc)
ConnectedComponentProcessor
ConnectedComponent
.process
in interface ConnectedComponentProcessor
cc
- The ConnectedComponent
to process.public Set<Pixel> getPixels()
public int getKernelHeight()
KernelProcessor
getKernelHeight
in interface KernelProcessor<Float,FImage>
public int getKernelWidth()
KernelProcessor
getKernelWidth
in interface KernelProcessor<Float,FImage>
public Float processKernel(FImage patch)
KernelProcessor
processKernel
in interface KernelProcessor<Float,FImage>
patch
- The patch of pixels from the image to process