net.sf.javaocr.demos.android.utils.image
Class SauvolaImageProcessor
java.lang.Object
net.sf.javaocr.demos.android.utils.image.SauvolaImageProcessor
- All Implemented Interfaces:
- ImageProcessor
public class SauvolaImageProcessor
- extends Object
- implements ImageProcessor
process image with median and Sauvola filter.
image supplied for processing shall be of sufficient size to accomodate
image region specified on creation
- Author:
- Konstantin Pribluda
|
Constructor Summary |
SauvolaImageProcessor(int arrayWidth,
int arrayHeight,
int w,
int h,
int above,
int below)
create image processor working over region of supplied image. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAUVOLA_WINDOW
public static final int SAUVOLA_WINDOW
- See Also:
- Constant Field Values
MEDIAN_WINDOW
public static final int MEDIAN_WINDOW
- See Also:
- Constant Field Values
SAUVOLA_WEIGHT
private static final double SAUVOLA_WEIGHT
- See Also:
- Constant Field Values
w
final int w
h
final int h
arrayWidth
final int arrayWidth
arrayHeight
final int arrayHeight
processImage
PixelImage processImage
returnImage
PixelImage returnImage
sauvolaBinarisationFilter
private SauvolaBinarisationFilter sauvolaBinarisationFilter
SauvolaImageProcessor
public SauvolaImageProcessor(int arrayWidth,
int arrayHeight,
int w,
int h,
int above,
int below)
- create image processor working over region of supplied image.
take care in specifying offsets - window size applies to them
- Parameters:
w - width of region of interesth - height of region of interestabove - value for pixels above thresholdbelow - value for pixels below threshold
prepareImage
public PixelImage prepareImage(byte[] image,
int offsetX,
int offsetY)
- process incoming image
- Specified by:
prepareImage in interface ImageProcessor
- Parameters:
image - incoming image. may be modifiedoffsetX - region of interest offset. this data is not available at creation timeoffsetY - region of interest offset. this data is not available at creation time
- Returns:
- processed image
Copyright © -2012. All Rights Reserved.