**5.3 Edges Detection by Type-2 FIS**

Edge detection problems are fuzzy in the nature. The question whether a pixel should become darker or brighter after processing than it is before? Where is the boundary between two image segments? All these questions can be answered in the form of linguistic expressions known as rules. As far as rules are concern the rules do not change. "A rule is a rule is a rule…." What does change is the way in which one is going to model and process the fuzzy sets for antecedent and consequent of rules. In Type-1 FL, they are all modeled as Type-1 fuzzy sets, whereas in Type-2 FL, some or all are modeled as Type-2 fuzzy sets. In this implementation the range of pixels intensities are selected as edge pixels. This range can be obtained by Type-2 fuzzy outputs.

Type-2 FIS is implemented using mamdani model with Gaussian type membership function defined over the range of antecedent variables given in Table 1 and is shown in the figure 11 and Figure 12. The same set of rules are used for Type-2 FIS as of Type-1 FIS. Figure 6 also shows the block diagram for Type-2 FIS. The only difference between Type-1 and Type-2 FIS is the way the fuzzy sets are defined and processed for antecedent and consequent variables in this implementation. Type-2 FIS has been implemented in MATLAB using "Toolbox for Type-2 Fuzzy Logic" developed by prof(Dr)Oscar castillo [WebPage8]. The edges acquired by Type-2 FIS is shown in Figure 14. Comparing the Fig. 14 with Fig. 4 and Fig. 10, it shows that Type-2 FIS provide enhanced flexibility in choosing the pixel values. Hence, the result obtained from Type-2 FIS outperforms the *prewitt* operator and Type-1 FIS results.

The result obtained from Type-1 FIS is outperform the *prewitt* operator edges as shown in

(a) (b)

Edge detection problems are fuzzy in the nature. The question whether a pixel should become darker or brighter after processing than it is before? Where is the boundary between two image segments? All these questions can be answered in the form of linguistic expressions known as rules. As far as rules are concern the rules do not change. "A rule is a rule is a rule…." What does change is the way in which one is going to model and process the fuzzy sets for antecedent and consequent of rules. In Type-1 FL, they are all modeled as Type-1 fuzzy sets, whereas in Type-2 FL, some or all are modeled as Type-2 fuzzy sets. In this implementation the range of pixels intensities are selected as edge pixels. This range can

Type-2 FIS is implemented using mamdani model with Gaussian type membership function defined over the range of antecedent variables given in Table 1 and is shown in the figure 11 and Figure 12. The same set of rules are used for Type-2 FIS as of Type-1 FIS. Figure 6 also shows the block diagram for Type-2 FIS. The only difference between Type-1 and Type-2 FIS is the way the fuzzy sets are defined and processed for antecedent and consequent variables in this implementation. Type-2 FIS has been implemented in MATLAB using "Toolbox for Type-2 Fuzzy Logic" developed by prof(Dr)Oscar castillo [WebPage8]. The edges acquired by Type-2 FIS is shown in Figure 14. Comparing the Fig. 14 with Fig. 4 and Fig. 10, it shows that Type-2 FIS provide enhanced flexibility in choosing the pixel values. Hence, the result

obtained from Type-2 FIS outperforms the *prewitt* operator and Type-1 FIS results.

Fig. 10. (a) AnEdge obtained by Type-1 FIS , and (b) its histogram.

**5.3 Edges Detection by Type-2 FIS** 

be obtained by Type-2 fuzzy outputs.

6. If (DH is LOW) and (DV is LOW) then (EDGES is LOW) 7. If (DH is LOW) and (DV is HIGH) then (EDGES is HIGH)

Figure 10.

8. If (DH is LOW) and (DV is MEDIUM) then (EDGES is MEDIUM) 9. If (DH is MEDIUM) and (DV is HIGH) then (EDGES is HIGH) 10. If (DH is HIGH) and (DV is HIGH) then (EDGES is HIGH)

Fig. 11. Membership function for input 1 (DH)

Fig. 12. Membership function for input 2 (DV)

Fig. 13. Membership function for output (EDGE)

Type-2 Fuzzy Logic for Edge Detection of Gray Scale Images 295

Figure 15 shows a flow chart representation of implementation procedure for acquiring the edges. A step by step implementation procedure for acquiring the edges is mentioned

Step 1. Transform the image into Gray scale pass is through low pass filter and normalize.

Step 4. Apply the procedure to high light the pixels which forms the edge pixels and for

Experimentation of above mentioned procedure for obtaining the edges is carried on three different types of image given in Table 2. The image name are mentioned in the first column of table, while second column contains original image, third, fourth and fifth column shows the acquired edges of the images by gradient magnitude, Type-1 FIS, and Type-2 FIS respectively. The result shows that Type-2 FIS outperform *Prewitt* gradient and

Table 2. Original Images, their name, and obtained edges by GM, Type-1, and Type-2 FIS

Type-1 FIS Type-2 FIS

**6. Experimentation and simulation results** 

Step 2. use *prewitt* operator expressed by equation 6 - 8. Step 3. Apply Type-1 FIS or Type-2 FIS to find the edges.

non edge pixels reduce the intensity value.

Magnitude

below.

Type-1 FIS method.

Taj Mahal, India

Baboon

Leena

Name Original Image Gradient

Fig. 14. (a) AnEdge obtained by Type-2 FIS , and (b) its histogram.

Fig. 15. Flow chart of the Edge Detection Algorithm.
