Brain Tumor Detection Using Snake Algorithm and Fuzzy C-Mean

In this research, two methods have been suggested for the detection of the brain tumor . (which is defined as the abnormal growth of cells), The first method is used the snake algorithm and the second Fuzzy C-mean . Initial image hase been processed that converts the image to gray then a Median filtering method is used to remove noise and other false features while maintaining the quality of public image. The methods are applied on a number of brain image with different angles. The results have to been presented of both methods and compared. The result show that snake method with a high speed in detecting the tumor, the matlab language has been used for the suggestions methods.


Introduction
Body is made of many cells. Each cell has specific duty. The cells growth in the body and are divided to reproduce other cells. These divisions are very vital for the correct functions of the body. When each cell loses the ability of controlling its growth, these divisions are done with any limitation and tumor emerges. Tumors, themselves, are divided into tow classes: benign and malignant [1].
The cause of the disease aside from exposure to vinyl chloride or ionizing radiation, there are no Known environmental factors associated with brain tumors. Mutations and deletions of so called tumor supressor genes are incriminated in some forms of brain tumors. Patients with various inherited diseases, such as Von Hippel-Lindau syndrome, multiple endocrine neoplasia, neurofibromatosis type 2 are at high risk of developing brain tumors. As for the symptoms of the disease depend on two factors: tumor size (volume) and tumor location. The time point of symptom onset in the course of disease correlates in many cases with the nature of the tumor (engine, i.e. slow growing/late symptom onset, or malignant, i.e. fast growing/early symptom onset). Many low-grade (benign) tumors can remain asymptomatic (symptom-free) for years and they may accidentally be discovered by imaging exams for unrelated reasons (such as a minor trauma).New onset of epilepsy4 is a frequent reason for seeking medical attention in brain tumor cases. Large tumors or tumors with extensive perifocal swelling edema inevitably lead to the elevated intracranial pressure (intracranial hypertension), which translates clinically into headaches, ving (sometimes without nausea), altered state of consciousness (somnolence, coma), dilatation of the pupil on the side of the lesion (anisocoria), papilledema (prominent optic disc at the funduscopic examination). However, even small tumors obstructing the passage of cerebrospinal fluid (CSF) may cause early signs of intracranial hypertension. Intracranial hypertension may result in herniation (i.e. displacement) of certain parts of the brain, such as the cerebellar tonsils or the temporal uncus, resulting in lethal brainstem compression. In young children, elevated intracranial pressure may cause an increase in the diameter of the skull and bulging of the fontanel's [3] [15].
Clustering is an unsupervised learning task that aims at decomposing a set of object into subgroups or cluster based on similarity. The goal is to divide the data-set in such a way that objects (or example case) ) belonging to the same Cluster are as similar as possible, whereas objects belonging to different cluster's are as dissimilar as possible. The motivation For finding and building , classes in this way can be manifold, Cluster analysis is primarily a tool for discovering previously the hidden structure in a set of" unordered objects. In this case, one assumes that a 'true' or natural grouping exists in tile data, However, (he assignment of the object to the classes and , the description of these classes are unknown . By arranging similar object into clusters tries to reconstruct the unknown structure in the hope that every cluster found represents an actual type or category of object. Clustering method can also be used for data reduction purposes. Than it is merely aiming at a simplified representation of the set of objects which allows for dealing with a manageable number of homogeneous groups instead of' with a vast number of single object. Only some mathematical criteria can decide on the compositing of clusters when classifying data-set automatically. Therefore, clustering methods are endowed with distance functions that measure the dissimilarity of the presented example cases, which are equivalent to the measuring of their similarity. As a result, one yields a partition of the data-set into clusters regarding the chosen dissimilarity relation. Given a positive integer they aim at finding the best partition of the data into groub based on the given dissimilarity measure they regard the space of possible partitions into subsets only. There in partitioning clustering, methods are different from hierarchical techniques. The littler organizes data in a nested sequence of group , which can be visualized in the form of a dendrogram or tree. Based on a dendrogram, one can decide on the number of clusters at the data are best represented for a given purpose. Usually the number of (true) clusters in the given data is unknown in advance.
However, using the partitioning methods, one is usually required to specify the number as an input parameter [17].
There are various techniques used for brain tumor detection, in this research use a snake method to detection of tumor Brain which has been proved by this method in the detection speed when compared to fuzzy C-mean method, through the results that emerged from the application of both methods on the images selected and applied in the algorithms

