net.sourceforge.javaocr.plugin.moment
Class CentralMomentFilter

java.lang.Object
  extended by net.sourceforge.javaocr.plugin.moment.AbstractMomentFilter
      extended by net.sourceforge.javaocr.plugin.moment.CentralMomentFilter
All Implemented Interfaces:
ImageFilter

public class CentralMomentFilter
extends AbstractMomentFilter

computes central moments of image. see wikipedia or book of your choice about details. needs M10 & M01 to be computed before using it


Field Summary
(package private)  double xMean
           
(package private)  double yMean
           
 
Fields inherited from class net.sourceforge.javaocr.plugin.moment.AbstractMomentFilter
coeffx, coeffy, moment, p, q
 
Constructor Summary
CentralMomentFilter(int p, int q, double xMean, double yMean)
           
 
Method Summary
 double normalise(double m00)
          normalise, not sure whether this has be done here...
protected  double[] precomputeX(Image image)
          precompute x coefficient array
protected  double[] precomputeY(Image image)
          precompute y coefficients array
 
Methods inherited from class net.sourceforge.javaocr.plugin.moment.AbstractMomentFilter
getMoment, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xMean

double xMean

yMean

double yMean
Constructor Detail

CentralMomentFilter

public CentralMomentFilter(int p,
                           int q,
                           double xMean,
                           double yMean)
Parameters:
p - order of x
q - order of y
xMean - M10
yMean - M01
Method Detail

precomputeX

protected double[] precomputeX(Image image)
Description copied from class: AbstractMomentFilter
precompute x coefficient array

Specified by:
precomputeX in class AbstractMomentFilter

precomputeY

protected double[] precomputeY(Image image)
Description copied from class: AbstractMomentFilter
precompute y coefficients array

Specified by:
precomputeY in class AbstractMomentFilter

normalise

public double normalise(double m00)
normalise, not sure whether this has be done here...

Parameters:
m00 -
Returns:
normalised moment value


Copyright © -2012. All Rights Reserved.