Keywords

1 Introduction

Edge detection is one of the most common approaches to detect discontinuities in gray-scale images. Edge detection can be considered an essential method used in the image processing area and can be applied in image segmentation, object recognition systems, feature extraction, and target tracking [2].

There are several edge detection methods, which include the traditional ones, such as Sobel [29], Prewitt [27], Canny [2], Kirsch [9], and those based in type-1 [8, 25, 30, 31], interval type-2 [1, 20, 23, 24] and general fuzzy systems [6, 14]. In Melin et al. [14] and Gonzalez et al. [6], some edge detectors based on GT2 FSs have been proposed. In these works the results achieved by the GT2 FS are compared with others based on a T1 FS and with an IT2 FS. According with the results obtained in these papers, the conclusion is that the edge detector based on GT2 FS is better than an IT2 FS and a T1 FS.

In other works, like in [21], an edge detector based on T1 FS and other IT2 FS are implemented in the preprocessing phase of a face recognition system. According to the recognition rates achieved in this paper, the authors conclude that the recognition system has better performance when the IT2 fuzzy edge detector is applied.

In this paper, we present a face recognition system, which is performed with a monolithic neural network. In the methodology, two GT2 fuzzy edge detectors are applied over two face databases. In the first edge detector, a GT2 FS is combined with the Prewitt operator and the second with the Sobel operator. The edge datasets achieved by these GT2 fuzzy edge detectors are used as the inputs of the neural network in a face recognition system.

The aim of this work is to show the advantage of using a GT2 fuzzy edge detector in pattern recognition applications. Additionally, make a comparative analysis with the recognition rates obtained by the GT2 against the results achieved in [21] by T1 and T2 fuzzy edge detectors.

The remainder of this paper is organized as follows. Section 2 gives a review of the background on GT2 FS. The basic concepts about Prewitt, Sobel operator, low-pass filter and high-pass filter are described in Sect. 3. The methodology used to develop the GT2 fuzzy edge detector is explained in Sect. 4. The design of the recognition system based on monolithic neural network is presented in Sect. 5. The recognition rates achieved by the face recognition system and the comparative results are show in Sect. 6. Finally, Sect. 7 offers some conclusions about the results.

2 Overview of General Type-2 Fuzzy Sets

The GT2 FSs have attracted attention from the research community, and have been applied in different areas, like pattern recognition, control systems, image processing, robotics, and decision-making to name a few [3, 5, 13, 16, 28, 34]. It has been demonstrated that a GT2 FS can have the ability to handle great uncertainties.

In the following, we present a brief description about GT2 FS theory, which are used in the methodology proposed in this paper.

2.1 Definition of General Type-2 Fuzzy Sets

A general type-2 fuzzy set \(\left( {\tilde{A}} \right)\) consists of the primary variable x having domain X, the secondary variable \(u\) with domain in \(J_{x}^{u}\) at each \(x \in X\). The secondary membership grade \(\mu_{{{\tilde{\text{A}}}}} (x, u)\) is a 3D membership function where \(0 \, \le \,\mu_{{\widetilde{{\widetilde{A}}}}} (x, u) \, \le \,1\) [18, 37, 38]. It can be expressed by (1)

$$\tilde{A} = \left\{ {\left( {(x,u),\mu_{{\tilde{A}}} \left( {x,u} \right)} \right)| \forall x\, \in \,X, \;\;\forall u\, \in \,J_{x}^{u} \, \subseteq \, \left[ {0,1} \right] } \right\}.$$
(1)

The footprint of uncertainty (FOU) of \(\left( {\tilde{A}} \right)\) is the two-dimensional support of \(\mu_{{\tilde{A}}} \left( {x, u} \right)\) and can be expressed by (2)

$$FOU\left( {\tilde{A}} \right) = \{ (x,u) \, \in \, X\, \times \,[0{,}1]|\mu_{{\tilde{A}}} (x,u) > 0\} .$$
(2)

2.2 General Type-2 Fuzzy Systems

The general structure of a GT2 FLS is shown in Fig. 1 and this consists of five main blocks, which are the input fuzzification, fuzzy inference engine, fuzzy rule base, type-reducer, and defuzzifier [16].

Fig. 1
figure 1

General type-2 fuzzy logic system

In a GT2 FLS first the fuzzifier process maps a crisp input vector into other GT2 input FSs. In the inference engine, the fuzzy rules are combined and provide a mapping from GT2 FSs input to GT2 FSs output. This GT2 FSs output is reduced to a T1 FSs by the type-reduction process [35, 36].

There are different type-reduction methods, the most commonly used are the Centroid, Height and Center-of-sets type reduction. In this paper, we applied Centroid type-reduction. The Centroid definition \(C_{{\tilde{A}}}\) of a GT2 FLS [11, 12, 17] is expressed in (3)

