Edge Detection using Fuzzy Logic and Thresholding K. Somasundaram1 and K. Ezhilarasan2 Image Processing Lab, Department of Computer Science and Applications, Gandhigram Rural Institute, Deemed University, Gandhigram–624302, Tamil Nadu, India e-mail:
[email protected],
[email protected] Abstract—In this article we propose an edge detection technique using Fuzzy Logic for the Magnetic Resonance Image (MRI) of head scan. First we use the Riddler’s threshold method and obtain a binary image. The Fuzzy Logic is applied on the binary image to detect the fine boundary for the MRI of head scan image. The detected edge is compared with that of the Sobel operator used for the edge detection. The edge detection can be used to Segment the brain portion from the MRI head scan images. Keywords: Fuzzy Logic, Riddler’s Method, MRI Head Scan image.
I. INTRODUCTION Now a days the medical field is growing enormously to diagnose and give treatment to the patient. One of the fast growing and important tool to diagnose functional or structural change on soft tissue is Magnetic Resonance Image (MRI). An MRI image is taken using three different techniques T1 weighted, T2 weighted and Proton Density (PD). These three methods are used to scan the human head in three orientations axial (top to bottom of head), coronal (back to front of head), and saggital(left ear to right ear of the head). The MRI of head scan contains eyes, nose, ear, neck, scalp, brain tissue and some non-brain tissues. So doctors need some clear perception of MRI head scan to diagnose the disease on brain. For that we need some segmentation process. It may be performed manually, but it takes more time to segment the brain portion. Therefore, an automated method is necessary to segment the brain portion. Segmentation is an important technique used in digital image processing. This segmentation process can be done by various methods. They are based on three categories, region based, intensity based and structure based [1]. In intensity based segmentation, pixels are classified into different regions using threshold method, edge detection and clustering [2]. An edge is the boundary between two or more regions. The edge detection is an important step in image segmentation process. There are many operators that are used to detect the edge of an object, some of them are Sobel operator, Robert operator, canny method, etc [1]-[3]. Fuzzy logic can also be used for edge detection. Fuzzy sets deal with the imprecision and vagueness embedded in human understanding systems and provides an elegant frame work for describing, analyzing, and
interpreting the vague and uncertain events [4]. The fuzzy logic has been used to detect the edge points of digital images in various algorithms [5]-[8]. The Fuzzy logic has been used in brain MRI segmentation [9]-[13] and mostly it was used for clustering [10]-[12]. Few methods make use of fuzzy logic in non-clustering form to segment MRI [14]. Images can be segmented from easily binary images. To generate a binary image, a threshold value is needed. There are various methods to compute the threshold value, Riddler method [2] is a one such method. It!s an iterative method and it will give optimal threshold value. In this paper we propose an edge detection method based on threshold and fuzzy logic. This method is extension of the work [7], in which eight fuzzy set rules are used to detect edges on binary image. In the proposed method, we make use of 32 fuzzy set rules to detect an edge point in a binary image. The remaining of the paper is organized as follows. In Section II, we outline the Riddler!s method for computing the threshold value for an input image and the fuzzy logic used to detect the edges. In Section III, experimental results and discussion are given. In Section IV, the conclusion is given. II. METHODS USED Our edge detection method consists of thresholding and fuzzy logic methods. Riddler!s method is used for computing the intensity threshold value. Fuzzy rules are used for edge detection. A. Thresholding Process Riddler!s method is used to compute the threshold value for the given image. Riddler!s method requires initial threshold value. The mean value of the pixel intensity values of the image is given as the initial value T0. That initial threshold value is used to separate the image into two regions object and background. The pixel values which are greater than that of initial threshold value T0 are takes as objects and the remaining pixels as background. Now we have two sets of values, one is for the object (ob) and another is for the background (bg). Then, we compute the threshold values for each of the two regions, one for the object Tob and another for the background Tbg. After getting
158 Natio onalConference on Signaland Image Processsing (NCSIP-2012)
the two thrreshold valuess, an improveed threshold values v in computted by takinng the averaage of these two threshold values v as: (1) T1 = (Tob + Tbg) Ú 2 The neew T1 taken as a T0 and the process is iteerated until T1 § T0 . W hen T0 and T1 are cllose to each other, o T The the final vaalue T1 is takeen as the threshold value T. final threshhold value T is used to generate g the binary b image for the t given braiin MRI imagee. For a given input image f(x,yy), the binary image g is obbtained as: (2) The Fiig. 1 shows thhe results of eqquation (2) foor two MRI head scans.
N1
N2
N3
N8
Test Pixel
N4
N7
N6
N5
Fig. 2:Eight Neeighbors
Every pixel is processed w with the Fuzzy y rules, and if an ny one of the fuzzy f rule is ssatisfied then the pixel is conssidered as an edge point, ootherwise it iss discarded. This process is appplied on all the pixels off the binary imag ge, and the edge poinnts are colleected. The colleections of alll these edge points are taaken as the edgees of the imagee. TABLE A .1:RULES OFF FUZZY SET Rulee No. Rule
(a)
(c)
1. 1
N3 & N4 & N5 = 1 N1 & N2 & N6 & N7 & N8 = 0
2. 2
N1 & N8 & N7 = 1 N2 & N3 & N4 & N5 & N6 = 0
3. 3
N1 & N2 & N3 = 1 N4 & N5 & N6 & N7 & N8 = 0
4. 4
N5 & N6 & N7 = 1 N1 & N2 & N3 & N4 & N8 = 0
5. 5
N3 & N4 & N5 & N6 = 1 N1 & N2 & N7 & N8 = 0
6. 6
N1 & N2 & N7 & N8 = 1 N3 & N4 & N5 & N6 = 0
7. 7
N1 & N6 & N7 & N8 = 1 N2 & N3 & N4 & N5 = 0
8. 8
N2 & N3 & N4 & N5 = 1 N1 & N6 & N7 & N8 = 0
9. 9
N4 & N5 & N6 & N7 = 1 N1 & N2 & N3 & N8 = 0
10.
N1 & N2 & N3 & N8 = 1 N4 & N5 & N6 & N7 = 0
(bb)
(dd)
Fig. 1:Binary Images of o MRI Head Scann Obtained usingg Threshholding (a) and (cc) are Original Im mages, (b) and (d) are the Corressponding Binary Images I
B. Fuzzy Logic o the Fuzzy logic (FL) iss a method, thhat depends on g truth valuees rather then the Boolean logic of the given system. Thhe FL have three steps too process succh as Fuzzification, Defuzzifiicaton and thhe Fuzzy Inteerface system witth the Fuzzy set or conditions for truth vaalues. The Fuzziffication is the process of converting the object o into fuzzyy processing format; defuuzzification iss the process of convertiing fuzzifieed object into f The fuuzzy rule or fuzzy understanddable object format. interface system s is a coollection of rules r for the fuzzy f system thaat operate onn the given object. The Fig.3 shows the steps involveed in applyingg the FL on binary b image. C. Fuzzy Rules The taask of our fuzzzy system is too detect an eddge of the image. Here we fraame a set of rules to detecct the edge pointts of the binarry image, the rules are show wn in Table.1. Inn the binary im mage, we take every pixel annd its eight neighhbors as in Figg. 2.
Diagram
Edge Detection using FuzzyLogicand Threshol ding 159
11.
N1 & N2 & N3 & N4 = 1 N5 & N6 & N7 & N8 = 0
27.
N3=1 N1&&N2&&N4&&N5&&N6&&N7&&N8=0
N5 & N6 & N7 & N8 = 1 N1 & N2 & N3 & N4 = 0
28.
12.
N4=1 N1&&N2&&N3&&N5&&N6&&N7&&N8=0
29.
N5=1 N1&&N2&&N3&&N4&&N6&&N7&&N8=0
13.
N1 & N2 & N6 & N7 & N8 = 1 N3 & N4 & N5 = 0
30.
N6=1 N1&&N2&&N3&&N4&&N5&&N7&&N8=0
31.
N8=1 N1&&N2&&N3&&N4&&N5&&N6&&N7=0
32
N8=1 N1&&N2&&N3&&N4&&N5&&N6&&N7=0
14.
15.
16.
N2 & N3 & N4 & N5 & N6 = 1 N1 & N8 & N7 = 0
N4 & N5 & N6 & N7 & N8 = 1 N1 & N2 & N3 = 0
N1 & N2 & N3 & N4 & N8 = 1 N5 & N6 & N7 = 0
The entire process of fuzzy system proposed in our method is shown in Fig. 3.
N1&&N2=1 N3&&N4 &&N5&&N6&&N7&&N8=0
Binary Image
18.
N2&&N3=1 N1&&N4 &&N5&&N6&&N7&&N8=0
Fuzzy Logic controller
19.
N3&&N4=1 N1&&N2 &&N5&&N6&&N7&&N8=0
17
Fuzzy Logic x Fuzzification x Fuzzy Interface System x Defuzzication
Resultant Image 20.
N4&&N5=1 N1&&N2 &&N3&&N6&&N7&&N8=0
21.
N5&&N6=1 N1&&N2 &&N3&&N4&&N7&&N8=0
22.
N6&&N7=1 N1&&N2 &&N3&&N4&&N5&&N8=0
23.
N7&&N8=1 N1&&N2 &&N3&&N4&&N5&&N6=0
24.
N1&&N8=1 N2 &&N3&&N4&&N5&&N6&&N7=0
25.
N1=1 N2 &&N3&&N4&&N5&&N6&&N7&&N8=0
26.
N2=1 N1&&N3&&N4&&N5&&N6&&N7&&N8=0
Fig. 3:Flow Chart for Fuzzy Logic
III. RESULT AND DISCUSSION W e performed experiment by applying the proposed algorithm on some MRI of head scans and detected the edges. W e then apply the Sobel edge detecting operators on the same set of images. The edge image obtained by the proposed method and Sobel operator are shown in Fig.5. In Fig.5, in the first column, the first row shows original saggital orientation of MRI head scan, the second row shows axial and the third row shows coronal image. These images are taken from the Internet Brain Segmentation Repository (IBSR) and Devaki MRI Scan center Madurai. In Fig. 5, the second column shows the binary image obtained by using Riddler!s method, the third column shows edges detected using the proposed method and the fourth column shows the edges detected using Sobel operator. By comparing the images in column 3 and 4 of Fig. 5, we note that the proposed method gives sharp and clear edges than that obtained by the Sobel operator.
160 Natio onalConference on Signaland Image Processsing (NCSIP-2012) Original Imagge
Binary Imagge
Edge Deteccted by Our Proposed method
Edge Deteected by Sobel operator
REFERENC CES [1] [2] [3]
[4] [5]
[6]
[7]
[8] Fig. 5:Resultts Obtained by Appplying the Propoosed Method Collumn 1 Shows the Original O MRI of Head H in Saggital (rrow 1), Axial (Roow 2), and coronal (row 3). Columnn 2 Shows the Biinary Image Obtaained mn 3 Shows the Edges E Detected by b the using Riddler Method. Colum S Operator Propposed Method annd Column 4 by Sobel
IV. CONCLUSION In thiss paper we haave proposed 32 fuzzy set rules that can be b applied onn binary imagges to detect edge points. Exxperimental reesults show that the propposed fuzzy baseed method prroduces sharpp and clear edges e than that of o the Sobel operator. o Thee proposed meethod can be usedd to segment MRI M of head scans s accurateely.
[9]
[10]
[11]
[12]
ACKNO OW LEDGEMEN NT This work is funnded by the University Grant G Commissioon, New Deelhi, Grant No: N FNo 37-1542009(SR). The Internet Brain Segmeentation Repossitory (IBSR) andd Devaki MR RI Scan centerr Madurai provvided the MRI off images.
[13]
[14]
Tinku Acharya , Ajoy K Roy #Im mage Processing Principles and Applications." A John W iley & Sons, INC., Publiccation,2005. M.Sonka , V. Hlavac, and R Boyal, #Image Processing Analysis and Machine visiion", Brooks/colee Publishing Com mpany,1999. J. Matthews. #Ann introduction to edge detection:The T sobel edge detector,"Availabbl http://www.generation5.org/conteent/ 2002/im01.asp p, 2002. G. J. Klir and B.. J. Yaun, #Fuzzyy sets and fuzzy logic :Theory and Application ", Prentice Hall oof India, 1997. Dong Hu and Zianzhong Z Tian,""A Multi-directio ons Algorithm for Edge Detectiion Based on Fuzzzy Mathematical Morphology, Proceeding of thhe 16th Internatiional Conferencee on Artificial Reality and Telexxistence- W orkshhops (ICAT!06!),, IEEE, 2006. Rey-Sern L ,"Eddge Detection by Morphological Operations O and Fuzzy Reasoninng", Image annd Signal Proccessing, IEEE Transaction, Voll. 27,pp 729 $7333,2008. Abdallah A. Alsshennawy, and A Ayman A. Aly " Edge E Detection in Digital Imagges Using Fuzzzy Logic Techn nique." W orld Academy of Scieence, Engineering and Technolog gy Vol. 51, pp. 178-186,2009. W afe barkhodaa,Fardin Akhlaqqian Tab and Om-Kolsoom Shahryari," Fuzzzy Edge Detection Based on Pix xel!s Gradient and Standard Devviation Values", IEEE, pp.7-10, IM MCSIT ' 09. Dzung L. Pham m, and Jerry L. Prince #Ad daptive Fuzzy Segmentation of Magnetic Resonance Im mages" IEEE Transactions on Medical M Images, Vol. 18, pp 737-752, 1999. M. Y. Siyal, annd Lin Yu #An intelligent mod dified fuzzy cmeans based alggorithm for bias eestimation and seegmentation of brain MRI". Paattern Recognitioon Letters, Vol. 26, pp 20522062, 2005. Miin- shen Yanng, Yu-Jen Hu, Karen Chia-Ren n Lin, Charles chia- Lee Liin. #Segmentation techniques for tissue differentiation inn MRI of ophthallmology using fu uzzy clustering algorithms." Maagnetic Resonancce Imaging , Voll. 20, pp 172179,2002. A.Kanchan Deshhmukh, and B.Gaanesh Shinde, #Adaptive A Color Image Segmenttation Using F Fuzzy Min-Max x Clustering" Engineering Lettters, Advance onlline Publication, 2006. 2 Benoit Caldairou , Nicolas Passsat , Piotr A. Habas, Colin Studholme, andd Francois Rouusseau. #A non n-local fuzzy segmentation meethod:Applicatioon to brain MRII" Vol. 44, pp 1916-1927, 20111. W eibei Dou, Suu Ruan, Yanping Chen, Daniel Blo oyet, and JeanMarc Constans. #A framework oof fuzzy informattion fusion for mages." Image the segmentationn of brain tumor tissues on MR im and Vision Compputing, Vol. 27, ppp 164-171, 2007 7.