Previous Studies
Jamal S. Al Neamy presented in a study to detection how the brain tumor, depending, a hybrid intelligency system which has been constructed in this work by using some bioinformatics techniques for the diagnosis of brain tumors. Two main types of brain tumor have been used: meningioma and astrocytoma. Different types of gray level images of (0→255) have been used from magnetic resonance imaging (MRI) for both cases (t1) and (t2) and computed tomography (CT scan) with and without contrast by using Navigation System. A set of processes, read, contrast, croup, smooth, canny edge detection and registration (RCCSCR), have been used sequentially to segment the tumor. They represent the segmentation algorithm of this work. Image features have been extracted and tumor image was translated into fifteen real feature values, by using two types of measures: gray level parameters (measures) and texture measures. These fifteen feature values are equivalent to the tumor image to be used in the diagnosis, leading to low storage and less execution time [6].
Siti Hazlina Binti Abdullah presented in a study to detection how the brain tumor, depending, iagnose brain tumor type by using back propagation neural networks. The objective of and to develop prototype system to diagnose brain tumor type. This project only covers eight types of brain tumor for patient age range between fifteen until thirty-four years old and the data will be collected at Hospital University Sains Malaysia (HUSM), Kubang Kerian.This prototype was developed by using Microsoft Visual Basic 6.0. From the result it shows that back propagation had ability to diagnose different types of brain tumor with high accuracy in their training and testing results, but it also has drawback such as overlapping of their actual result which sometimes will make the system difficult to diagnose. To overcome it, Neuro-fiizzy is recommended to overcome the overlapping cases. Other recommendations are integrated with the expert system like MYCIN where the system will ask the patient about the symptoms and then match it with the similar image from database. The report is based on sources from the internet, books, articles and magazines and knowledge from expert especially in medical site [19].
Kadam D. B Gade S. S, M. D. Uplane3 and R. K. Prasad, presented in a study to detection how the brain tumor, depending Neural Network is based on brain tumor detection. Both hardware and software approach are proposed in this research. The interdependency of the two approaches certainly makes precise detection of maligns cells [8].

Gray -Scale Images
Gray -Scale Images are referred to as monochrome. They contain brightness information only, on color information. The number of bits used for each pixel determines the number of different brightness levels available. The typical image contains 8 bit/pixel data which allows us to have 256(0-255) different brightness (gray) levels. This representation provides more than adequate brightness resolution in terms of the human visual system's requirement and provide a "noise margin" by allowing for approximately twice as many gray levels as required. This noise margin is useful in real-word application because of the many different types of noise inherent in real systems [18]. Figure (1) represents the process of converting color image to gray.

Image Smoothing
The smoothing is often used to reduce noise within an image or to produce a less pixilated image. Most smoothing methods are based on low pass filters. Smoothing is also usually based on a single value representing the image, such as the average value of the image or the middle (median) value . There are several types of methods which have been used to the execution of the smoothing operation [13] [14].
in this works a special type of low pass filter is used that is the median filter to perform the smoothing of images; Figure (2) represents how he removed the noise from the images by using the method of median filter, where the image of Figure (2(a)), the noise after application of the method is to remove the image as in Figure (2(b)). The median filter is often used to remove "shot" noise, pixel and other spurious features of single pixel extent while preserving overall image quality. In contrast, low pass filters would only blur the noise instead of removing it. An efficient algorithm to determine the median is desired, because this operation often has to be repeated millions of times for filtering large images [10].
A pixel intensity is replaced with the median of pixel intensities within a window centered at that pixel. If a part of the window falls outside the image, intensities within the portion of the window inside the image is used. Circular windows are used to make smoothing independent of the image orientation. The output (y)of the median filter at the moment (t) is calculated as the median of the input values corresponding to the moments adjacent to (t): [10].
Where : T is the size of the window of the median filter [11].

