net.sourceforge.javaocr.filter
Class MedianFilter
java.lang.Object
net.sourceforge.javaocr.filter.MedianFilter
- All Implemented Interfaces:
- ImageFilter
- Direct Known Subclasses:
- SauvolaBinarisationFilter
public class MedianFilter
- extends Object
- implements ImageFilter
applies median filter to image (pixel is Mx from his surrounding window)
result is collected in destination image. Pixels outside source image are treated as non
existing. Border pixels are considered invalid, and their treatment is upon user
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
destination
protected final Image destination
halfWindow
protected final int halfWindow
squareWindow
protected final int squareWindow
meanImage
private final PixelImage meanImage
integralImageFilter
protected final IntegralImageFilter integralImageFilter
MedianFilter
public MedianFilter(Image destination,
int window)
- create median filter
- Parameters:
destination - overscan image where result is collected.window - window size, in case of even value will be treated as one less
process
public void process(Image image)
- Description copied from interface:
ImageFilter
- perform image processing possibly overwriting the image with the result
- Specified by:
process in interface ImageFilter
computePixel
protected int computePixel(Image image,
int y,
int x)
- compute median pixel value
getHalfWindow
public int getHalfWindow()
getSquareWindow
public int getSquareWindow()
getIntegralImageFilter
public IntegralImageFilter getIntegralImageFilter()
Copyright © -2012. All Rights Reserved.