Class AdaptiveMedian

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class AdaptiveMedian
    extends Transformer
    This actor performs adaptive median filtering on an image. The algorithm is as follows. For each pixel in the image, a square region of interest is formed with the pixel at the center. If said region can not be formed (because it is at or near the edge). If the median of this region of interest is strictly less than the maximum value in the region of interest and strictly greater than the minimum value in the region of interest, then we keep the pixel if it too is strictly less than the maximum value in the region of interest and strictly greater than the minimum value in the region of interest. If it is not, then use the median of the region of interest instead of the pixel. If the pixel is not strictly less than the maximum value and strictly greater than the minimum value, an attempt is made at using larger region of interest. If successful, then this process is repeated until a value can be determine, or we hit the the maximum window size. If this happens, then the pixel is kept. This process is repeated for each pixel.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    James Yeh, Contributor: Christopher Hylands Brooks
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)