net.sourceforge.javaocr.plugin.moment
Class AbstractMomentFilter

java.lang.Object
  extended by net.sourceforge.javaocr.plugin.moment.AbstractMomentFilter
All Implemented Interfaces:
ImageFilter
Direct Known Subclasses:
CentralMomentFilter, RawMomentFilter

public abstract class AbstractMomentFilter
extends Object
implements ImageFilter

base functionality for moment filters (traversal and caching those values for future invocations og filter.


Field Summary
(package private)  double[] coeffx
           
(package private)  double[] coeffy
           
(package private)  double moment
           
(package private)  int p
           
(package private)  int q
           
 
Constructor Summary
AbstractMomentFilter(int p, int q)
           
 
Method Summary
 double getMoment()
           
protected abstract  double[] precomputeX(Image image)
          precompute x coefficient array
protected abstract  double[] precomputeY(Image image)
          precompute y coefficients array
 void process(Image image)
          navigate through while image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

final int p

q

final int q

moment

double moment

coeffx

double[] coeffx

coeffy

double[] coeffy
Constructor Detail

AbstractMomentFilter

public AbstractMomentFilter(int p,
                            int q)
Method Detail

precomputeX

protected abstract double[] precomputeX(Image image)
precompute x coefficient array


precomputeY

protected abstract double[] precomputeY(Image image)
precompute y coefficients array


process

public void process(Image image)
navigate through while image

Specified by:
process in interface ImageFilter
Parameters:
image -

getMoment

public double getMoment()


Copyright © -2012. All Rights Reserved.