Sie sind auf Seite 1von 17

Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

Chapter 4
Fuzzy Logic
4.1 Introduction

The human brain interprets the sensory information provided by organs. Fuzzy set
theory focus on processing the information. Numerical computation can be performed
using linguistic labels specified by membership functions. Moreover, a selection of
fuzzy if then rules forms the key component of a fuzzy inference system (FIS).Human
expertise in a specific application can be effectively modelled with FIS.
Although the fuzzy inference system has a structured knowledge representation of
fuzzy if then rules, it lacks the adaptability to deal with varying environments. Thus we
incorporate neural network learning concepts in fuzzy inference systems, resulting in
neuro- fuzzy modeling, a pivotal technique in soft computing

4.2 Comparison of Classical set and fuzzy set:


4.2.1 Classical Set
In mathematical operations if we define a set, then the set is collection of items which
belong to specific definition. If we take an example for classical set of items whose
value is less than ten then we can defined it as
A={x | x<5}
Where there is boundary is 5. If a number is less than 5 then it will be part of the set.
The classical sets are very important for mathematics and computer science but it
cannot be useful for certain applications like decision making same as human mind. As
human mind take decisions from certain relative information.
If we take an example for a person, whether the person is tall or not ,to identify this a
mind processing relatively if a person is having height more than average height then
that person will consider as tall. This identification is not possible in classical set. To
define classical set of tall person as A then the members of the set whose height is

34 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

more than 6 feet are considered as tall person then the person whose height is 5 feet
11 inch will be not member of this classical set. The another limitation of classical set
is if a person is having height 6.1 feet and 7.0 feet both will be tall. There will be not
clear identification between both of them. It is the clear distinction between inclusion
and exclusion.
To overcome these situations fuzzy sets are available. The fuzzy set does not have
fixed boundary means an item belongs to particular set or not that process is gradual
and this is smooth transition characterized by fuzzy membership function. The fuzzy
set is important is certain areas like human thinking, especially in the domain of
pattern recognition. The fuzzy set does not mean randomness but it means uncertain
nature of things.

A = {a1, a2, a3......., an}, Here A is a set represented by classical set theory.

ai (i = 1,.....,n) are elements of A forms together a subset of the universal base set X.

The set A can be represented for all elements x X by its characteristic function

1
() = { }
0

() has only two values 0 (``false'') and 1 (``true'') according to the classical set
theory . These type of sets are called crisp sets too. Fuzzy sets are called Non Crisp
Sets. Characteristic function can be defined for fuzzy sets. Such function is a
generalization of that in equation and termed as membership function. To define
members in fuzzy set membership functions are used. The membership function
described the membership of fuzzy set.

35 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

Here membership function () of A which relate to each element xo = X a grade of


membership A (xo).

Unlike classical set theory the normalized closed interval [0,1] describes the
membership functions A(x) values. Therefore, each membership function maps
elements of a given universal base set X which is itself a crisp set, into real numbers in
[0,1].
The membership function, A(x) notation for fuzzy set A can be described as

A : X [0,1]

Each fuzzy set is completely and uniquely defined by one particular membership
function. Consequently symbols of membership functions are also used as labels of
the associated fuzzy sets, such as big, small and others. The differences in the crisp
and fuzzy sets. [19]

Figure 4.1: Crisp set and a fuzzy set membership functions

The classical set crisp boundary is used so there is no uncertainty in the boundaries of
classical set. There are many examples of classical sets like, set of integer numbers
from 1 to 10. If we refer it as universe number then the cardinal number means total

36 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

number of elements in universe set which represented as n x, where x is a label for


individual elements in universe.
In discrete universe is finite collection of elements and continues universe is
collection of infinite cardinality. Collection of elements within a universe are called
sets and collection of elements within sets are called subset. Null set has no elements.

All possible set of set A is called power set P(A). Suppose A={1,2,3,4} then the cardinal
number is nx=4. The power set is

P(A)={,{1},{2},{3},{4},{1,2},{1,3},{1,4},{2,3},{2,4},{3,4},
{1,2,3},{1,2,4},{2,3,4},{1,3,4},{1,2,3,4}}

np(A) is cardinality of power set.


np(A) = 2nx=24 =16
Operations on classical sets are:
Union AUB = {x| x A or x B}

Intersection A B = {x| x A and x B}

Complement = { x | x A, x X}
Difference A|B = {x| x A and x B}

A
B

