net.sourceforge.javaocr.filter
Class AbstractIntegralImageFilter

java.lang.Object
  extended by net.sourceforge.javaocr.filter.AbstractIntegralImageFilter
All Implemented Interfaces:
ImageFilter
Direct Known Subclasses:
IntegralImageFilter, SquaredIntergalImageFilter

public abstract class AbstractIntegralImageFilter
extends Object
implements ImageFilter


Field Summary
(package private)  Image empty
           
(package private)  Image resultImage
           
 
Constructor Summary
AbstractIntegralImageFilter(Image resultImage)
           
 
Method Summary
 void process(Image image)
          process image.
protected abstract  int processPixel(int i)
           
 int windowValue(int left, int top, int right, int bottom)
          compute sum of pixels in defined window, all borders are inclusive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resultImage

Image resultImage

empty

Image empty
Constructor Detail

AbstractIntegralImageFilter

public AbstractIntegralImageFilter(Image resultImage)
Method Detail

process

public void process(Image image)
process image. size of image under process and configured destination image must match - it is up to caller to ensure format compatibility (otherwise be prepared to receive lots of garbled images and IOOB exceptions)

Specified by:
process in interface ImageFilter
Parameters:
image - image to be processed

processPixel

protected abstract int processPixel(int i)

windowValue

public int windowValue(int left,
                       int top,
                       int right,
                       int bottom)
compute sum of pixels in defined window, all borders are inclusive

Returns:
sum of pixels in defined window


Copyright © -2012. All Rights Reserved.