net.sourceforge.javaocr.plugin.morphology
Class ClosingFilter
java.lang.Object
net.sourceforge.javaocr.plugin.morphology.ClosingFilter
- All Implemented Interfaces:
- ImageFilter
public class ClosingFilter
- extends Object
- implements ImageFilter
Apply closing by structuring element to binarized source image.
TODO Works for binarized images only, could be extended to grayscale.
The closing of an image A by a structuring element B is obtained by the
dilation of A by B, followed by erosion of the resulting structure by B.
http://en.wikipedia.org/wiki/Closing_(morphology)
- Author:
- Andrea De Pasquale
|
Constructor Summary |
ClosingFilter(Image strElem,
Image dest)
Create a ClosingFilter with default values
of 255 for the foreground and 0 for the background. |
ClosingFilter(Image strElem,
Image dest,
int full,
int empty)
Create a ClosingFilter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dilationFilter
protected DilationFilter dilationFilter
tempImage
protected Image tempImage
erosionFilter
protected ErosionFilter erosionFilter
destImage
protected Image destImage
ClosingFilter
public ClosingFilter(Image strElem,
Image dest)
- Create a
ClosingFilter with default values
of 255 for the foreground and 0 for the background.
- Parameters:
strElem - Structuring elementdest - Output image
ClosingFilter
public ClosingFilter(Image strElem,
Image dest,
int full,
int empty)
- Create a
ClosingFilter.
- Parameters:
strElem - Structuring elementdest - Output imagefull - Foreground valueempty - Background value
process
public void process(Image image)
- Specified by:
process in interface ImageFilter
Copyright © -2012. All Rights Reserved.