Research Journal of Recent Sciences _________________________________________________ ISSN 2277-2502 Vol. 4(10), 72-76, October (2015) Res.J.Recent Sci. International Science Congress Association 72 Detection and Enhancement of Image Edges through Fuzzy Logic Farnaz Hoseini1*, Sajjad Sabzi, Reza Malekiand Moradali PoormohammadYoung Researchers and Elite Club, Ardabil Branch Azad Islamic University, Ardabil, IRAN University of mohagheghardabili, Faculty of agricultural technology and Natural resources, Ardabil, IRAN K.N. Toosi University of Technology of Tehran, Tehran, IRAN Islamic Azad University of International unit of Jolfa, East azarbyjan, IRANAvailable online at: www.isca.in , www.isca.me Received 15th February 2014, revised 19th May2014, accepted 18th December 2014 Abstract Detecting edge is one of the important concepts in image processing that is possible via marking points of image, in which light intensity changes suddenly. Usually, these sharp changes in image characteristics indicate significant events and changes in environment characteristics. Therefore, this study aims to detect and retouch image edges by fuzzy logic. Existence of additional points and lines is one of the important disadvantages of different methods of edge detection. This disadvantage causes difficulties in detecting edge. In recommended method by fuzzy adjustment of images, the additional lines and points are removed in edge detection results, weak edges are reinforced, and important edges are extracted. In order to identify the additional points and lines and weak edges in edge detection, some rules have been defined in fuzzy rule base. Finally, comparison of extracted edges with fuzzy adjustment method and other methods indicated that edge detection by the fuzzy adjustment method (recommended by this paper) is more effective than other methods in edge detection. Keywords: Edge detection, fuzzy logic, image processing. IntroductionEdge is a feature as a discontinuity in light intensity of pixels in an image. The edges of an image are always regarded as important features of image and reflecting high frequencies. Detection of an image edges are used as an indicator for processing and extraction of some of border characteristics at low level, and for detection and finding objects at high level. Several methods were suggested for edge detection with regard image analysis in recent years and many researchers have supported objectives of image optimization. Traditional methods such as Sober, Prewitt, and Roberts do not carry out edge correction correctly and also are very sensitive to noise Canny is a recommended method for resolving noise and minimizing probability of false edge detection. In this method, image eliminates noise and adjusts the edges toward local steep accompanied by its threshold via Gaussian filter. Edge detector of Canny has major problems and computational complexities, which do not present satisfactory results in different areas of contrast. Other studies were conducted on this area to improve the edge detection, including nervous networks algorithms, Ant Colony Algorithm, and fuzzy logic.With regard to positive effects of application of fuzzy method in improving edge detection and noise reduction, researchers decided to eliminate additional points and lines in edge detection, reinforce weak edges, extract important edges, and finally improve the quality of edge detection. Fuzzy logic approach has been used to detect edges in digital images in this paper. Related works: Fuzzy logic creates a powerful method for decision-making Concept of fuzzy logic has been presented by Lotfizade. Several studies have been conducted on applying different areas of digital images, including evaluation of image quality, edge detection, image division, etc10. Many techniques have been presented by researchers for edge detection on the basis of fuzzy logic in recent years A method of edge detection based on Probability Partition of image has been presented in, in which triple fuzzy partitions and principle of Maximum Entropy have been used for finding parameter values11. In this way, the best compact edge is represented. Above-recommended method considers Maximum Derivative as a necessary condition for Entropy function and an effective algorithm has been obtained for three-levels of thresholding based on this condition. In addition, other methods have been used for edge detection based on fuzzy logic, including if-then rules in fuzzy logic12. In many methods, points adjacent to pixels in some classes have been regarded as a base of fuzzy function inference, and then functions of appropriate membership were determined and used for each class13. Adjacent points in are considered as 3*3 sets surrounding intended point. This method deals with edge detection through pre-determined membership function. Discontinuity of edges is carried out in different extraction colorful 3*3 sets and by 5 fuzzy laws and membership functions of edge detection14. Discontinuity from adjacent point around the point has been investigated in these laws15. If the difference is similar to one of the pre-defined rules, pixel will be viewed as an edg16.Another similar study was suggested by Mansouri et al in, which points adjacent to each pixel have been grouped into 6 different sets. Then, valuation from zero to one has been done for each group Research Journal of Recent Sciences _____________________________________________________________ ISSN 2277-2502Vol. 4(10), 72-76, October (2015) Res.J.Recent Sci. International Science Congress Association 73 by bell-shaped membership function. Decision-making of existence or non-existence of edge and determining the direction of edge pixels was made according to membership values and fuzzy laws17. Methodology At the beginning, vertical, horizontal, and directional derivatives are determined for image and obtained images are regarded as algorithm entry. Then, necessary adjustments for reinforcement of the intended edges and elimination of additional lines and points are carried out at later stages. Conditions of these adjustments are the main part of this study that produce suitable results compared to other methods. This adjustment includes reinforcement of weak edges and elimination of additional points and lines (that are defined by if-then relationships). Finally, the results of algorithms are studied and compared with other methods. At the beginning, vertical, horizontal, and oblique derivatives are determined for image and obtained images are regarded as algorithm entry. In fact, we have done fuzzification this stage18. Several operators of edge detection work on the basis of the first derivative of light intensity; that is, we deal with gradient of light intensity of main data. Using this information, we can seek for an image for peaks of light gradient. If I(x) represent the light intensity of pixel x and I(x) of the first derivative (gradient of light intensity) of pixel x, then: (1))1.1.0)1.1(' + + + - - = For processing image with a better performance, the first derivative can be obtained by multiplying masks in figure 1 in intended image. Figure 1 Mask of the first derivative for a) horizontal, b) vertical, and c) directional edges Four images obtained from derivation are combined by operator Maximum in order to combine and get an image of fuzzy input. It means that for each pixel, we have a degree of edge membership in four images. Now, we consider maximum values of fuzzy membership occurred for each pixel as a degree of its edge. Degree of input edge is defined by the function of figure-2. Raw edges have been prepared for the next stage. The necessary adjustments will be applied for reinforcement of intended edges and elimination of additional lines and points. For functions, “and” and “or” has been used respectively for minimum and maximum. It means that using each deduction rule, obtained fuzzy sets have joined input data through an additive function. Output of the system has been calculated as a membership function and a binary image has been produced by the output condition, in which white pixels indicate edge and black pixels are areas without edge. Figure 2 Fuzzy membership function for image fuzzification Figure 3 Fuzzy membership function for defuzzification The first adjustment, reinforcement of the weak edges and elimination of additional lines: For the first edge adjustment, we move kernels 5*5 and 3*3 on image, and in the case of meeting the condition, 2 pixels greater than middle pixel and 2 pixels at the left of middle pixel of the kernel have the degree of fuzzy membership of the edge. One of the conditions is that if the degree of fuzzy membership of upper left point, the middle point and right lower point is greater than experimental threshold 60, this edge must be reinforced. For this reason, point of 2 pixels upper than middle point and 2 pixels at the left middle point take the label “edge” and the intended edge is developed and reinforced. In the case of not meeting the condition, the additional line will be eliminated. Figure 4 shows a black edge, conditions, and results.The second adjustment, elimination of single points: The image obtained from the first adjustment is examined by the rules of fuzzy database and a kernel 5*5 in the third adjustment and single points of image are eliminated. Single points are those ones that do not have edge around them. Figure 5 shows the rules of database. The third adjustment, elimination of additional points: The Research Journal of Recent Sciences _____________________________________________________________ ISSN 2277-2502Vol. 4(10), 72-76, October (2015) Res.J.Recent Sci. International Science Congress Association 74 image obtained from the second adjustment is examined by the rules of fuzzy database and a kernel 2*2 in the third adjustment and additional points are eliminated. Additional points are those ones smaller than 4 pixels. Figure 6 shows these conditions and related results. Results and Discussion This method has been compared to other methods for different images. Derivatives in 4 directions on figure-7 are shown in figure-8. Results of the edge detection methods on figure-7 are shown in figure-9. No method has a good performance in this image and discontinuous lines are visible on all images. Canny method has regarded projections as an edge. The best methods for edging in this image were Sobel, Prewitt, and Roberts. Figure 4 Conditions and results of rules of the first adjustment database Figure 5 Rules of the second adjustment database, elimination of single points Figures-10 and 11 show the results of recommended method on figure 7 in the first and second adjustments. Weak and strong edges have been extracted in the first adjustment. Furthermore, these edges may include undesirable points and additional edges. Single points have been eliminated in the second adjustment. As seen in figure-12, the weak edges have been eliminated in the third adjustment and thickness of edges has been reduced. Figure-6 Rules of the third adjustment database, elimination of additional points Figure-7 The main experimented image Research Journal of Recent Sciences _____________________________________________________________ ISSN 2277-2502Vol. 4(10), 72-76, October (2015) Res.J.Recent Sci. International Science Congress Association 75 Figure 8 Derivative in a) horizontal, b) vertical, and c) oblique directions Figure 9 Edge detection of a) Canny, b) Sobel, c) Prewitt, and d) Roberts Figure-10 Result of the recommended method in the first adjustment. Single and additional points are identified by red cycles Thick lines become thin in the third adjustment and only main lines remain. Moreover, scattered lines in image, which are not connected to the main lines, are eliminated. This adjustment can be used to extract the main edges. For having all edges, either weak or strong, the third adjustment cannot be applied. Figure-11 Result of recommended method in the second adjustment. Single and additional points have been eliminated that are identified by red cycles Research Journal of Recent Sciences _____________________________________________________________ ISSN 2277-2502Vol. 4(10), 72-76, October (2015) Res.J.Recent Sci. International Science Congress Association 76 Figure-12 Result of recommended method in the third adjustment. Weak edges have been eliminated and thickness of the remaining edges has been decreased Conclusion Different methods of edging on image were experimented in this study. In addition, one fuzzy method of edge detection with fuzzy adjustments was suggested. As revealed in figures-10 and 11, the edges are interconnected that is the result of strengthening and developing the weak edges. Moreover, additional points appeared as noise on images were eliminated by the second adjustment. Additional lines, weak edges, and additional points have been reduced in the third adjustment and thickness of edges has been decreased. Results of other methods of edge detection (figure-9) are full of additional points, single points, and discontinuous edges, which are a fault in edge detection. Based on the findings and comparison of the recommended method with other methods, it can be followed that if, using base of fuzzy rules, we view knowledge and insight of an expert as a law and use it for edge detection, then we gain even more effective results. References 1.Aborisade D.O., Novel Fuzzy logic Based Edge Detection Technique, International Journal of Advanced Science and Technology, (32), 75-82 (2011) 2.Canny J.F., A computational approach to edge detection, IEEE Trans. on Pattern Analysis and Machine Intelligence, (6), 679-698 (2009)3.Madasu H., John S. and Shantaram V., Fuzzy Edge Detector Using Entropy Optimization, Proceedings of the International Conference on Information Technology: Coding and Computing, (54), 1004-1006 (2010)4.Zadeh L.A, Fuzzy sets, Information and Control, (8),338-353 (2008)5.Kaufmann A., Introduction to the Theory of Fuzzy Subsets, Fundamentals Theoretical Elements, (96), 125-129 (2011)6.Bezdek L.C., Pattern Recognition with fuzzy Objective Function Algorithm, Plenum Press5(45), 158-162 (2007)7.Cheung K. and Chan W., Fuzzy One –Mean Algorithm for Edge Detection, (55) 2039-2044 (1995) 8.Kuo Y., Lee C. and Liu C., A New Fuzzy Edge Detection Method for image Enhancement, IEEE Inter. Conf. on Fuzzy Systems, (201), 1069-1074 (2001)9.El-Kham S., El-Yamany N. and Lotfy M., Modified Fuzzy Sobel Edge Detector, Seventeenth National Radio Science Conference, (85), 22-24 (2001)10.Zhao M., Fu A.M.N. and Yan H., A Technique of ThreeLevel Thresholding Based on Probability Partition a Fuzzy, IEEE Trans. on Fuzzy Systems, (32), 469- 479 (2001)11.Tao C.W. et al, A Fuzzy if-then approach to edge detection, Proc. of 2nd IEEE intl.conf. On fuzzy systems, (102), 1356–1361 (2002)12.Aghaei M., Asadollahi A., Deilami Moezzi A., Beigi M. and Parvinnejad F., the Relation between Personality Types, Locus of Control, Occupational Satisfaction and Occupational Exhaustion and Determining the Effectiveness Of Stress Inoculation Training (SIT) on reducing it among staffers of Saipa Company, Research Journal of Recent Sciences, 2(12) 11-16 (2013) 13.Heidari M, Nekoubin A., Heidari R. and Jafari M., Optimum locating and Sizing of Distributed Generation Based on Artificial Ant Colony Algorithm, Research Journal of Recent Sciences, 2(12), 15-18 (2013)14.Jana M., Fire Safety Properties of Heat Treated Wood, Research Journal of Recent Sciences, 2(12) 80-82 (2013)15. Limousine E., Capacitor Replacement in Distribution Networks using Genetic Algorithm, Research Journal of Recent Sciences, 2(12), 64 (2013)16.Fook C.Y., Sidhu G.K., Hashim R.A., Hamid A.A. and Yunus F.W., Teacher's Perception towards Psychometrics Analysis Software, Procedia-Social and Behavioral Sciences, 30, 376-381 (2011)17.Eskandar J., Intellectual Capital and its Effects on Firms’market value and Financial Performance in Iran: An Investigating Public Model, Research Journal of Recent Sciences, 2(3), 1-6 (2013)18.Amanchi N.R. and Mohd M.H., Ecophysiological and cytopathological impact of delfin insecticide (Bacillus thuringiensis) to a unicellular ciliate protozoan, Euplotes patella, Research Journal of Recent Sciences, 1(4), 64-67 (2012)