net.sourceforge.javaocr.plugin.fir
Class AbstractNeighborhoodFilter

java.lang.Object
  extended by net.sourceforge.javaocr.plugin.fir.AbstractNeighborhoodFilter
All Implemented Interfaces:
ImageFilter
Direct Known Subclasses:
MedianFilter

public abstract class AbstractNeighborhoodFilter
extends Object
implements ImageFilter

Abstract base class for filters operating on pixel neighborhood

Author:
Andrea De Pasquale

Field Summary
private  Image destImage
           
protected  int filterH
           
protected  int filterW
           
private  int sizeB
           
private  int sizeL
           
private  int sizeR
           
private  int sizeT
           
 
Constructor Summary
AbstractNeighborhoodFilter(int width, int height, Image dest)
          Initializes an AbstractNeighborhoodFilter
 
Method Summary
 void process(Image image)
          Chisels out image neighborhood and then calls processNeighborhood()
protected abstract  int processNeighborhood(Image nImage)
          compute pixel value by looking up values in the neighborhood image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filterW

protected int filterW

filterH

protected int filterH

sizeL

private int sizeL

sizeR

private int sizeR

sizeT

private int sizeT

sizeB

private int sizeB

destImage

private Image destImage
Constructor Detail

AbstractNeighborhoodFilter

public AbstractNeighborhoodFilter(int width,
                                  int height,
                                  Image dest)
Initializes an AbstractNeighborhoodFilter

Parameters:
width - Neighborhood width; if even, filter expands to the right only.
height - Neighborhood height; if even, filter expands to the bottom only.
dest - The image to be filled up during processing.
Method Detail

process

public void process(Image image)
Chisels out image neighborhood and then calls processNeighborhood()

Specified by:
process in interface ImageFilter

processNeighborhood

protected abstract int processNeighborhood(Image nImage)
compute pixel value by looking up values in the neighborhood image



Copyright © -2012. All Rights Reserved.