Friday, November 13, 2020

Rank Filters




Denoising images is not restricted to linear filters, another family of filters is powerful for such an image enhancement: the Rank Filters.

1. Principle

The rank filters are based on ordering (ranking) the pixel values under the convolution kernel and extracting one of these values depending of the behavior we need.

For example, in this 5x5 8-bit image, the 3x3 kernel centered 

Fig. 1: Example of computation in a rank filter.

One of the most powerful denoising filter in this filters family is the median filter.

2. Median Filter

The median filter is available in ImageJ in Process > Filters > Median...

Fig. 1: Original image

 

In Fig.2, the effects of median filter on various types of noise are presented...

Fig.2: Result of a median filtration. Top row: Image with salt-and-pepper, gaussian (σ = 25), and gaussian (σ = 50) noise. Bottom row: Resulting images after a median filter with a radius of 2.0.

As shown in Fig.2, median filter is the perfect filter for removing salt-and-pepper noise and even for gaussian noise, there is no blurring effect compared to the linear filters (mean, gaussian blur) available in ImageJ.

3. Minimum and Maximum Filters

 Two other rank filters are available in ImageJ: Minimum and Maximum filters extracting after sorting - as their names pointed out - the minimum and maximum values, respectively.

Note: These filters may be used for denoising an image but more generally, they are gray-level equivalent to the erosion and dilation operators of mathematical morphology.

In Wikipedia, you may find several examples of filters in their page about convolution kernels [Link]. 


Thank you for reading.


<<  Previous: Linear Filters Next: Adaptive Filters  >>

3. Other crazybiocomputing posts

Further readings are available in ...
  • Image Enhancement Series  [Link]
  • Image Processing TOC [Link]
  • Wikipedia about Kernel [Link]

No comments:

Post a Comment