Rank filters

Alternative to convolution filtering. These are non-linear techniques, also known as "order statistics" filters. The gray levels in the neighbourhood of a given pixel are sorted. The new value will be the value at a particular position in the list. 

Select one of the filters (min, max, range, median) and the size of the kernel (width & height):