$$\begin{aligned} & C_{{\tilde{A}}} = \{ (z_{i} ,\mu (z_{i} ))|z_{i} \, \in \,\frac{{\sum\nolimits_{i = 1}^{N} {x_{i} \theta_{i} } }}{{\sum\nolimits_{i = 1}^{N} {\theta_{i} } }}, \\ & \quad\qquad \mu (z_{i} )\, \in \,f_{{x_{1} }} \left( {\theta_{1} } \right)\, \times \, \cdots \, \times \,f_{{x_{N} }} \left( {\theta_{N} } \right),\quad \theta_{i} \, \in \,J_{{x_{1} }} \, \times \, \cdots \, \times \,J_{{x_{N} }} \} \\ \end{aligned}$$
(3)

where \(\theta_{i}\) is a combination associated to the secondary degree \(f_{{x_{1} }} \left( {\theta_{1} } \right)\,*\, \cdots \,*\,f_{{x_{N} }} \left( {\theta_{N} } \right)\).

2.3 General Type-2 Fuzzy Systems Approximations

Due to the fact that a GT2 FSs defuzzification process is computationally more complex than T1 and IT2 FSs; several approximation techniques have been proposed, some of them are the zSlices [33, 34] and the \(\alpha \text{-} {\text{plane}}\) representation [15, 19]. In these two approaches, the 3D GT2 membership functions are decomposed using different cuts to achieve a collection of IT2 FSs.

In this paper, the defuzzifier process is performed using \(\alpha \text{-} {\text{plane}}\) approximation, which is defined as follows.

An α-plane for a GT2 FS Ã, is denoted by Ãα, and it is the union of all primary membership functions of Ã, which secondary membership degrees are higher or equal than α (0 ≤ α ≥ 1) [15, 19]. The \(\alpha \text{-} {\text{plane}}\) is expressed in (4)

$$\tilde{A}_{\alpha } = \{ (x,u)|\mu_{{\tilde{A}}} (x,u)\, \ge \,\alpha ,\;\;\forall x\, \in \,X,\;\;\forall u\, \in \,[0{,}1]\}$$
(4)

3 Edge Detection and Filters

In this section, we introduce some concepts about filters and edge detectors (Prewitt and Sobel) using in image processing areas; since, these are used as a basis in our investigation.

3.1 Prewitt Operator

The Prewitt operator is used for edge detection in digital images. This consists of a pair of 3 × 3 convolution kernels which are defined in (5) and (6) [7].

$${\text{Prewittx}} = \left[ {\begin{array}{*{20}c} { - 1} & { - 1} & { - 1} \\ 0 & 0 & 0 \\ 1 & 1 & 1 \\ \end{array} } \right]$$
(5)
$${\text{Prewitty}} = \left[ {\begin{array}{*{20}c} { - 1} & 0 & 1 \\ { - 1} & 0 & 1 \\ { - 1} & 0 & 1 \\ \end{array} } \right]$$
(6)

The kernels in (5) and (6) can be applied separately to the input image \(\left( I \right)\), to produce separate measurements of the gradient component (7), (8) in horizontal \(\left( {gx} \right)\) and vertical orientation \(\left( {gy} \right)\), respectively [7].

$$gx = {\text{Prewittx}}\,*\,I$$
(7)
$$gy = {\text{Prewitty}}\,*\,I$$
(8)

The gradient components (7) and (8) can be combined together to find the magnitude of the gradient at each point and the orientation of that gradient [22, 29]. The gradient magnitude \(\left( G \right)\) is given by (9).

$$G = \sqrt {gx^{2} + gy^{2} }$$
(9)

3.2 Sobel Operator

Sobel operator is similar to the Prewitt operator. The only difference is that the Sobel operator use the kernels expressed in (10) and (11) to detect the vertical and horizontal edges.

$${\text{Sobelx}} = \left[ {\begin{array}{*{20}l} { - 1} & { - 2} & { - 1} \\ 0 & 0 & 0 \\ 1 & 2 & 1 \\ \end{array} } \right]$$
(10)
$${\text{Sobely}} = \left[ {\begin{array}{*{20}c} { - 1} & 0 & 1 \\ { - 2} & 0 & 2 \\ { - 1} & 0 & 1 \\ \end{array} } \right]$$
(11)

3.3 Low-Pass Filter

Low-pass filters are used for image smoothing and noise reduction; this allows only passing the low frequencies of the image [21]. Also is employed to remove high spatial frequency noise from a digital image. This filter can be implemented using (12) and the mask \(\left( {\text{highM}} \right)\) used to obtained the \({\text{highPF}}\) is expressed in (13).

