The ImageFilter module contains definitions for a predefined set of filters, which can be be used with the Image.filter() method.
from PIL import ImageFilter
im1 = im.filter(ImageFilter.BLUR)
im2 = im.filter(ImageFilter.MinFilter(3))
im3 = im.filter(ImageFilter.MinFilter) # same as MinFilter(3)
The current version of the library provides the following set of predefined image enhancement filters:
Gaussian blur filter.
Parameters:  radius – Blur radius. 

Unsharp mask filter.
See Wikipedia’s entry on digital unsharp masking for an explanation of the parameters.
Create a convolution kernel. The current version only supports 3x3 and 5x5 integer and floating point kernels.
In the current version, kernels can only be applied to “L” and “RGB” images.
Parameters: 


Create a rank filter. The rank filter sorts all pixels in a window of the given size, and returns the rank‘th value.
Parameters: 


Create a median filter. Picks the median pixel value in a window with the given size.
Parameters:  size – The kernel size, in pixels. 

Create a min filter. Picks the lowest pixel value in a window with the given size.
Parameters:  size – The kernel size, in pixels. 

Create a max filter. Picks the largest pixel value in a window with the given size.
Parameters:  size – The kernel size, in pixels. 

Create a mode filter. Picks the most frequent pixel value in a box with the given size. Pixel values that occur only once or twice are ignored; if no pixel value occurs more than twice, the original pixel value is preserved.
Parameters:  size – The kernel size, in pixels. 
