net.sourceforge.javaocr.filter
Class SauvolaBinarisationFilter
java.lang.Object
net.sourceforge.javaocr.filter.MedianFilter
net.sourceforge.javaocr.filter.SauvolaBinarisationFilter
- All Implemented Interfaces:
- ImageFilter
public class SauvolaBinarisationFilter
- extends MedianFilter
Performs local image threshloding with Sauvola algorithm.
allocates integral images to achieve O(N) performance instead ow O(N2W2).
This filter allocates working images and can be reused with destination image of same size.
Please note, that window/2 pixels on borders of image are invalid. It is responsibility of caller
to provide suitable padding.
Based on "Efficient Implementation of Local Adaptive Thresholding Techniques Using Integral Images" by
Faisal Shafait , Daniel Keysers , Thomas M. Breuel from Image Understanding and Pattern Recognition (IUPR) Research Group
German Research Center for Artificial Intelligence (DFKI) GmbH
D-67663 Kaiserslautern, Germany
and Thomas M. Breuel from Department of Computer Science, Technical University of Kaiserslautern
D-67663 Kaiserslautern, Germany
- Author:
- Konstantin Pribluda
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
above
protected final int above
below
protected final int below
range
protected final int range
weight
protected final double weight
squaredIntergalImageFilter
private SquaredIntergalImageFilter squaredIntergalImageFilter
squaresImage
private Image squaresImage
SauvolaBinarisationFilter
public SauvolaBinarisationFilter(int above,
int below,
Image destination,
int maxValue,
double weight,
int window)
- Parameters:
above - value to use for pixels above thresholdbelow - value to use for pixels below thresholddestination - destination imagemaxValue - maxValue of intensity valuesweight - weight of variance term (determines relation of threshold to local mean)window - computing Window size
process
public void process(Image image)
- traversal will be done by median filter, actual processing delegated
to derived method
- Specified by:
process in interface ImageFilter- Overrides:
process in class MedianFilter
- Parameters:
image -
computePixel
protected int computePixel(Image image,
int y,
int x)
- Description copied from class:
MedianFilter
- compute median pixel value
- Overrides:
computePixel in class MedianFilter
retrievePixel
protected int retrievePixel(Image image,
int y,
int x)
getAbove
public int getAbove()
getBelow
public int getBelow()
getRange
public int getRange()
getWeight
public double getWeight()
getSquaredIntergalImageFilter
public SquaredIntergalImageFilter getSquaredIntergalImageFilter()
Copyright © -2012. All Rights Reserved.