Research Inventy : International Journal of Engineering and Science is published by the group of young academic and industrial researchers with 12 Issues per year. It is an online as well as print version open access journal that provides rapid publication (monthly) of articles in all areas of the subject such as: civil, mechanical, chemical, electronic and computer engineering as well as production and information technology. The Journal welcomes the submission of manuscripts that meet the general criteria of significance and scientific excellence. Papers will be published by rapid process within 20 days after acceptance and peer review process takes only 7 days. All articles published in Research Inventy will be peer-reviewed.
1 of 12
Download to read offline
More Related Content
Rigorous Pack Edge Detection Fuzzy System
1. Research Inventy: International Journal Of Engineering And Science
Vol.4, Issue 10 (October2014), PP 19-30
Issn (e): 2278-4721, Issn (p):2319-6483, www.researchinventy.com
19
Rigorous Pack Edge Detection Fuzzy System 1Hoda Farag, 2Said E. El-Khamy 1(Department of Electrical Engineering Faculty of Engineering, Alexandria University 2(Department of Electrical Engineering Faculty of Engineering, Alexandria University
ABSTRACT – Edge detection is crucial step in the image processing application image analysis. There exists no universal edge detection method which works well under all conditions. This paper shows a new method based on a pack of the most efficient techniques for edge detection, which is entropy-based thresholding, wavelet detail and the Sobel on a fuzzy Inference system. The main advantages of the proposed method are its high efficiency as it provides all thinned edges to overcome this drawback in the older algorithms. We present experimental results for this method, and compare it against several leading edge detection methods, such as Entropy method, Wavelet details, and Sobel edge detection method.
KEYWORDS - EDGE DETECTION, ENTROPY, FUZZY SYSTEM, WAVELETS.
I. INTRODUCTION
The Edge Detection is an important field in the image processing application as an important features can be extracted from the edges of an image which are used by higher-level computer vision algorithms in the image processing and pattern recognition. Edges are significant local changes of intensity in an image which occur on the boundary between two different regions in an image. There are four steps of edge detection process which are (1) Smoothing.(2) Enhancement (sharpening).(3) Detection(4) Localization (Edge thinning and linking). The older methods for Edge detection based on using derivatives by detecting local maxima or minima of the first derivative and detecting the zero-crossing of the second derivative, The gradient methods like The Roberts, The Prewitt, The Sobel edge detector, The Canny Edge Detector which is the first derivative of the Gaussian which approximates the operator that optimizes the product of signal-to-noise ratio and localization. The Laplacian-of-Gaussian (LOG) which corresponds to the second derivative where the low-pass filter is chosen to be a Gaussian[5]. J. Petrova[6] proposed a method for edge detection in medical images using the wavelet transform comparing different methods using image thresholding and median filtering for images preprocessing Where Method which uses a modification of approximation coefficients provides the simplest way.El-Khamy [7] proposed a new fuzzy logic-based edge detection technique in which the drawbacks of the conventional gradient-based techniques are eliminated, The edge-detection problem is actually reduced to a two-level thresholding problem, which result in the partition of the image into two regions, according to its gradient values low local gradient values (smooth region) and another high local gradient values (edge region). And the proposed scheme is justified through simulations and comparison with Sobel operator-based edge detection results. El-Sayed [8] determined the optimal threshold based on the entropy concept by optimizing suitable criteria function from the gray level distribution of the image and other features of the image, trying to maximize the information measure between two classes the object and the background, using mask 3*3 ,classifying all pixels and detecting of all pixels on the borders between different homogenous areas ,as if the diversity for gray level of pixel under the window is low then the central pixel is not an edge pixel otherwise it‟s an Edge pixel. In [9]Nafiseh used mamdani fuzzy inference engine (FIS) for edge detection which has two inputs The gradient of image and the details of wavelet transform of image. Gradient of images is calculated by Sobel operator. The Sobel operator uses a pair of 3×3 convolution masks, one estimating the gradient in the x direction (columns) and the other estimating the gradient in the y-direction (rows). They used trapezoidal membership functions for fuzzy variables and used six fuzzy rules in FIS to evaluate the input variables. In [10] Aijah proposed an algorithm based on the fuzzy logic and uses 2*2 window for mask operation and has 16 rule base and it provide good results for the edge detection. In [11] Pervez implemented a new algorithm based on the image fusion process both images undergo wavelet based decomposition and the fusion parameter selection rule based on absolute maximum of horizontal and vertical coefficients.
2. Rigorous Pack Edge Detection…
20
This paper is organized as follows: in Section 2 presents some fundamental concepts of the wavelet transform and several methods for edge detection using wavelet transform. Section 3, we present the entropy and mathematical setting of the threshold selection. Section 4, we describe the fuzzy logic and its implementation on the edge detection. Section 5, we describe the proposed method of edge detection, and the proposed algorithm. In section 6 we present the metrics used for the performance evaluation. In Section 7 we report the effectiveness of our method and compare results of the algorithm against several leading edge detection methods, such as Sobel method, Entropic Threshold method, Edge Detection Method Using Canny. At last conclusion of this paper will be drawn in Section 8.
II. WAVELET TRANSFORM
The Wavelet analysis is a method for solving difficult problems in mathematics, with modern applications as signal processing, image processing, pattern recognition, computer graphics and other medical image technology. Wavelets allow complex information such as images and patterns to be decomposed into elementary forms at different positions and scales and subsequently reconstructed with high precision. 2D DWT decomposition separates an image into four parts; each of them contains different information of the original image. Detail coefficients represent edges in the image, approximation coefficients are supposed to be a noise. A proper modification of approximation coefficients is the easiest way for edge detection.The methods implementing the edge detection using wavelet transform are 1) replacing all approximation coefficients by zeros. This modification removes low frequencies from the image and the image is reconstructed using only the remaining wavelet coefficients which retain the most expressive edges, 2) Modification of approximation coefficients by simple edge detectors as Canny, Sobel, Prewitt, and it‟s applied to the approximation coefficients obtained in the first level of decomposition. 3) Wavelet Transform Modulus Maxima Method which is based on finding local maxima of wavelet coefficients which represent the edges in the image. The method uses only horizontal and vertical coefficients values (Low High and High Low coefficients) from each level of wavelet decomposition [7].
III. THE ENTROPY CRITERION
The Entropy is a measure of randomness in a random event which is denoted by Shannon Entropy as declared in the equations 1 and 2: (1) (2) Where i is the intensity, k is the whole number of intensities (0 255), object (class A) and the background (class B),Pi is the Symbol Probability and t*(1) is the optimum Shannon threshold where we have maximum Shannon Entropy. Tsallis has proposed a generalization of the Boltzman-Gibb-Shannon(BGS) Statistics to describe the statistical properties of non-extensive systems, applying Tsallis Entropy to threshold images. (3) Where q is a entropic index that characterizes the degree of non-extensivity. (4) Putting q = 0.5, Let pi = P1,….,PK be the probability distribution for an image with k gray-levels. Then derive two probability distributions, one for the object (class A) and the other for the background (class B) (5) (6)
3. Rigorous Pack Edge Detection…
21
We threshold the image using Tsallis Entropy (7)
In [6] the optimal threshold is determined based on classification of the probability distribution where luminance level t is the optimum threshold value. But the performance of the algorithm failed to provide all thinned edges .To overcome this drawback the proposed algorithm has been developed.
IV. FUZZY INFERENCE SYSTEM
Fuzzy logic represents a powerful approach to decision making since the theory of the fuzzy set proposed by Zadeh [1] in 1965. Applications of this theory can be found in artificial intelligence, computer science, medicine, control engineering, expert systems, logic and Image processing. In Classical set theory, an element can either belong to a set or not; Certainty eventually indicates that we assume the parameters of the model to be definitely known and that there are no doubts about their values or their occurrence while Fuzzy Set theory is an extension of classical set theory where elements have degrees of membership. Expert knowledge, in the form of fuzzy if-then rules, is used to deal with imprecise data in fuzzy set theory and fuzzy logic. Fuzzy method is much more superior to existing methods to manage the imperfection in problem solving in many branches. L. Zadeh wrote: „As the complexity of a system increases, our ability to make precise and yet significant statements about its behavior diminishes until a threshold is reached beyond which precision and significance (or relevance) become almost mutually exclusive characteristics‟.A fuzzy set in image processing is a set containing elements that have varying degrees of membership in the set. For instance, An image X of M × N dimensions can be considered as an array of fuzzy singletons, each with a value of membership denoting the degree of brightness level p, p = 0, 1, 2, . . . , P− 1 (e.g., a range of densities from p = 0 to p = 255)[3]. Mathematical algorithms are replaced by the inference engine which contains expert knowledge in the form of fuzzy if-then rules, „logical‟ statements‟ which is used to deal with imprecise data in fuzzy set theory and fuzzy logic to derive the decision. Suryakant[4] proposed a fuzzy rule based edge detection algorithm By scanning the images using floating 3x3 pixel window mask .Fuzzy Inference based system is capable of detecting edges of an image. The rule-base of 28 rules has been designed to mark the pixel under consideration as Black, White or Edge then Noise removal is performed at different intermediate levels of processing to remove the pixels which have been falsely recognized as edge by the processing.
V. THE PROPOSED ALGORITHM
I. The Fuzzy Similarity measure
The trapezoidal membership function μ is trapezoidal curve as a function of a vector, x, and depends on four scalar parameters a, b, c, and d, as given by
(8)
4. Rigorous Pack Edge Detection…
22
(9)
Figure1. Trapezoidal Fuzzy Curve of the FIS input membership function We use the concept of similarity to merge membership functions to reduce the number of membership functions in a linguistic variable. From the fuzzy similarity measures proposed by Wang the similarity measure based on min-max ratio between two membership functions A and B is (10) The cut of the trapezoidal fuzzy number A=(a,b,c,d) is the closed interval =[a+ (b-a)α ,d+(c-d)α] α ϶ [0,1] (11) Where the probability for a final pixel classification as edge or not based on a singleton fuzzifier on the mamdani defuzzifier method is given by :- (12) Where α is the three fuzzy sets associated with the fuzzy rule base, M is the number of fuzzy rules being considered. And the Merging process between the three inputs can be reduced to (13) Where , and represents the input membership function (the sobel, the wavelet and the entropy).
a
b
c
d
x
1
α
0
5. Rigorous Pack Edge Detection…
23
II. The New Fuzzy Inference System for Edge Detection
The algorithm is based on the subjection of a set of 3 pixels 1*3 window to get the horizontal edges and repeating the subjection of a set of the same set of 3 pixels flipping the window into 3*1 pixels to get the vertical edges. The image is said to have an edge if the mask pixels are having higher probability as an edge and this is accomplished with the following 8 rules.
Figure 2. (3*1) & (1*3) masks used in FIS The mask is slid over the entire image first by the 1*3 window then shifts the mask horizontally until the end of the row then start at the next row and so on to detect the horizontal edges then repeating the same steps with the other window 3*1 and shifting the window horizontally to detect the vertical edge more precisely. Fuzzy inference system (FIS) is a fuzzy modeling approach and a computing framework based on the concepts of fuzzy rule base which contains the selection of fuzzy rules, and membership functions, and the reasoning mechanism, the fuzzy inference system designed with three inputs and one output. The first one is the details of the wavelet transform, the second one is the gradient of the image and the third one represents the output of the edge detection Entropy system. The trapezoidal membership functions are used for the inputs and the Gaussian membership functions are for the output. The domain of the definition of each membership function (the interval of confidence) intersect with the neighboring domains and the contribution of each point depends on the value of its membership function and the inference rule includes merging neighboring membership functions by combining them with a great degree of overlapping As a result of the merging process with different weights for each membership function and to improve the result using the compositional rule of inference (CRI). The guiding principle for establishing rules of this edge detection system is that the likelihood of the pixel being an edge is high, and becomes very low as that the likelihood of the pixel being an edge is low (the presence of 2 or 3 edges assures that this point is an Edge) as indicated on the table Below.
Fuzzy Inputs
Fuzzy output
Wavelet
Gradient
Entropy
Edge
Low
Low
Low
No Edge
Low
Low
High
No-Edge
Low
High
Low
No-Edge
Low
High
High
No-Edge
High
Low
Low
True-Edge
High
Low
High
True-Edge
High
High
Low
True-Edge
High
High
High
True-Edge
Table 1 Fuzzy Rule Matrix
P1
P2
P3
P1
P2
P3
6. Rigorous Pack Edge Detection…
24
III. Merging Membership functions:
The Edges are the high frequency components of the image so working on frequency domain load the process with additional complexity we worked here on three techniques two of them depends on the spatial domain and one depends on the frequency domain to find the pixel value that represents the best compact edge representation of images 1- The Sobel Edge Detector The Sobel operator calculates the approximate image gradient of each pixel by convolving the image with a pair of 3×3 filters. These filters estimate the gradients in the horizontal (x) and vertical (y) directions and the magnitude of the gradient is simply the sum of these 2 gradients.
Each direction of Sobel masks is applied to an image, and then two new images are created. One image shows the vertical response and the other shows the horizontal response. Two images combined into a single image to find the absolute magnitude of the gradient at each point and the orientation of that gradient representing the edges. The magnitude of the gradient, which is what we use, is calculated using (14) The angle of orientation of the edge (relative to the pixel grid) giving rise to the spatial gradient is given by: Θ = arctan (Gy / Gx) (15) 2- The Entropy Threshold Using a mask of 3 *3 pixel and comparing each pixel with the neighborhood pixels, if the similarity is high then entropy is low and it‟s not an edge pixel otherwise it‟s an edge pixel and Checking for edge pixels ,If ( sum >6 ) Then g(x,y)=0 Else g(x,y)=1 3- The Wavelets Transform In the discrete wavelet transform, the choice of the wavelet scale to determine the edges will be detected and this is performed by multiple signal passage through the wavelet filter [9]. The wavelets measure functional variations intensity or grayscale variation for images along different directions measures the variations along the horizontal, vertical and diagonal directions. The DWT of f(x,y) of size M*N is: (16) i=H,V,D (17) The output of the wavelet represents the probability for final pixel classification as edge or not ,
7. Rigorous Pack Edge Detection…
25
VI. PERFORMANCE EVALUATION
The method used to evaluate the performance of edge detectors is to measure the quality of edge detectors using signal to noise ratio between the edge detectors images and the original image and the visual comparison between the new algorithm and classical edge detection methods. The evaluation of edge detection performance obeys the three important criteria. First, the edge detector should find all real edges and not find any false edges. Second, the edges should be found in the correct place. Third, there should not be multiple edges found for a single edge.The experiment is done with 9 different kinds of images scale 256x256. The original image has been taken and the salt pepper noise is added to it. Then an edge detection algorithm is applied to the images to detect the edges. The error metrics used to compare the various image quality assessment techniques the Peak Signal to Noise Ratio (PSNR) is a measure of the peak error. The mathematical formulae for it is PSNR = 10 log (18) The MSE is the cumulative squared error between the compressed and the original image, MSE = 2 (19) where I(x,y) is the original image, I'(x,y) is the approximated version (which is actually the decompressed image) and M,N are the dimensions of the images. A lower value for MSE means lesser error, and there are inverse relation between the MSE and PSNR, this translates to a high value of PSNR. Logically, a higher value of PSNR is good because it means that the ratio of Signal to Noise is higher.
VII. RESULTS AND DISCUSSION
A novel algorithm has been proposed in this paper by the fusion of different techniques on FIS applying 2 masks sequentially to confirm the existence of the edges. We implemented our algorithms on different images and compared the result to the different techniques like the Sobel and Entropy method and the canny edge detection method .The results of our algorithm were highly very Rigorous as it declared the that the output has more distinct edges than other conventional methods and has better visual appearance.
8. Rigorous Pack Edge Detection…
26
Original Image
Ground Truth
Canny,PSNR=18.2356db
Sobel, PSNR=17.0256db
Entropy, PSNR=18.2231db
Rigorous pack, PSNR=19.023db
The Original Image
Ground Truth
Canny, PSNR=18.5891db
9. Rigorous Pack Edge Detection…
27
Sobel, PSNR=18.1691db
Entropy, PSNR=18.9892db
The Rigorous Pack, PSNR=19.2521db
The original Image
Ground Truth
Canny, PSNR=17.2593db
Sobel, PSNR=17.4283db
Entropy, PSNR=18.1553db
Rigorous Pack, PSNR=18.9891db
10. Rigorous Pack Edge Detection…
28
Original Image
Ground Truth
Canny ,PSNR=23.9826 db
Sobel, PSNR= 23.9758 db .
Entropy, PSNR= 24.0526 db
Rigorous Pack, PSNR=24.9896 db
Original Image
Ground Truth
Canny, PSNR= 17.9855 db
Sobel, PSNR=17.9739 db
Entropy ,PSNR= 19.0255 db
Rigorous Pack ,PSNR=19.7845db
Original Image
Ground Truth
Canny.PSNR=17.2235 db
11. Rigorous Pack Edge Detection…
29
Sobel, PSNR=17.2105 db
Entropy, PSNR= 18.2332db
Rigorous Pack,PSNR=18.8869db
Original Image
Ground Truth
Canny, PSNR=20.6949db
Sobel, PSNR=20.6859
Entropy, PSNR= 21.7589db
Rigorous Pack ,PSNR=22.1986db
Original Image
Ground truth
Canny, PSNR= 20.9899db
Sobel, PSNR=20.9797
Entropy, PSNR=20.1261 db
Rigorous Pack, PSNR=20.1965db