$${\text{lowPF}} = {\text{lowM}}\,*\,I$$
(12)
$${\text{lowM}} = \frac{1}{25}\,*\, \left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {\begin{array}{*{20}c} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} } & {\begin{array}{*{20}c} 0 & 0 \\ 0 & 0 \\ 0 & 0 \\ \end{array} } \\ \end{array} } \\ {\begin{array}{*{20}c} {\begin{array}{*{20}c} 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{array} } & {\begin{array}{*{20}c} 1 & 0 \\ 0 & 1 \\ \end{array} } \\ \end{array} } \\ \end{array} } \right]$$
(13)

3.4 High-Pass Filter

High-pass filter only allows the high frequency of the image to pass through the filter and that all of the other frequency are blocked. This filter will highlight regions with intensity variations, such as an edge (will allow to pass the high frequencies) [21]. The high-pass \(\left( {\text{highPF}} \right)\) filter is implemented using (14)

$${\text{highPF}} = {\text{highM}}\,*\,I$$
(14)

where \({\text{highM}}\) in (14) represents the mask used to obtained the \({\text{highPF}}\) and this is defined by (15)

$${\text{highM}} = \left[ {\begin{array}{*{20}c} { - 1/16} & { - 1/8} & { - 1/16} \\ { - 1/8} & {3/4} & { - 1/8} \\ { - 1/16} & { - 1/8} & { - 1/16} \\ \end{array} } \right]$$
(15)

4 Edge Detection Improved with a General Type-2 Fuzzy System

In our approach, two edge detectors are improved, in the first a GT2 FS is combined with Prewitt operator and the second with the Sobel operator. The general structure used to obtain the first GT2 fuzzy edge detector is shown in Fig. 2. The second fuzzy edge detector has a similar structure; we only change the kernel using the Sobel operators in (10) and (11), which are described in Sect. 3.

Fig. 2
figure 2

Edge detector improved with Prewitt operator and GT2 FSs

The GT2 fuzzy edge detector is calculated as follows. To start, we select an input image \((I)\) of the images database; after that, the horizontal \(gx\) (7) and vertical \(gy\) (8) image gradients are obtained; moreover, the low-pass (12) and high-pass (14) filters are also applied over \((I)\).

The GT2 FIS was built using four inputs and one output. The inputs are the values obtained by \(gx\) (7), \(gy\) (8), \({\text{lowPF}}\) (12) and \({\text{highPF}}\) (14); otherwise, the output inferred represents the fuzzy gradient magnitude which is labeled as Output Edge.

An example of the input and output membership functions used in the GT2 FIS is shown in Figs. 3 and 4 respectively.

Fig. 3
figure 3

Input membership functions using in the GT2 FIS

Fig. 4
figure 4

Output membership function using in the GT2 FIS

In order to objectively compare the performance of the proposed edge detectors against the results achieved in Mendoza [21], we use a similar knowledge base of fuzzy rules; these rules were designed as follows:

  1. 1.

    If (dx is LOW) and (dy is LOW) then (OutputEdge is HIGH)

  2. 2.

    If (dx is MIDDLE) and (dy is MIDDLE) then (OutputEdge is LOW)

  3. 3.

    If (dx is HIGH) and (dy is HIGH) then (OutputEdge is LOW)

  4. 4.

    If (dx is MIDDLE) and (highPF is LOW) then (OutputEdge is LOW)

  5. 5.

    If (dy is MIDDLE) and (highPF is LOW) then (OutputEdge is LOW)

  6. 6.

    If (lowPF is LOW) and (dy is MIDDLE) then (OutputEdge is HIGH)

  7. 7.

    If (lowPF is LOW) and (dx is MIDDLE) then (OutputEdge is HIGH).

5 Face Recognition System Using Monolithic Neural Network and a GT2 Fuzzy Edge Detector

The aim of this work is to apply a GT2 fuzzy edge detector in a preprocessing phase in a face recognition system. In our study case, the recognition system is performed using a Monolithic Neural Networks. As already mentioned in Sect. 5, the edge detectors were designed using GT2 fuzzy combined with Prewitt and Sobel operator.

In Fig. 5 as an illustration, the general structure used in the proposed face recognition system is shown. The methodology used in the process is summarized in the following steps:

Fig. 5
figure 5

General structure for the face recognition system

  1. A.

    Select the input images database

In the simulation results, two benchmark face databases were selected; in which are included the ORL [32] and the Cropped Yale [4, 10, 26].

  1. B.

    Applied the edge detection in the input images

In this preprocessing phase, the two GT2 fuzzy edge detectors described in Sect. 5 were applied on the ORL and Cropped Yale database.

  1. C.

    Training the monolithic neural network