Snake Algorithm
Active contours or snakes are completely different approaches to feature extraction. An active contour is a set of points that aims to enclose a target feature, the feature to be extracted. It is a bit like using a balloon to 'find' a shape: the balloon is placed outside the shape, enclosing it. Then, by taking air out of the balloon, making it smaller, the shape is found when the balloon stops shrinking, when it fits the target shape. By this manner, active contours arrange a set of points so as to describe a target feature, by enclosing it. Snakes are quite recent compared with many computer vision techniques and their original formulation was as an interactive extraction process, although they are now usually deployed for automatic feature extraction. An initial contour is placed outside the target feature, and is then evolved so as to enclose it. The process is illustrated in Figure 3, where the target feature is the perimeter of the Tumor. First, an initial contour is placed outside the tumor (Figure 3a). The contour is then minimized to find a new contour which shrinks so as to be closer to the tumor ( Figure  3). After (100) iterations, the contour points can be seen to match the tumor perimeter well (Figure 3). [21] (a) Initial contour (b) After 100 interaction (c) After 160 interaction (d) After 360 interaction Figure (3). Using a snake to find an brain tumor Active contours are expressed as an energy minimization process. The target feature is a minimum of a suitably formulated energy functional. This energy functional includes more than just edge information: it includes properties that control the way in which the contour can stretch and curve. In this way, a snake represents a compromise between its own properties (such as its ability to bend and stretch) and image properties (such as the edge magnitude). Accordingly, the energy functional is the addition of a function of the contour's internal energy, its constraint energy and the image energy; these are denoted Eint, Econ and Eimage, respectively. These are functions of the set of points that make up a snake, v(s) ,which is the set of x and y coordinate of the points in the snake. The energy functional is the integral of these functions of the snake, given s(0, 1) is the normalized length around the snake. The energy functional Esnake is then: [16] [11].
In this equation, the internal energy, Eint , controls the natural behaviour of the snake and hence the arrangement of the snake points, the image energy, Eimage, attracts the snake to choose low-level features (such as edge points); and the constraint energy; Econ, allows higher level information to control the snake's evolution. The aim of the snake is to evolve by minimizing. Equation 2 . New snake contours are those with lower energy and are a better match to the target feature (according to the values of Eint, Eimage and Econ) than the original set of points from which the active contour has evolved. In this manner, we seek to choose a set of points v(s) such that : [11].
This can select a maximum rather than a minimum, and a second order derivative can be used to discriminate between maximum and minimum. However, this is not usually necessary as a minimum is usually the only stable solution (on reaching a maximum, it would then be likely to pass over the top to minimize the energy). Before investigating how we can minimize Equation 2, let us first consider the parameters that can control a snake's behaviour.
The energy functionals are expressed in terms of functions of the snake, and of the image. These functions contribute to the snake energy according to values chosen for respective weighting coefficients. In this manner, the internal image energy is defined to be a weighted summation of first and second order derivatives around the contour [11]. The first order differential, dv(s)/ds, measures the energy due to stretching, which is the elastic energy since high values of this differential imply a high rate of change in that region of the contour. The second order differential, d 2 v(s)/ds 2 , measures the energy due to bending, the curvature energy. The first order differential is weighted by ) (s  , which controls the contribution of the elastic energy due to point spacing; the second order differential is weighted by ) (s  , which controls the contribution of the curvature energy due to point variation. The choice of the values of  and  controls the shape that the snake aims to attain. Low values for  imply that the points can change in spacing greatly, whereas higher values imply that the snake aims to attain evenly spaced contour points. Low values for  imply that curvature is not minimized and the contour can form corners in its perimeter, whereas high values predispose the snake to smooth contours. These are the properties of the contour itself, which is just part of a snake's compromise between its own properties and measured features in an image. [2][11].

Fuzzy Logic
The Fuzzy Logic tool was introduced in 1965, also by Lotfi Zadeh, and is a mathematical tool for dealing with uncertainty. It offers to a soft computing partnership the important concept of computing with words'. It provides a technique to deal with imprecision and information granularity. The fuzzy theory provides a mechanism for representing linguistic constructs such as "many," "low," "medium," "often," and ... (2) ... (4) ... (3) "few." In general, the fuzzy logic providesan inference structure that enables appropriate human reasoning capabilities. On the contrary, the traditional binary set theory describes crisp events, events that either do or do not occur. It uses probability theory to explain if an event will occur, measuring the chance with which a given event is expected to occur [20].
The theory of fuzzy logic is based upon the notion of relative graded membership and so are the functions of mentation and cognitive processes. The utility of fuzzy sets lies in their ability to model uncertain or ambiguous data, Figure 4 so often encountered in real life [4] [12].

Figure (4). A fuzzy logic system which accepts imprecise data and vague
Clustering involves the task of dividing data points into homogeneous classes or clusters so that items in the same class are as similar as possible and items in different classes are as dissimilar as possible. Clustering can also be thought of as a form of data compression, where a large number of samples are converted into a small number of representative prototypes or clusters. Depending on the data and the application, different types of similarity measures may be used to identify classes, where the similarity measure controls how the clusters are formed. Some examples of values that can be used as similarity measures include distance, connectivity, and intensity. In nonfuzzy or hard clustering, data is divided into crisp clusters, where each data point belongs to exactly one cluster. In fuzzy clustering, the data points can belong to more than one cluster, and associated with each of the points are membership grades which indicate the degree to which the data points belong to the different clusters. [5].

. Fuzzy c-means Clustering.
• A partition of the observed set is represented by a (c × n) matrix U = [uik ], where uik corresponds to the membership value of the k th element (of n), to the i th cluster (of c clusters).
• Each element may belong to more than one cluster, but its "overall" membership equals one. • The objective function includes a parameter m controlling the degree of fuzziness. • The objective function is If dij = 0 then data point xj coincides with the cluster center cj, and so full membership can be set uij=1. 8. Repeat from (5) until the change in  is less than a given tolerance [7][9].

Experimental Results
Methods of snake and fuzzy c-mean are applied in this research. In this work, methods of applied on a sample of the images where four images with the extension (JPG) pixel dimensions (112*134) where the images contain the tumors in different regions of the brain, has applied the algorithm to the snake on the image as in figures (5-6-7-8), which represented the stages until the detection. While representing figures (9-10-11and 12) the application of an algorithm for fuzzy c-mean. The results were compared between the two methods through time spent in the detection of the tumor and the figure (14) represents the comparison between both methods, where by observing the figure, we find that the snake algorithm has higher speed in the detection of brain tumor of the other algorithm.

8-1 Diagnosed Of Brain Tumor Use Snake Algorithm
The following Figures represent stages in which the Detection of the tumor, depending on the snake algorithm. Where the selection of a set of images containing tumors in different regions of the brain. Where the brain tumor in the Figure (

8-2 Diagnosed Of Brain Tumor Use Fuzzy Method
Program has been designed using the language of Matlab for the detection of brain tumors using Fuzzy Method. The results showed the method that applied four images have tumors in the brain In different regions of the brain as described in paragraph (7.1), Proved by the results the method it has the speed and accuracy in detecting tumors original image fuzzy method

8-3 Comparison between Method
Through the application of a Method on samples from the selected image and calculate that time taken by each method in the detection of focal tumor depending on the function (datestr). The following diagram shows the time taken for implementation of both methods. Where a sequence of (0) to (45) indicates time seconds, while the sequence of (1) to (4) to the Image ID. Figure (13) represents the comparison between the two methods.

Conclusion
In this research, we have proposed a system for computerized detection of brain tour , based on snake algorithms and fuzzy C-mean. Artificial vision aims to replace the human vision in various areas. Image analysis and interpretation represent an essential phase in the chain of the vision process by computer.
In this research the design of the system depends on the snake algorithm to detect brain tumor, as well as the system is designed based on Fuzzy C-means in the detect of the tumor. In the research the results were compared in the two methods which have been proved by the results obtained from the application of methods speed snake algorithm to detect brain tumor compared to the second way.
By the results obtained from the application of the algorithm on four image of tumors in the different regions of the brain and through the implementation of the snake algorithm was: 1. The high speed of the algorithm in the discovery of the tumor as shown in paragraph (7.3). 2. Easy identification of the tumor through the tumor and the surround as shown in the figures (5-6-7 and 8).
It seems that the method could be a helpful diagnostic tool for the diagnosis of Brain Tumor and easy test, assisting physician diagnosis.

Suggestions for Future Works
The system can be modified and developed to be applicable in the diagnosis of several other malignant diseases, which can include: 1. Malignant blood disease (leukemia). Where some of the algorithms can be added to the system to speed the detection of the tumor, such as genetic algorithms and ant algorithm by using a segmentation Image.