net.sourceforge.javaocr.plugin.cluster.extractor
Class FreeSpacesExtractor
java.lang.Object
net.sourceforge.javaocr.filter.AbstractSinglePixelFilter
net.sourceforge.javaocr.plugin.cluster.extractor.FreeSpacesExtractor
- All Implemented Interfaces:
- FeatureExtractor, ImageFilter
public class FreeSpacesExtractor
- extends AbstractSinglePixelFilter
- implements FeatureExtractor
extracts amount of contiguous free spaces in a glyph. As it is basically integer value,
and also pretty stable - some classificators utilizing statistical methods may barf due to zero variance
TODO: I'm not happy with this location - maybe it is best somewhere else
- Author:
- Konstantin Pribluda
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
workingScan
int[] workingScan
spaceCount
int spaceCount
index
int index
free
boolean free
currentSpaceNumber
int currentSpaceNumber
reductionFactor
int reductionFactor
FreeSpacesExtractor
public FreeSpacesExtractor()
getSize
public int getSize()
- Specified by:
getSize in interface FeatureExtractor
extract
public double[] extract(Image image)
- Specified by:
extract in interface FeatureExtractor
process
public void process(Image image)
- prepare image processing
- Specified by:
process in interface ImageFilter- Overrides:
process in class AbstractSinglePixelFilter
- Parameters:
image -
processPixel
protected void processPixel(Image image)
- process single pixel. a lot of voodoo magic emerged from
test driven development - it is correct but not designed
- Specified by:
processPixel in class AbstractSinglePixelFilter
- Parameters:
image -
Copyright © -2012. All Rights Reserved.