net.sourceforge.javaocr.plugin.fir
Class AbstractNeighborhoodFilter
java.lang.Object
net.sourceforge.javaocr.plugin.fir.AbstractNeighborhoodFilter
- All Implemented Interfaces:
- ImageFilter
- Direct Known Subclasses:
- MedianFilter
public abstract class AbstractNeighborhoodFilter
- extends Object
- implements ImageFilter
Abstract base class for filters operating on pixel neighborhood
- Author:
- Andrea De Pasquale
|
Method Summary |
void |
process(Image image)
Chisels out image neighborhood and then calls processNeighborhood() |
protected abstract int |
processNeighborhood(Image nImage)
compute pixel value by looking up values in the neighborhood image |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
filterW
protected int filterW
filterH
protected int filterH
sizeL
private int sizeL
sizeR
private int sizeR
sizeT
private int sizeT
sizeB
private int sizeB
destImage
private Image destImage
AbstractNeighborhoodFilter
public AbstractNeighborhoodFilter(int width,
int height,
Image dest)
- Initializes an
AbstractNeighborhoodFilter
- Parameters:
width - Neighborhood width; if even, filter expands to the right only.height - Neighborhood height; if even, filter expands to the bottom only.dest - The image to be filled up during processing.
process
public void process(Image image)
- Chisels out image neighborhood and then calls
processNeighborhood()
- Specified by:
process in interface ImageFilter
processNeighborhood
protected abstract int processNeighborhood(Image nImage)
- compute pixel value by looking up values in the neighborhood image
Copyright © -2012. All Rights Reserved.