PIL.ImageFilter.MedianFilter()
creates a median filter. Selects the median pixel value in a window with a given size.
Syntax: PIL.ImageFilter.MedianFilter (size = 3) Parameters: size: The kernel size, in pixels.
Image used:
|
Output:
PIL.ImageFilter.ModeFilter()
creates a mode filter. Selects the most common pixel value in the specified field size. Pixel values that occur only once or twice are ignored; if the pixel value does not occur more than twice, the original pixel value is retained.
Syntax: PIL.ImageFilter.ModeFilter (size = 3) Parameters: size: The kernel size, in pixels.
|
Output: