Fuzzy filters

Noise reduction in images is one of the common tasks in image processing. I present several fuzzy filters using fuzzy logic concept. There are several symmetrical and asymmetrical triangular membership functions with both median and moving average centre used for filtering impulse and random noise.

On the left is the image with random noise. In turn, on the right with 'salt and pepper' noise. In presented simulations, I used 8-bit mono images of dimension (M\times N) ((512\times512)) pixels with added impulse noise with density value 0.02. For Gaussian I used the following settings: mean = 0, \delta = 0.05.

secret_garden_noise_05    secret_garden_noise_002

Gaussian fuzzy filter with median centre (GMED) is defined as:

y_{gmed} \left [ (x(i+s, j+t) \right] = e^-\frac{1}{2} \left [\frac{x(i+s,j+t)-x_{med}(i,j)}{\delta(i,j)} \right ]^2,

-K \le s \le K,\,-K \le t \le K

where x_{med}(i,j) and \delta(i,j) represent respectively, the median value of all the input values x(i+s,j+t).

Here, I present the usage of GMED filter for K=1.

secret_garden_noise_002    gmed_secret_garden_3x3

Symmetrical triangle fuzzy filter  with median centre (TMED) is present below:

y_{tmed} \left [ (x(i+s, j+t) \right] = \left\{\begin{array}{cc}1-\frac{|x(i+s,j+t)-x_{med}(i,j)|}{x_{mm}(i,j)} & \mbox{ for $| x(i+s, j+t)-x_{med}(i,j)| \leq x_{mm}(i,j)$ }\\ 1 & \mbox{for $ x_{mm} = 0 $}\end{array}\right.


where  x_{mm}(i,j) = max [x_{max}(i,j) - x_{med}(i,j), x_{med}(i,j) - x_{min}(i,j)] x_{max}(i,j), x_{min}(i,j) and  x_{med} are respectively the maximum, minimum and median value of all the input values within squared window at indicies  (i,j).

So now, I present the usage of TMED  filter for K=1.

secret_garden_noise_002    tmed_secret_garden_3x3

Asymmetrical triangle fuzzy filter  with median centre (ATMED) is present here:

y_{atmed} \left [ (x(i+s, j+t) \right] = \left\{\begin{array}{cccc}1-\frac{|x_{med}(i,j)-x(i+s,j+t)|}{x_{med}(i,j) - x_{min}(i,j)} & \mbox{ for $x_{min}(i,j) \leq x(i+s,j+t) \leq x_{med}(i,j)$ } \\ 1-\frac{x(i+s,j+t)-x_{med}(i,j)}{x_{max}(i,j)-x_{med}(i,j)} & \mbox{for $x_{med}(i,j) \leq x(i+s,j+t) \leq x_{max}(i,j)$ } \\ 1 & \mbox{for $x_{med}(i,j) - x_{min}(i,j) = 0$ } \\ & \mbox{ or $x_{max}(i,j) - x_{med}(i,j) = 0 $ } \end{array}\right.

Below, a pair of images.  On the left - with noise, on the right with applied ATMED filter.

secret_garden_noise_002    atmed_secret_garden_3x3

Symmetrical triangle fuzzy filter with average centre (TMAV) is present below:

y_{tmav} \left [ (x(i+s, j+t) \right] = \left\{\begin{array}{cc}1-\frac{|x(i+s,j+t)-x_{mav}(i,j)|}{x_{mv}(i,j)} & \mbox{ for $| x(i+s, j+t)-x_{mav}(i,j)| \leq x_{mv}(i,j)$ }\\ 1 & \mbox{for $ x_{mv} = 0 $}\end{array}\right.

where  x_{mv}(i,j) = max [x_{max}(i,j) - x_{mav}(i,j), x_{mav}(i,j) - x_{min}(i,j)]

x_{max}(i,j), x_{min}(i,j) and  x_{mav} are respectively the maximum, minimum and average value of all the input values within squared window at indicies  (i,j).

Here, I present the usage of TMAV filter for K=1.

secret_garden_noise_05    tmav_secret_garden_3x3
Asymmetrical triangle fuzzy filter  with moving average centre (ATMAV) is present here:

y_{atmav} \left [ (x(i+s, j+t) \right] = \left\{\begin{array}{cccc}1-\frac{|x(i+s,j+t)-x_{mav}(i,j)|}{x_{max}(i,j) - x_{mav}(i,j)} & \mbox{ for $x_{mav}(i,j) \leq x(i+s,j+t) \leq x_{max}(i,j)$ } \\ 1-\frac{x_{mav}(i,j)-x(i+s,j+t)}{x_{mav}(i,j)-x_{min}(i,j)} & \mbox{for $x_{min}(i,j) \leq x(i+s,j+ t) \leq x_{mav}(i,j)$ } \\ 1 & \mbox{for $x_{max}(i,j) - x_{mav}(i,j) = 0$ } \\ & \mbox{ or $x_{mav}(i,j) - x_{min}(i,j) = 0 $ } \end{array}\right.


The difference between x_{mav}(i,j)-x_{min}(i,j) and x_{max}(i,j)-x_{mav}(i,j) defines the degree of asymmetry. x_{max}(i,j), x_{min}(i,j) and  x_{mav} are respectively the maximum, minimum and average value of all the input values within squared window at indicies  (i,j).
Below, I show the application of ATMAV filter.
secret_garden_noise_05    atmav_secret_garden_3x3
Decreasing weight fuzzy filter with moving average centre (DWMAV) is present here:

y_{dwmav} \left [ (x(i+s, j+t) \right] = 1-\frac{max(|t|,|s|)}{max(|T|,|S|)+r},

 where  -T \leq t \leq T and  -S \leq s \leq S, and 2T +1 = 2S + 1 = K. K is width of square window,  r is the threshold value and it defines the height of decreasing triangular shape weighted function,  t = |T|, s=|S|, r= 1,2,3.

Finally, I present the usage of DWAM filter for K=1, r=1
secret_garden_noise_05    dwmav_secret_garden_3x3
For more information, I recommend :
1. Mike Nachtegael, Dietrich van der Weken, Dimitri van de Ville and Etienne E. Kerre, Fuzzy filters for image processing, Springer Verlag, 2003
2. Etienne E. Kerre, Mike Nachtegael, Fuzzy Techniques in Image Processing, Springer Verlag, 2001

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>