The images obtained in the edge detection phase are used as the inputs of the neural network. In order to evaluate more objectively the recognition rate, the k-fold cross validation method was used. The training process is defined as follows:

  1. 1.

    Define the parameters for the monolithic neural network [21].

    • Layers hidden: two

    • Neuron number in each layer: 200

    • Learning algorithm: Gradient descent with momentum and adaptive learning

    • Error goal: 1e-4.

  2. 2.

    The indices for training and test k-folds were calculated as follows:

    • Define the people number \((p)\).

    • Define the sample number for each person (s).

    • Define the k-folds \((k = 5).\)

    • Calculate the number of samples (m) in each fold using (16)

      $$m = \left( {s/k} \right)\, \cdot \,p$$
      (16)
    • The train data set size (i) is calculated in (17)

      $$i = m\left( {k - 1} \right)$$
      (17)
    • Finally, the test data set size (18) are the number of samples in only one fold.

      $$t = m$$
      (18)
    • The train set and test set obtained for the three face database used in this work are shown in Table 1.

      Table 1 Information for the tested database of faces
  3. 3.

    The neural network was training k − 1 times, one for each training fold calculated previously.

  4. 4.

    The neural network was testing k times, one for each fold test set calculated previously.

Finally, the mean of the rates of all the k-folds are calculated to obtain the recognition rate.

6 Experimental Results

This section provides a comparison of the recognition rates achieved by the face recognition system when different fuzzy edge detectors were applied.

In the experimental results several edge detectors were analyzed in which are included the Sobel operator, Sobel combined with T1 FLS, IT2 FLS, and GT2 FLS. Besides these, the Prewitt operator, Prewitt based on T1 FLS, IT2 FLS, and GT2 FLS are also considered. Additional to this, the experiments were also validated without using any edge detector.

The tests were executed using the ORL and the Cropped Yale database; an example of these faces database is shown in Table 2. The parameters used in the monolithic neural network are described in Sect. 5. Otherwise, the training set and testing set that we considered in the tests are presented in Table 1, and these values depend on the database size used.

Table 2 Faces database

It is important to mention that all values presented below are the results of the average of 30 simulations achieved by the monolithic neural network. For this reason, the results presented in this section cannot be compared directly with the results achieved in [21]; because, in [21] only are presented the best solutions.

In the first test, the face recognition system was performed using the Prewitt and Sobel GT2 fuzzy edge detectors. This test was applied over the ORL data set. The mean rate, standard deviation, and max rate values achieved by the system are shown in Table 3. In this Table, we can note that better results were obtained when the Sobel GT2 fuzzy edge detector was applied; with a mean rate of 87.97, an standard deviation of 0.0519, and max rate of 96.50.

Table 3 Recognition rate for ORL database using GT2 fuzzy edge detector

As a part of this test in Table 4, the results of 30 simulations are shown; these results were achieved by the system when the Prewitt GT2 fuzzy edge detector is applied.

Table 4 Recognition rate for ORL database using Prewitt GT2 fuzzy edge detector

In another test, the system was considered using the Cropped Yale database. The numeric results for this experiment are presented in Table 5. In this Table, we can notice that both edge detectors achieved the same max rate value; but, the mean rate was better with the Sobel + GT2 FLS.

Table 5 Recognition rate for Cropped Yale database using GT2 fuzzy edge detector

As part of the goals of this work, the recognition rate values achieved by the system when the GT2 fuzzy edge detector is used were compared with the results obtained when the neural network is training without edge detection, the Prewitt operator, the Prewitt combined with T1 and IT2 FSs; also, the Sobel operator, the Sobel edge detector combined with T1 and IT2 FSs. The results achieved after to apply these different edge detection methods are shown in Tables 6 and 7.

Table 6 Recognition rate for ORL database
Table 7 Recognition rate for Cropped Yale database

The results obtained over the ORL database are presented in Table 6; so, in this Table we can notice that the mean rate value is better when the Sobel GT2 fuzzy edge detector is applied with a value of 87.97. In these results, we can also observe that the mean rate and max rate values obtained with the Prewitt + GT2 FLS were better than the Prewitt + IT2 FLS and Prewitt + T1 FLS.

Otherwise, the results achieved when the Cropped Yale database is used are shown in Table 7. In this Table, we observed that the best performance (mean rate) of the neural network is obtained when the Sobel + GT2 FLS was applied; nevertheless, we can notice than the max rate values obtained by all the fuzzy edge detectors was of 100 %.

7 Conclusions

In summary, in this paper we have presented two edge detector methods based on GT2 FS. The edge detection was applied in two image databases before the training phase of the monolithic neural network.

Based on the simulation results presented in Tables 6 and 7, we can conclude that the edge detection based on GT2 FS represent a good way to improve the performance in a face recognition system.

In general, the results achieved in the simulations were better when the fuzzy edge detection was applied; since the results were very low when the monolithic neural network was performed without edge detection; even so, when the traditional Prewitt and Sobel edge detectors were applied.