net.sourceforge.javaocr.plugin.morphology
Class DilationFilter

java.lang.Object
  extended by net.sourceforge.javaocr.plugin.morphology.AbstractMorphologyFilter
      extended by net.sourceforge.javaocr.plugin.morphology.DilationFilter
All Implemented Interfaces:
ImageFilter

public class DilationFilter
extends AbstractMorphologyFilter

Apply dilation by structuring element to binarized source image. TODO Works for binarized images only, could be extended to grayscale. The dilation of an image A by a structuring element B can be understood as the locus of the points covered by B when the center of B moves inside A. http://en.wikipedia.org/wiki/Dilation_%28morphology%29

Author:
Andrea De Pasquale

Field Summary
 
Fields inherited from class net.sourceforge.javaocr.plugin.morphology.AbstractMorphologyFilter
destImage, empty, full, seImage, seImageH, seImageW, sizeB, sizeL, sizeR, sizeT
 
Constructor Summary
DilationFilter(Image strElem, Image dest)
          Create a DilationFilter with default values of 255 for the foreground and 0 for the background.
DilationFilter(Image strElem, Image dest, int full, int empty)
          Create a DilationFilter.
 
Method Summary
 void process(Image image)
          Apply dilation to the given image, leaving borders unprocessed.
protected  void processNeighborhood(Image nImage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DilationFilter

public DilationFilter(Image strElem,
                      Image dest)
Create a DilationFilter with default values of 255 for the foreground and 0 for the background.

Parameters:
strElem - Structuring element
dest - Output image

DilationFilter

public DilationFilter(Image strElem,
                      Image dest,
                      int full,
                      int empty)
Create a DilationFilter.

Parameters:
strElem - Structuring element
dest - Output image
full - Foreground value
empty - Background value
Method Detail

process

public void process(Image image)
Apply dilation to the given image, leaving borders unprocessed.

Parameters:
image - Input image

processNeighborhood

protected void processNeighborhood(Image nImage)


Copyright © -2012. All Rights Reserved.