Chapter 5 MODIFIED FUZZY BASIS FUNCTION AND

Chapter 5
Chapter 5
MODIFIED FUZZY BASIS FUNCTION AND
FUNCTION APPROXIMATION
5.1 Introduction
In this chapter a Modified Fuzzy Basis Function (MFBF) is
developed. This MFBF is used to reduce the Gaussian noise from an
image signal. The fuzzy rule converts the membership function in to a
closed and bounded space. In that space the topological properties
necessary for approximation mentioned earlier, are satisfied.
The
studies in [18] ensure the effectiveness of fuzzy techniques in image
noise reduction. An experimental study in connection with our work
shows that the designed MFBF can be used more effectively to reduce
noise from an image signal, so that the noisy image approximate to the
original image. RGB colour space is used as the basic colour space.
89
Chapter 5
Colours in RGB space are represented by a 3-D vector with first
element being red, second being green and third being blue
respectively. A colour image C represented by a 2-D array of vectors
where
(i, j ) = xi , j
defines a position in C called pixel and
Ci , j ,1 = xi , j ,1 , Ci , j , 2 = xi , j , 2 and Ci , j ,3 = xi , j ,3 denotes the red, green and blue
components respectively of C. The FBF Φ i, j is defined and using it
this we have proved that g ( x∗ ) = yi , j , ∀i, j for n = 1 and n ≥ 2 . For
MFBF the distance measure in colour space and weight in noise
reduction is defined. The newly designed fuzzy filter is given by
N
gi , j =
N
∑ ∑Φ
k ,l
k =− N l =− N
N
N
( xi , j ) xi − k , j − l
∑ ∑Φ
k =− N l =− N
,
k ,l
( xi , j )
Here Φ k ,l is the product of membership functions.
5.2 Some Definitions
5.2.1 Definition (Distance measure in colour space)
Let d be the Euclidian distance, RG-red green, NRG- Neighbour
Red green.
90
Chapter 5
Let RG = ( xi , j ,1 , xi , j , 2 ) and NRG = ( xi+k , j +l ,1 , xi+k , j +l , 2 ) . Then
d ( RG, NRG ) =
(x
i + k , j + l ,1
− xi , j ,1 ) + ( xi + k , j + l ,2 − xi , j ,2 )
2
2
5.2.2 Definition (Weight in fuzzy noise reduction) [7]
The weight function is defined the product of the membership
functions. That is,
Weight = Ai , j ( Dist ( RG, NRG )) × Ai , j ( Dist (RB, NRB ))
= min[ Dist ( RG, NRG )), Dist (RB, NRB )]
5.2.3 Remark
In the fuzzy filter developed in this chapter, the distance
between two pixel positions are taken as the input vector. Small, large,
very large, etc are taken as the linguistic variables. Here Φ k ,l is
considerd as the weight to transform the input distance function to the
centroid output space yi , j . The concept of fuzzy basis functions is
related with the membership functions [5, 32]. The designed Modified
Fuzzy Basis Function (MFBF) facilitates faster approximation when
compared to other available filters.
91
Chapter 5
5.2.4 Example (Gaussian Fuzzy Basis Function for MISO FLS) [12]
The Gaussian Fuzzy Basis Function (GFBF) can be expressed as
⎛ x−x 2 ⎞
i, j
⎟
z j exp⎜⎜ −
∑
2
2σ i , j ⎟⎟
⎜
i =1
∗
⎠
⎝
gi, j ( x ) =
2
⎛ x−x
⎞
M
i, j
⎜−
⎟
exp
∑
2
⎜
2σ i , j ⎟⎟
⎜
i =1
⎝
⎠
M
where xi , j , σ i , j , z j
, j = 1,2,......., n, i1 , i2 ,......., in ∈ I are parameters [1].
This can also be expressed as
m
(
g i , j ( x∗ ) = ∑ z j Φ x − xi , j
i =1
)
where
(
Φ x − xi , j
)
⎛ x−x 2⎞
i, j
⎜
⎟
exp⎜ −
2
⎜
2σ i , j ⎟⎟
⎝
⎠
=
⎛ x−x 2⎞
M
i, j
⎟
exp⎜⎜ −
2
∑
⎜
2σ i , j ⎟⎟
i =1
⎝
⎠
5.2.5 Theorem [Necessary condition][47]
Let
Ω = [B, D ]
be the universe of discourse and let
Φ i ( x, , ai , bi , p i , qi ) be a family of triangular functions such that
B = C , C i ≤ ai +1 ≤ C i +1 , ∀i = 1,2,.......N − 1
and
D = CN
where
92
Chapter 5
p i bi + qi ai
. For two dimensional combinations of three colours
pi + qi
case Φ i is taken as the approximation of triangular or Gaussian
Ci =
membership function and satisfies the following conditions:
(i )(. Φ i )1≤i≤n are combination of triangular or Gaussian shaped.
(ii )(. Φ i )1≤i ≤ n are normal and complete
(iii )(. Φ i )1≤i≤n are consistent in the universe of discourse
(iv ).Φ1 < Φ 2 < ........ < Φ n
By the interpolation problem defined in [5], we apply this in the
image denoising process.
5.3 Modified membership function and approximation
property
5.3.1 Definition (Centroid defuzzifier)
The centroid defuzzifier is defined as
N
g ( x∗ ) =
∑xΦ
i =1
N
i
∑Φ
j =1
j
( x∗ )
,
∗
j
(x )
where, x∗ is the input vector of the FLF.
93
Chapter 5
5.3.2 Remark
In this study the Gaussian noise is reduced from an image
signal. The fuzzy rule is created with distance between colour
components and its neighbour in an RGB colour space. These three
constitute a triangular space, so that the topology and the related
results can be applied here. The modified fuzzy filter is defined as
n
g (xi , j ) =
m
∑∑ x
i − k , j −l
i =1 j =1
n m
∑∑ Φ
i =1 j =1
Φ i , j ( xi , j )
i − k , j −l
( xi , j )
where Φ i, j is the product of the membership function (weight
function) and the distance function. The maximum weight is equal to
unity if the distance between colour pixel and its neighbouring pixel is
small. This can be brought to triangular form. The Modified Fuzzy
Basis Function is
Φ ( xi , j ) =
Φ i − k , j − l ( xi , j )
n
m
∑∑ Φ
i =1 j =1
i − k , j −l
.
( xi , j )
94
Chapter 5
Therefore
g (x ) = ∑∑ x
m
i, j
n
i =1 j = 1
i − k , j −l
Φ ( xi , j )
This is a convex linear combination of fuzzy basis functions. In
this work we take x∗ = xi , j as colour pair and its neighbour. So Φ j ( x∗ )
is changed in to Φ i , j ( xi , j ) .In the approximation studies, it is observed
that when j = k , the rule in which the distance is small. So the product
of the membership function or weight is unity. Here Φ i , j = Φ i ,k
and Φ i , j ( xi , j ) = Φ i ,k ( xi ,k ) = 1 , and if j ≠ k then Φ i , j ( xi ,k ) = 0 . This shows
that the membership space is normalized. According to lemma 4.3.3
the FBF is closed and bounded.
Here we can define the fuzzy
topology and by the results in chapter IV, the modifications can be
made in membership functions. So in this space the approximation of
functions can be done and the noise in an image can be reduced by
introducing the Modified Fuzzy Membership Function (MFBF).
95
Chapter 5
The following interpolation property shows the approximation
property of MFBF in the image denoising process.
5.3.3 Interpolation property
If f be a continuous function defined on a compact subset Ω
such that f ( xi , j ) = y i , j , i = 1,2,..., n, j = 1,2,......, m , then there exists
modified fuzzy basis function modelled by the fuzzy logic filter
gi , j such that g ( xi , j ) = xi − j , k − l , ∀i, k
Proof
Case (i) When n = 1 . The RGB space is used as the basic colour
space. Colours in RGB space are represented by a 3-D vector with
first element being red, second being green and third being blue
respectively. A colour image C can be represented by a 2-D array of
vectors where (i, k ) = xi , k defines a position in C is called pixel and
Ci , k ,1 = xi , k ,1 , Ci , k , 2 = xi , k , 2 and Ci , k ,3 = xi , k ,3 denotes the red, green and blue
respectively components of C. That is, xi , k ∈ Ci , k and assume that for
j = k the distance is small. At this point the weight function is unity.
96
Chapter 5
Let xi − j , k − l , xi + j , k + l are elements of the colour components of Ci ,k , 2 and
Ci ,k ,3 respectively.
Then
define
the
distance
function
as
xi− j ,k −l = xi ,k − d i , xi+ j ,k +l = d i − xi ,k
Φ i , j ( xi , j ) =
(x
i + j ,k +l
2
( xi ,k − xi − j ,k −l )( xi ,k + xi + j ,k +l )
2
− xi − j , k − l )
=1, if the distance function and the two colour components
involves in the same pixel. Then
g (xi , j ) = ∑∑ xi − j , k − l Φ ( xi , j )
n
m
i =1 j =1
satisfies
g ( xi , j ) = xi − j ,k −l , ∀i = 1, 2,...., n, j = 1, 2...., m
Case (ii) When n ≥ 2
Let x∗j = (x1k , x2 k ,......, xnk ),1 ≤ k ≤ m be M distinct vectors of R n .
For each xi , j define the one dimensional function Φ i, j satisfying
i) If xi , j = xi , k (i.e. j = k ) then Φ i , j = Φ i , k and
Φ i , j ( xi , j ) = Φ i ,k ( xi ,k ) = 1 g ( xi , j ) = xi − j , k − l ∀i = 1,2,...., n, k = 1,2...., m
97
Chapter 5
ii) If xi , j ≠ xi , k (i.e. j ≠ k ) then Φ i , j ( xi , k ) = 0
n
Let Φ j (x ) = ∏Φi, j (xi,k ),∀x∗ = (x1, x2 ,....,xn ) ∈ Rn
∗
i=1
Then Φ j ( x ∗j ) = 1 and Φ j ( x k∗ ) = 0, ∀k ≠ j .
The fuzzy logic system modelled by
( )
n
m
g x∗ = ∑∑ xi − j , k − l Φ ( x∗ )
i =1 j =1
satisfies g ( x∗ ) = xi − j , k − l , ∀i, j
As we have defined in chapter I, the FLS is a decision making
logic which employs fuzzy rules from the fuzzy rule base to determine
a mapping from the fuzzy sets in the input space to the fuzzy sets in
the output space. The defuzzifier performs a mapping from the fuzzy
sets in the output space to the crisp points in the output space. In
general for the better approximation of the images the centroid
defuzzifier (also called center-average defuzzifier) is used and which
maps the fuzzy set Φ j ( x∗ ) in the output space to the crisp point.
98
Chapter 5
5.4 Modified Fuzzy Basis Function for Different Rules
The function approximation is done using fuzzy rules extracted
from partitioned numerical data [57, 58]. In our work the RGB colour
space is partitioned in to small distances such that for the function
approximation we can apply MFBF in RGB space also.
5.4.1 Example
For the red component of RGB colour space, the modified output is
K
gi , j ,1 =
K
∑ ∑Φ
k =−K i=−K
K
i + k , j + l ,1
( xi , j ,1 ) xi + k , j + l ,1
K
∑ ∑Φ
k =−K k =−K
i + k , j + l ,1
( xi , j ,1 )
From gi , j ,1 ,the MFBF for red colour component can be found out.
5.4.2 Modified Fuzzy Basis Function ( Φ k ,l ) for Simple rule.
Consider the following rule as
“If d ( RB, NRB ) is small then Φ k ,l is large (i.e. 1)”, else Φ k ,l is
close to zero, where distance between RB and NRB is denote as
xi. j − xi − k , j − l .
99
Chapter 5
According to fuzzy set theory, the value Φ k ,l can be estimated
from the membership function in the figure shown below
Fig. 5.1: Weight for a simple rule
According to [58], the non linear function Φ k ,l can be
approximated as a step like function in the following figure.
Fig. 5.2: Approximation of weight function.
100
Chapter 5
In this case the output of the fuzzy filter is represented as
n
gi , j =
n
∑ ∑Φ
k ,l
k =−n l =−n
n
n
( xi , j ) xi − k , j − l
∑ ∑Φ
k =−n l =−n
,
k ,l
( xi , j )
When the image signal is flat or contains just smooth vertices
the FLS is effective to remove random noise in that case Φ k ,l = 1, ∀k , l .
As an image signal usually contains large amplitude or steep changes
such as edges the fuzzy filter Φ k ,l = 1 makes the image blurred when it
is applied to noise removal. For smoothness of edge the weight must
get the values Φ k ,l = 1, k = l = 0 and =0, otherwise.
In these
circumferences the noise is unable to smooth well so that the value of
the weight
Φ k ,l should be controlled according to the local
characteristics of the signal. If the pixel xi − k , j −l belongs to the same flat
areas of the pixel xi , j ,the weight wk ,l must get a value of 1 and if there
is an edge between these two pixels the weight must take the value 0.
The amplitude of the signal difference xi. j − xi−k , j −l and xi+k . j +l − xi , j can
101
Chapter 5
be applied to separate these two states. If xi. j − xi − k , j − l and xi+k . j +l − xi , j
is small then xi − k , j − l and xi + k , j + l are assumed in the same flat area
(here Φ k ,l = 1 ) .If not they are assumed in different flat area ( wk ,l = 0) .
5.4.3 Remark
The gradient method gives the optimal value for a parameter
which minimizes certain cost function or error function by iteration
[62]. In the gradient method, a parameter is updated by subtracting a
value which is proportional to the gradient of the cost function. So by
Gradient method,
S k (n + 1) = S k (n) − α
where
S k (n)
is the value
∂E
( n)
∂Φ k
S k ( S k is the height of the k th step of the
step like function) at time point n, α is a small positive coefficient
and E is the mean square error.
102
Chapter 5
5.4.4 Φ k ,l for multiple rule antecedents
Let the input image signal at the pixel (i, j ) be indicated as
xi , j and the corresponding output be yi , j .Also denote the set of input
signals around xi , j as xi − k , j − l ,−n ≤ k ≤ n,−n ≤ l ≤ n .
Consider the following rule If xi. j − xi−k , j −l and xi+k . j +l − xi , j are
small then Φ k ,l is large
otherwise Φ k ,l close to 0. Then
the
membership function small has been modified which incorporates a
two sided composite of two different Gaussian curve.
Fig. 5.4: A form of a weight function for multiple rule antecedents.
103
Chapter 5
5.4.5 Gradient Method for multiple rule antecedents [13, 58]
Assume that the height of the qth step of the step like function
is indicated as S q , the output of the signal has the expression
Q
gi , j =
N
N
∑ ∑ ∑Φ
q =1 k = − N l = − N
Q
N
N
klq
( xi , j ) S q xi − k , j − l
∑ ∑ ∑Φ
i =1 k = − N l = − N
(1)
klq
( xi , j ) S q
where
Φ klq
1, if | x(i, j ) − x(i − k , j − l | is included in the q th region
=
0, other wise
If d (i, j ) = fi , j expresses the desired output signals for the pixel
(i, j ) then the mean square error is given by the mean of
[ y(i, j ) − f (i, j )]2 or
gi , j − fi , j
2
When α small enough, the mean square error is
E = gi , j − fi , j
2
When the weight is denoted as non linear function of
x(i, j ) − x(i − k , j − l ) ,
104
Chapter 5
the mean square error is defined as
⎤
⎡ Q K K
⎥
⎢ ∑ ∑ ∑ Φ klq ( xi , j ) S q xi − k , j − l
q =1 k = − K l = − K
⎢
E=
− fi , j ⎥
3
K
K
⎥
⎢
⎥
⎢ ∑ ∑ ∑ Φ klq ( xi , j ) S q
⎦
⎣ c =1 k = − K l = − K
2
(2)
Or
⎡ 3 K K
⎤
⎢ ∑ ∑ ∑ Φ klq ( xi , j ) S q xi − k , j − l
⎥
E = ⎢ c =1 k = − K l = − K
− fi , j ⎥
D
⎢
⎥
⎢⎣
⎥⎦
2
where
Q
D=∑
K
L
∑ ∑Φ
q =1 k = − K l = − L
klq
( xi , j ) S q
Using (1) and (2) we find
Q
N
N
⎛
⎞g −f
∂E
= 2⎜⎜ ∑ xi − k , j − l D − N (q ).∑ ∑ ∑ Φ klq ( xi , j ) S q xi − k , j − l ⎟⎟. i , j 2 i , j
∂S q
D
q =1 k = − N l = − N
⎝ ( k ,l )∈Q ( q )
⎠
⎛
⎞g −f
= 2⎜⎜ ∑ xi − k , j − l D − N (q ).D.g i , j ⎟⎟. i , j 2 i , j
D
⎝ ( k ,l )∈Q ( q )
⎠
⎛
⎞ g − fi , j
= 2⎜⎜ ∑ xi − k , j − l − N (q ).g i , j ⎟⎟. i , j
D
⎝ ( k ,l )∈Q ( q )
⎠
105
Chapter 5
Here Q(q) is the set of (k , l ) for which x(i, j ) − x(i − k , j − l ) is
included in the
members of
q th region of the step like functions. N (q) is the number of
Q(q) and the parameter
x(i, j ) − x(i − k , j − l ) is included in the
wklq takes a value of 1 if
q th region and the parameter has
a value of 0 if it is not. Therefore wq can be given by
⎛
⎞ y (i, j ) − d (i, j )
S q (n + 1) = S q (n) + β ⎜⎜ ∑ xi − k , j − l − N (q) g i , j ⎟⎟
D
⎝ ( k ,l )∈Q (q )
⎠
where β = 2α . The training is performed till the value S q converges for all
q [2].
That is as β → 0 , S q (n + 1) and S q (n) belongs to the q th region
where the basis function will have the value 1.
5.5 Observation
In a fuzzy system with membership functions of product t -norm, for any
given continuous function f in the compact domain Ω , there exists a fuzzy
modified fuzzy basis function gi , j of g such that gi , j − f < ε . This MFBF
extended to RGB colour space such that g ( xi + k , j +l ,C ) − f ( xi + k , j +l ,C ) < ε . Then
106
Chapter 5
the Fuzzy gradient method is applied for simple and multiple antecedents such
that the error can be minimized. Hence the approximation of weight function as a
step like function is obtained.
5.5.1 Remark
For unsharp edges in multiple rule antecedents the weight function
turns into 3D function Φ(dij , tk ,l ,σ i , j ) [61],
where dij =
3D
(x
i, j
− xi − k , j − l ) + (xi + k , j + l − xi , j ) , tk ,l = k 2 + l 2 (x-axis of the
space), σ i , j is
2
the
2
local
variance
around
the
pixel
(i, j ) = xi , j approaching the weight as a step function Φ (dij , tk ,l ,σ i , j ) (see
the figure shown below).According to [19,61] this can be denoted as
Φ pqr when d ij in the p th region,
tk ,l in the q th region and σ i, j in the
r th region. The approximation of FLF can be done only if the weight is
one when d ij is in the p th region, the other two colour components
being in the other two regions respectively. Otherwise the weight is
equal to zero.
107
Chapter 5
5.6 Peak Signal Noise Ratio (PSNR) [50, 51]
PSNR is a measure and it is useful to show that the fuzzy basis
function and modified fuzzy basis function is better than any other
basis functions. By using PSNR the mean square error (MSE) between
the original image and the filtered image can be found out.
5.6.1 Definition [PSNR and Mean Square]
The PSNR in an RGB colour space is defined as
PSNR[ g (i, j , c) − f (i, j , c)] = 10 log10 [ S 2 / MSE ( g (i, j , c) − f (i, j , c)]
where MSE is the mean square error and
∑∑∑ [g
3
MSE[ g i , j ,C − f i , j ,C ] =
N
M
c =1 i =1 j =1
i , j ,C
− f i , j ,C
]
2
3.N .M
Here f (i, j, c) is the desired colour image and g (i, j, c) is the
filtered colour image of size N.M (c = 1,2,3 corresponding to the
colours red, green and blue respectively).
5.6.2 Remark
From the figurers 5.5 to 5.7 it is clear that the image using MFBF is
more close to the original image. Also table 5.1 and figure 5.8 show that
noise removal is high when the MFBF is used.
108
Chapter 5
(a)
(b) PSNR = 22.10
(c) PSNR = 26.57
(d) PSNR = 27.66
(e) PSNR =28.38
(f) PSNR = 29.33
(a)
(b) PSNR = 18.59
(c) PSNR = 24.63
(d) PSNR = 24.73
(e) PSNR =25.16
(f) PSNR = 25.79
Fig. 5.6: (a) Original Peppers image (256×256) (b) Noisy image (Gaussian noise,
σ = 30) (c) After applying Mean filter (3×3 window) (d) After applying
Median filter (5×5 window) (e) After applying FBF of [24] with
K=3 (7×7 window) and L=2 (5×5 window) (f) MFBF with K=3 (7×7
window) and L=2 (5×5 window)
109
Chapter 5
(a)
(b) PSNR = 16.10
(c) PSNR = 22.03
(d) PSNR = 21.52
(e) PSNR =22.75
(f) PSNR = 23.61
Fig. 5.7: (a) Original Gantry crane image (400×264) (b) Noisy image
(Gaussian noise, σ = 40) (c) After applying Mean filter
(3×3 window) (d) After applying Median filter (3×3
window) (e) After applying FBF [24] with K=3 (7×7
window) and L=2 (5×5 window) (f) After applying
Proposed Fuzzy filter with K=3 (7×7 window) and L=2
(5×5 window)
Table 5.1 Results in PSNR of different noise removal methods.
PSNR (dB)
σ=5
σ = 10
σ = 20
σ = 30
σ = 40
Noisy
34.13
28.12
22.10
18.57
16.08
Mean
28.05
27.70
26.57
25.13
23.72
Median
32.31
30.81
27.66
25.02
22.95
FLF Method
34.12
31.79
28.38
25.85
23.76
MFBF Method
34.22
32.77
29.33
26.51
24.18
110
Chapter 5
Fig. 5.8: For restored image PSNR value decreasing slowly and
approximating to step like function for small distance
111