{'fraction_non_alphanumeric': 0.023813112283345893, 'fraction_numerical': 0.005764883195177091, 'mean_word_length': 5.014276002719239, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimum Fuzzy based Image Edge Detection Algorithm

Edge detection is important in image processing to aid operations such as object classification and identification amongst others. This is soley to improve interpretability of the image. Common edge detection techniques such as Sobel, Prewittt, Canny, Laplacian of Gaussian (LOG), Robertss and ZeroCrossing has attracted the attention of researchers to perform a comparative analysis on these techniques excepts fuzzy, using different type of images. Fuzzy logic based edge detection algorithms development and comparison with existing algorithm became important due to the fact that the pixels’ boundaries identifying image degs are crystal clear as expected, hence other edge detection algorithms using crisp values will be omitting some vital information pixels, this impairs the quality of the image edge detected and further application through proper interpretation. This research further extends the investigation of edge detection techniques optimality, through comparing Sobel, Prewittt, Canny, Laplacian of Gaussian (LOG), and Robertss edge detection algorithms with our proposed fuzzy based edge detection algorithm designed using MATLAB. The result indicated that the novel fuzzy based edge detection algorithm developed in this research outperforms the Canny, Sobel, Prewittt, Robertss and LOG edge detection algorithms in three different experiments with different images


I. INTRODUCTION
Edge detection primarily deals with object extraction for easy identification [3] therefore leading to novel application such as civil structural analysis, medical diagnosis image analysis, security analysis of images, amongst other. Preliminary study reveals that edged detection algorithms can be classified into three main groups which are the gradient, template and morphological edge detection techniques [3]. The gradient methodology uses derivatives for tracing intensity changes, while the template is a method used in matching scheme that performs the comparison. Also, the morphological method makes use of mathematical models [3]. Despite these variations, edge detection further introduces challenges such as forged edge detection, omitted exact edges, creating skinny or deep lines and challenges resulting from noisy images [2], hence motivating several researchers into investigating effectiveness of various edge detection algorithms amongst which includes [1], [2], [3], [4], [5]. [6], [7] and [8].
This research paper involves the design of a fuzzy based image edge detection system. We develop a complete fuzzy inference system for accurate edge detection in comparison with most commonly used Gradient and Laplacian based Edge Detection techniques, using MATLAB 2010 Ra. This is achieved through an analytical comparative study between the fuzzy based edge detection system output from the same image with the outputs of other edge detection algorithm (Prewittt, Robertss, Sobel, Canny, and LOG) This research paper is divided into four sections. The first section is a brief introduction; the second section is an overview of related research literature while the third section presents analysis of various gradient and Laplacian edged detection algorithms operational principles, which this research considers in addition to the proposed fuzzy based edge detection algorithm, to establish the effectiveness of the fuzzy based edge detection algorithm over others. The fourth section is a comparative analysis between the proposed fuzzy edge detection algorithm and the other edge detection algorithms considered in this research. The final section is the conclusion based on finding from the fourth section.

II. RELATED LITERATURE
Several researchers have investigated image edge detection algorithms, either comparing existing algorithms or developing new algorithms. in [1],a research was conducted to compare the effectiveness between Canny, Roberts, Sobel, and Laplacian of Gaussian edge detection algorithms, applying them on TeraSAR-X stripmap tracing paleo-shorelines of ancient lake terraces East of Lake Manyara in Tanzania. The result indicated that Canny edge detection algorithm is more efficient however, the stronger the speckle noise Despite the numerous comparative analyses of edge detection algorithms, only Canny edge detection algorithm seem to be commonly recommended as the most effective edge detection algorithm in addition to Fast Fourier Transform which in comparison to Canny edge detection algorithm are not too different. A few researches have considered the development of fuzzy edge detection algorithm and its effectiveness in comparison with other edge detection algorithms. For example, [6] developed a fuzzy based edge detection algorithm using relative pixel, based on statistical values of SNR, PSN, and RM which are statistically computed. The rule in here is that if the value of RMSE is low and the values of SNR and PSNR are larger than the enhancement approach is better [6].

III. METHODOLOGY
In this section, we examine the existing edge detection algorithms operational principles and present the proposed fuzzy edge detection algorithms as well.

A. Roberts Edge Detection Algorithm
This is an edge detection technique that finds the differences between two adjacent pixels. This is achieves by explicitly using +1 to -1 to calculate the adjacent pixels. This is also referred to as forward difference in mathematical science. Roberts edged detection technique is practically too inefficient to determine the image edges, especially where the images are mixed with noise. One advantage of the Roberts edge detection technique is that it the simplest means of implementing the first order derivative edge detection = ( , ) − ( + 1, + 1) (1) The partial derivatives given above can be implemented by approximating them to two 2*2 mask. The Roberts operator masks are given by These filters have the shortest support, thus the position of the edges is more accurate, but the problem with the short support of the filters is its vulnerability to noise I.J. Image, Graphics and Signal Processing, 2017, 4, 44-55

B. Prewitt Edge Detection Algorithm
The Prewitt edge detection technique developed by Judy Prewitt is based on the idea of central difference. The operators of Prewitt edge detection techniques are more efficient than those of Roberts edge detection technique.
The partial derivatives of the Prewitt operator are calculated as follows: The constant c in the above expression implies the emphasis given to pixels closer to the center of the mask.
are the approximations at (i,j). Setting c=1, the Prewitt operator mask is obtained as: The Prewitt mask has longer support. The Prewitt mask differentiates in one direction and averages in another direction, therefore making it less vulnerable to noise presence in images.

C. Sobel Edge Detection Algorithm
The Sobel edge detection algorithm was developed by Irwin Sobel. Sobel edge detection algorithm is built around the central difference, but with more emphasis on central pixels when averaging. Also, the Sobel edge detection algorithm can be thought of as a 3*3 approximations to first derivative of Gaussian edge detector. The partial derivatives of Sobel edge detector are calculated as follows: = ( 6 + 2 5 + 4 ) − ( 0 + 2 1 + 2 ) The Sobel mask in matrix form are given below as: The Sobel edge detector is more noise-proof when applied to image with noise, from a simple comparison of the mask matrix of the Sobel edge detector in comparison to the Prewitt operator mask

D. Laplacian Of Gaussian Edge Detection Algorithm
The Laplacian of Gaussian (LOG) edge detection is a second order derivative edge detection technique that uses its operator to smoothen the image through convolution with Gaussian shaped edge followed by applying the Laplacian operator. The only pitfall of the Laplacian edge detection algorithm is the impact of noise in images which can be overcome by preprocessing the image to remove the noise before applying the LOG algorithm. The LOG edge detection algorithm follows the steps below during execution Step1: Smoothing of the input image given as f(m,n) is smoothing using Gaussian mask h(m,n) to get the resultant smooth image g(m,n): Step2: The Laplacian operator is applied to the smoothened image obtained from step1. This is represented by: Substituting eq(10) into eq(11) we obtain ′ ( , ) = ∇ 2 ( ( , )) = ∇ 2 ( ( , )) × ℎ( , ) Where f(m,n) represents the original input image and h(m,n) represent the Gaussian mask. The Gaussian mask is represented by Here r 2 =m 2 +n 2 and si the width of the Gaussian. Disadvantages of the Laplaican of Gaussian edge detection algorithm suffers from significant level of noise. In addition it usually generates contours that are not real.

E. Canny Edge Detection Algorithm
Canny edge detection algorithm developed although developed by John Canny 33years ago, is still considered a more effective edge detection algorithm used by academics and industry today, due to its efficiency in edge search optimization problem solution. The Canny edge detector defines edges as Zero-Crossing of second order derivative in the direction of the greatest first derivative. This is achieved through the Canny operator which employs a multistage processing. The first stage is Copyright © 2017 MECS I.J. Image, Graphics and Signal Processing, 2017, 4, 44-55 the smoothing of the inputted image using Gaussian convolution. After which, a two dimension first derivative operator is applied to the smoothed image to highlight regions with high spatial derivatives in the image. Edges lead to ridges in the gradient magnitude image. The Canny algorithm then tracks along the top of these ridges and sets to zero all pixels that are not on the top of the ridge to create a thin line in the output. This process is referred to as the non-maximal suppression. The edge tracking process exhibits hysteresis regulated by two variables T 1 and T 2 , with T 1 > T 2 . This implies that tracking only begins from a point greater than T 1 , and continues in both directions from the start point until the height falls below T 2 . This hysteresis prevents the possibility of noise breaking down into multiple edge fragments. The strength of Canny edge detector is determined by the following parameter  Width of the Gaussian edge detector: The Gaussian width increase leads to reduction in the sensitivity to noise of the Canny edge detection algorithm. Also, the localization error increases in the edge detected using Canny edge detector when the Gaussian edge is increased which is primarily controls the amount of details appearing in the image edge detected and to suppress noise in the image to be processed.  Upper threshold used: this is usually set quiet high to obtain good result in the edge detected.  Lower threshold used by the tracker: this is usually set quiet low to obtain optimum result of the edge detected.
A typical Canny edge detection algorithm consist of the following steps i. Remove the noise from the image using a two dimensional Gaussian approximation technique on both x and y axis, due to the excessive resource utilization in two dimensional Gaussian computation. ii. Obtain the changes in the x and y dimensions (gradient), because every changes in both dimension indicates an edge presence. iii. Exclude all lower gradient values, to identify the real edges in the image. This is due to the fact that edge occurs in areas where there high gradient value. iv. Mark out edge pixels through a process known as thresholding (high and low threshold values) using the hysteresis technique, sub-division as follows: When the value of a pixel is more than the threshold then the pixel is selected as a If a pixel has a value above the high threshold, it is set as an edge pixel. If a pixel has a value above the low threshold and is the neighbor of an edge pixel, it is set as an edge pixel as well. If a pixel has a value above the low threshold but is not the neighbor of an edge pixel, it is not set as an edge pixel. If a pixel has a value below the low threshold, it is never set as an edge pixel.

F. Proposed Fuzzy Based Edge Detection Algorithm
The use fuzzy logic method in image processing enables the adoption of membership functions to relate the extent a pixel belongs to an edge or common area. This is because, the boundary between two uniform areas could not always be an edge, and sometimes it could be a shading effect. This situation is what makes edge a not crispy boundary and fuzzy technique more suitable for edge detection problems. The proposed fuzzy based edge detection system architecture is given in fig1 below. Similarly, a convolution of the image with gradientX creates a matrix containing only X-axis gradient.  Fuzzy linguistics: the linguistic variable of the fuzzy based system is basically black and white since the image to be processed by the fuzzy system has undergone some pre-processing converting it from any other form to gray scale format suitable for the fuzzy system processing. Therefore the fuzzy system linguistics is defined as ImageEdgeDetector-Lingusitics = black or/ white  Input membership function: Having specified the input variables for the fuzzy based edge detection algorithm, the next step is the defining the degree to which each input variable belongs to either uniform area(white) or non-uniform area (balck) in order to accurately detect image edges, the membership function is defined as follows The actual degree to which a input variable membership is evaluated is defined in the zero mean Gaussian membership function, which determines to what extent an input variable belonging to black is in white and white in black respectively. This is normally defines with respect to axis dimension for example x=0.1 and y=0.1 is defined as x is a member of white (0) but belong to black with point one degree.
 Fuzzy inference engine: This is often considered the knowledge based of the fuzzy system, consisting of premise and predicate. The rule base is next to be specified, since it decides which pixel is an edge or not. The fuzzy rule for this system is defined if a pixel is white then it belongs to a uniform region. Otherwise, make the pixel black. r1 = 'If ImagegradientX is zero and ImageGradientY is zero then ImageEdgeDectected is white'; r2 = 'If ImageGradientX is not zero or ImangeGradientY is not zero then ImageEdgeDetected is black';

IV. EXPERIMENTS AND RESULTS DISCUSSION
In order to validate the thesis that our proposed fuzzy based edge detection algorithm outperforms Sobel, Canny, Prewitt, Roberts and LOG edge detection algorithm, we performed three experiments with three different images as detailed below.

A. Experiment 1:
This experiment was conducted with image in fig4g below, applying Roberts, Pewitt, Sobel, Canny, LOG and the proposed fuzzy algorithm on Fig 4g below. Fig4a, b, c, d, e and f were obtained. Clearly we can observed from best to worst, that the output from the proposed fuzzy algorithm outweighs the performance of Canny, Sobel, Prewittt, Roberts and LOG edge detection algorithms, as shown in Fig4f in comparison with Fig5a, b, c, d, e. Next in performance is the Canny and log edge detection algorithm output in fig4d and e having almost similar performance. Although the Canny edge detection algorithm performs better in detecting edges than the LOG algorithm which misses out a lot of information that are covered by the Canny edge detection algorithm as observed in visually comparing Fig4d and Fig4e. These, information covered by the Canny edge detection algorithm make its output quiet difficult to interpret. Furthermore, the Prewittt and Sobel edge detection algorithm is next in performance with almost similar output as shown in Fig4b and c. While the Roberts edge detection algorithm is least performing algorithm giving Based on the analysis of output images Fig4a, b, c, d, e, f corresponding the application of the various edged detection algorithms considered in this study (Prewitt, Sobel, Roberts, Canny, LOG and fuzzy), we can infer that the proposed fuzzy based edge detection algorithm is more effective than all others. Since Fig4f (fuzzy based edge detection algorithm output) provides details of the image as vegetables, describable visually, such as onion observation. These details are scarcely observed in other algorithm output images (Fig4a, b, c, d, and e). The Roberts edge detection algorithm performance output in fig4a above poorly represents the object, due to its low sensitivity to image edges. Visually inspecting the graphical performance output in fig4a above, no object can be visibly recognized for both vision spatial cognitively disabled and able people as well. The output of the Prewitt edge detection algorithm in Fig4b above significantly improved visual spatial cognitive analysis, as some of the object can be identified as fruits/vegetables generally. But edge detection sensitivity although higher than Roberts edge detection algorithm, requires significant improvement. The output from the Sobel edge detection algorithm in Fig4c above is similar to the performance output of the Prewitt edge detection algorithm and also suffers the same drawbacks. The Canny edge detection algorithm performance output in fig4d above is more easily interpretable with vision spatial cognitive capability, due to its higher sensitivity to image edge detection. Visually analyzing the graphical output of the Canny edge detection algorithm in Fig4d above, although more effective than the Prewitt, Roberts and Sobel edge detection algorithm, its high sensitivity to image edge detection makes it more difficult to interpret as a result of its inclusion of noise (relevant and irrelevant edges). Visually analysinh the graphical output of the LOG edge detection algorihtm performance output in Fig4e above is is a bit closer to the performance output of the Canny edge detection algorithm in Fig4d, but higher in performance than the Sobel,Prewitt and Roberts edge detectionalgorithm. The fuzzy based edge detection algorithm performance output in Fig4f above clearly depicts the object as collection fruits/vegetables. This is due to both higher sensitivity to edge detection and accuracy of edge membership to present inclusion of noise as part the detected edges. Hence the fuzzy based edge detection algorithm is considered more effective than all the other edge detection algorithms under study (Canny, LOG, Prewitt, Sobel and Roberts) This experiment was conducted with image in Fig5g below, applying Roberts, Pewitt, Sobel, Canny, LOG and the proposed fuzzy algorithm on fig5g below. Fig5a, b, c, d, e and f were obtained. Clearly we can observe from best to worst, that the output from the proposed fuzzy algorithm outweighs the performance of Canny, Sobel, Prewitt, Roberts and LOG edge detection algorithms, as shown in Fig5a in comparison with Fig5b, c, d, e, f. Next in performance is the Canny and log edge detection algorithm output in Fig5e and f having almost similar performance. Although the Canny edge detection algorithm performs better in detecting edges than the LOG algorithm which misses out a lot of information that is covered by the Canny edge detection algorithm. These, information covered by the Canny edge detection algorithm make its output more difficult to interpret. Furthermore, the Prewitt and Sobel edge detection algorithm is next in performance with almost similar output as shown in Fig5b and d. While the Roberts edge detection algorithm is least performing algorithm giving its output contains less information and lots of discontinuity in the image edge detected as shown in Fig5c.
Hence, based on the analysis of output images Fig5a, b, c, d, e, f, g corresponding the application of the various edged detection algorithms considered in this study, we can infer that the proposed fuzzy based edge detection algorithm is more effective than all others. Since Fig4a (fuzzy based edge detection algorithm output) is provides details of the image as a bird with eye, beaker and claws on both legs. These details are scarcely observed in other algorithm output images (Fig5b, c, d, e and f). The output of the fuzzy based image edge detection algorithm depicted in fig5a above depicts the object clearly as a bird, with eye, long beak, two legs with claws, Furthermore, the bird skin texture also appears to be rough, as expected of a bird with feathers. The Sobel edge detection algorithm output showed in Fig 5b above poorly indicate the object as a bird and its background. Visually inspecting the output in Fig5b above, clearly the object is poorly identified as a bird, with only one leg, with long beak, with eye, without skin texture as either rough or smooth and lots more missing and poorly represented features of the object (bird) Fig.5c. Roberts edge detection algorithm output Furthermore, the Roberts image edge detection algorithm output depicted in Fig5c above, extremely poorly represented the object beyond easily recognition to everyone. This will be mostly difficult for those with Visio spatial cognitive disability, because the object analysis presented in Fig5c above although barely represents a bird, but without legs, eye, feather, skin texture, status such as perched or flying. The Prewitt edged detection algorithm performance output in fig5d is almost similar to the performance output of the Sobel edge detection algorithm in fig5b above. Though, the Prewitt edge detection algorithm poorly identified the object as a bird with similar features as those identified by the Sobel edge detection algorithm, it's still fall short of accuracy. The LOG edge detection algorithm output in Fig5e above is quiet more efficient that the Prewitt, Robertss and Sobel edge detection algorithm, due to its higher sensitivity to detecting image (Fig5g) egdes. This obviously presents the processed image features better, but over representation also makes the output (Fig5e) from the LOG edge detection algorithm quiet difficult to interprete. For eacmple the output in fig5e above can be seen as a bird, that peched on a platform (unkonw but with rough surface), with only one leg barely visible, long beak, unrecorngised eye, poorly representedd skil surface texture, and lots more. The output from the Canny edge detection algorithm in fig5f above is almost similar to the performance ouptu of the LOG edge detection algorithm in fig5e above. Therefore making the analysed object recorgnizable easily Due to to its higher sensitive to detecting image edges than the LOG, Prewitt, Robertss, and Sobel edge detection algorithms. This higher sensitivity further imapires easy visio spartial cognition of the object due to difficulty in interpretation of object analysed.

C. Experiment 3:
This experiment was conducted with image in Fig6g below, applying Roberts, Pewitt, Sobel, Canny, Log and the proposed fuzzy algorithm on fig6g below. Fig6 a, b, c, d, e and f were obtained. Clearly we can observed from best to worst, that the output from the proposed fuzzy algorithm outweighs the performance of Canny, Sobel, Prewitt, Roberts and LOG edge detection algorithms, as shown in Fig6a in comparison with Fig6b, c, d, e, f. Next, in performance is the Canny and LOG edge detection algorithm output in Fig5d and e having almost similar performance. Although the Canny edge detection algorithm performs better in detecting edges than the LOG algorithm which misses out a lot of information that is covered by the Canny edge detection algorithm. These, information covered by the Canny edge detection algorithm make its output quiet more difficult to interpret as show in fig6e below, while these unattended information by the LOG algorithm makes it. Furthermore, the Prewitt and Sobel edge detection algorithm is next in performance with almost similar output as shown in fig6b and c. While the Roberts edge detection algorithm is least performing algorithm giving its output contains lesser information and lots of discontinuity in the image edge detected as shown in fig6f.
Hence, based on the analysis of output images Fig6a, b, c, d, e, f corresponding to the application of the various edged detection algorithms considered in this study, we can infer that the proposed fuzzy based edge detection algorithm is more effective than all others. Since Fig6a (fuzzy based edge detection algorithm output) is provides details of the image as a deer with tree-like horns, surrounded by grasses and tree leaves, and in motion with four legs etc. These details are scarcely observed in other algorithm output images (Fig6b, c, d, e and f). The output of the Sobel edge detection algorithm application on fig6g shown in fig6b above, although identifies a deer-like object through its head, but imperfectly presented, because the back side edge of the deer was not detected, in addition to the background uninterpretability. That whether the deer is is bush or forest etc. The Prewitt edge detection algorithm output as shown in fig6c above is also almost similar to the Sobel edge edtection alorithm in performance through visual analysis of grpahical results. They both suffer the same set back The LOG edge detection algorithm output in fig6d above is highly effective than the Sobel and Prewitt edged detection algorithms. Visually comparing their graphical output, the LOG edged detection algorithm detects more edged identifying the object as a deer than others. Though, its background is highly noisy and uninterruptable. The Canny edge detection algorithm output in Fig6e above is much more effective in detecting edges in an image than the LOG and Prewitt and Sobel. Visually analysing the graphical ouput, the Canny edgde detection algorithm is lot more sensitive and detailed in edge detection, but inlcudes noise which makes its output lot more difficult to inteprete and analyse. The least efficient edged detection algorithm of all is the Roberts edge detection algorithm as shown in Fig6f above. Visually comparing its output with others, it rarely depicts the deer image accurate, as the legs, head, back and background are poorly represented. Hence the fuzzy based edge detection algorithm is recommended as part of further research in image edge detection medical imaging, civil/engineering imaging, object recognition, shape recognition amongst others. In addition, further research into its comparison with other edge detection algorithm will be conducted.