net.sourceforge.javaocr.plugin.morphology
Class ErosionFilter
java.lang.Object
net.sourceforge.javaocr.plugin.morphology.AbstractMorphologyFilter
net.sourceforge.javaocr.plugin.morphology.ErosionFilter
- All Implemented Interfaces:
- ImageFilter
public class ErosionFilter
- extends AbstractMorphologyFilter
Apply erosion by structuring element to binarized source image.
TODO Works for binarized images only, could be extended to grayscale.
The erosion of an image A by a structuring element B can be understood as
the locus of points reached by the center of B when B moves inside A.
http://en.wikipedia.org/wiki/Erosion_(morphology)
- Author:
- Andrea De Pasquale
|
Constructor Summary |
ErosionFilter(Image strElem,
Image dest)
Create an ErosionFilter with default values
of 255 for the foreground and 0 for the background. |
ErosionFilter(Image strElem,
Image dest,
int full,
int empty)
Create an ErosionFilter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ErosionFilter
public ErosionFilter(Image strElem,
Image dest)
- Create an
ErosionFilter with default values
of 255 for the foreground and 0 for the background.
- Parameters:
strElem - Structuring elementdest - Output image
ErosionFilter
public ErosionFilter(Image strElem,
Image dest,
int full,
int empty)
- Create an
ErosionFilter.
- Parameters:
strElem - Structuring elementdest - Output imagefull - Foreground valueempty - Background value
process
public void process(Image image)
- Apply erosion to the given image, leaving borders unprocessed.
- Parameters:
image - Input image
processNeighborhood
protected int processNeighborhood(Image nImage)
Copyright © -2012. All Rights Reserved.