ImageGear v26.5 - Updated
ImageGear.Core Assembly / ImageGear.Processing Namespace / ImGearRasterProcessing Class / FilterWithMedian Method / FilterWithMedian(ImGearRasterPage,Int32,Int32) Method
Image to filter.
Width of the square area.
Height of the square area.
Example




In This Topic
    FilterWithMedian(ImGearRasterPage,Int32,Int32) Method
    In This Topic
    Removes color noise from the image.
    Syntax
    'Declaration
     
    Public Overloads Shared Sub FilterWithMedian( _
       ByVal page As ImGearRasterPage, _
       ByVal neighborhoodWidth As Integer, _
       ByVal neighborhoodHeight As Integer _
    ) 
    'Usage
     
    Dim page As ImGearRasterPage
    Dim neighborhoodWidth As Integer
    Dim neighborhoodHeight As Integer
     
    ImGearRasterProcessing.FilterWithMedian(page, neighborhoodWidth, neighborhoodHeight)
    public static void FilterWithMedian( 
       ImGearRasterPage page,
       int neighborhoodWidth,
       int neighborhoodHeight
    )
    public: static void FilterWithMedian( 
       ImGearRasterPage* page,
       int neighborhoodWidth,
       int neighborhoodHeight
    ) 
    public:
    static void FilterWithMedian( 
       ImGearRasterPage^ page,
       int neighborhoodWidth,
       int neighborhoodHeight
    ) 

    Parameters

    page
    Image to filter.
    neighborhoodWidth
    Width of the square area.
    neighborhoodHeight
    Height of the square area.
    Remarks
    This method looks for an average color value inside the square area near the pixel and replaces the pixel with this value. Processes color channels only.
    Example
    // Changes each pixel to the median of a 3x3 area around the pixel.
    ImGearRasterProcessing.FilterWithMedian(igRasterPage, 3, 3);
    ' Changes each pixel to the median of a 3x3 area around the pixel.
    ImGearRasterProcessing.FilterWithMedian(igRasterPage, 3, 3)
    See Also