`
Figure 4.2: Union of Classical Sets A and B

37 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

U
A B

Figure 4.3 : Intersection of Classical Sets A and B

A U
B

Figure 4.4: Division (A-B) of two classical sets A and B

Figure 4.5: Complement of Classical set A

38 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

4.2.2 Properties of Classical Sets

Classical set operations

The excluded middle axioms are very important because these set operations are not
valid for both classical set and fuzzy set.

39 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

4.6 (a) Crisp set A and its Complement (b) Crisp = (c) Crisp =
4.2.3 Fuzzy Set
In contrast to classical set, fuzzy set is a set without rigid boundaries. In fuzzy
set the boundaries are ambiguously specified. The fuzzy set has the flexibility in
modelling commonly used linguistic expressions.
The fuzzy set expresses the degree to which an element belongs to the set. The
characteristic function of a fuzzy set is allowed to have the values between 0
and 1, which denotes the degree of membership of an element in the given
set.

Fuzzy set operations

40 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

Figure 4.7: Union of Fuzzy Sets A and B

Figure 4.8: Intersection of Fuzzy Sets A and B

Figure 4.9: Complement of Fuzzy Set A

41 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

4.2.4 Properties of Fuzzy Set

Fuzzy set holds all operations same as classical set, except excluded middle
axioms. The excluded middle axioms, extended for fuzzy sets, are expressed by

42 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

4.10 (a) Fuzzy Set A and its complement (b) Fuzzy (c) Fuzzy

4.3 Fuzzy Relations
Fuzzy rules are the key strength of fuzzy inference systems, which have the
most important modelling tool based on fuzzy set theory.

4.3.1 Introduction of Fuzzy Relations


Binary fuzzy relations are fuzzy sets in X and Y which map each element in X x Y
to a membership grade between 0 and 1.
Applications of fuzzy relations include areas such as fuzzy control and decision
making.
The examples of binary fuzzy relations are:

X is close to Y
X depends on Y
X and Y, looks alike
If X is large then Y is small

43 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

4.3.2 Use of fuzzy relations


Different compositions suggested for fuzzy relations are best known as max-
min composition.
Let R1 and R2 be two fuzzy relations defined on two Sets S1 x S2 and S2 x S3.
R1 * R2 = { [ (x,z), max.min( R1(x,y), R1(y,z))] | x X, y Y , z Z }

max min (x,z) = max ( min (( R1(x,y), R1(y,z))


Relation-1

0.1 0.3 0.5



R1 = 0.4 0.2 0.8
0.6 0.8 0.3

0.9 0.1

R2 = 0.2 0.3
0.5 0.6

R1 . R2 (2,a) = max ( min (0.4,0.9), min (0.2,0.2), min (0.8,0.5))


= max (0.4,0.2,0.5)
= 0.5 ( by max-min composition)

1 0.5
x A

2 y 0.5
B

3 z
0.6

Relation-1 Relation-2
Figure 4.11 Fuzzy Relations

44 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

The maximum minimum composition of relations

Let X, Y and Z be universal sets and let R be a relation that relates


elements from X to Y , i.e.
= { ((, ), (, ))} , ,
And

= { ((, ), (, ))} , ,

Then S will be relation that relates element in X that R contains to the element
in Z that Q contains, i.e...

Where o suggest the membership degree of R and Q in max min sense.

4.4 Fuzzy Rules Study or Linguistic Rules Study

Fuzzy rules and fuzzy reasoning are the key strength of fuzzy inference systems, which
have the most important modelling tool based on fuzzy set theory.

Obtaining fuzzy relation which represents the meaning of a given fuzzy rule

The linguistic variable can be characterized by a quintuple (x, T(x), X,G,M ) in which x
is the name of the variable, T(x) is the term set of x- set of its linguistic values or
linguistic terms. X is the universe, G is the syntactic rule and M is the semantic rule
that associates with each linguistic value A.

Age can be interpreted as linguistic variable, then its T(x) can be

T(age) = { young, not young, very young, not very young, middle aged, not middle
aged, old, not old, very old, more or less old, not very young and not very old }

The universe is X = [0,100]

45 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

Here the primary terms are: young, middle aged, old

Negation: not

Hedges: very, more, more or less

Connectives: and, or, either, neither

Let A be a linguistic value characterized by a fuzzy set with membership function A(.)

Ak is represented as a modified version of the original linguistic value expressed as:

Ak = [
x
A ( x)]k / x

The concentration is defined as CON (A) = A2

The dilation is defined as DIL (A) = A 0.5

NOT (A) = [1
x
A ( x)] / x

A and B = A B = [
x
A ( x) B ( x)] / x

A or B = A U B = [
x
A ( x) B ( x)] / x

Fuzzy if then rules

The fuzzy if-then rules also known as fuzzy conditional statements

It assumes the form

If x is A then y is B.

Where A and B are the linguistic values defined by fuzzy sets on universe of
discourse X and Y. Often x is A is called the antecedent or premise, while y is B is
called consequence or conclusion.

46 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

The fuzzy rules can be:

If pressure is high then volume is small.

If the speed is high then apply the break.

Before we can employ fuzzy if then rules to model and analyze a system, first we have
to finalize what is meant by the expression If x is a then y is b which is abbreviated
as AB

~
R= A B = A x B =
xxy
A ( x) * B ( y ) /( x, y )

The T-norm operator and AB is used to represent the fuzzy relation on R.

The operator may represent and, or, bounded product, logical operations like {a, if b
=1; b, if a=1; o, Otherwise}

4.5 Advantages and disadvantages of fuzzy logic

Advantages of fuzzy logic

The main advantage of fuzzy logic is it allows the use of vague linguistic terms in the
rules.

Below are some reasons why we need to use fuzzy logic rather than linear system:

Fuzzy logic concepts are easy to understand. The concepts of mathematics used in
fuzzy reasoning are simple.

Fuzzy logic is flexible enough with any system and is easy to manage or add more
functionality without starting again from beginning.

47 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

Fuzzy logic tolerates inaccurate data also. Almost everything is imprecise and also
most things are imprecise even on cautious review. Fuzzy reasoning creates this
understanding in the process rather than moving it onto the end.

It can model nonlinear functions of random complexity. Any sets of input output
data can be matched by generating a fuzzy system.

Adaptive techniques like Adaptive Neuro-Fuzzy Inference Systems (ANFIS) have made
this process easier.

Fuzzy logic can be built by the knowledge of experts. As compared to neural


networks, which takes training data and generate models, fuzzy logic lets you depend
on the knowledge of people who already know your system.

Fuzzy logic can be combined with conventional control techniques. Fuzzy systems do
not substitute conventional control methods, but in many cases fuzzy systems extend
them and make their implementation simple.

Fuzzy logic is based on natural language.

Disadvantages of fuzzy logic

In fuzzy logic, it is difficult to estimate membership function.

There are many ways of interpreting fuzzy rules, combining the output of several fuzzy
rules and defuzzifying the output

Fuzzy logic is not a solution for all problems. Fuzzy logic should not be used in certain
situations. Fuzzy logic is a suitable way to map an input space to an output space, but
it may not be convenient in all circumstances. If a simpler solution already exists, fuzzy
logic may not be advisable. Fuzzy logic is the modification of common sense - use
common sense when it is implemented and the right decision will probably been

48 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

made. For example, many controllers do a good job without using fuzzy logic.
However, if time is taken to become familiar with fuzzy logic. Fuzzy logic is a powerful
tool for dealing quickly and efficiently with uncertainties and nonlinearity.

4.6 Membership function in fuzzy logic

Membership of the elements x of the base set X in the fuzzy set A is defined by the
membership function A(x), where A(x) is a large class of functions can be taken.
Functions generally used are linear functions like triangular or trapezoidal functions.
The grade or degree of membership A(x) of a membership function describes which
grade, it belongs to in the fuzzy set A. The value of this membership grade or degree is
in the unit interval [0, 1]. This is shown in Figure.

Figure 4.12: Membership grades of a fuzzy set

If X is a collection of objects denoted generically by x, then a fuzzy set A in X is


defined as a set of ordered pairs:
A = {(x, (x)) | x X}
where(x) is called the membership function (MF) for the fuzzy set A. The
membership value ranges from 0 to 1.

49 | P a g e
Image Processing for Movement Detection and Face Recognition using Fuzzy Neural Network

Let X = R+ be the set of possible ages of human beings. The fuzzy set B= about
50 years old may be expressed as
B= {(x, ,B(x) | x X }

Where membership of x is defined as

B(x) = 1

x 50
4

1
10
Suppose the age of person is 45, then membership value will be 0.941 for the
set.

4.7 Implementation of Fuzzy set in face recognition

Set of Eyes having different colours like brown, black etc. The eye colour may be
brownish black or dark brown which cannot be classified as exactly brown eye or
exactly black eye. The fuzzy set provides the membership of the eye colour in the
black eye colour set.

50 | P a g e

Das könnte Ihnen auch gefallen