Open access peer-reviewed chapter

Detection of Brain Tumor in MRI Image through Fuzzy-Based Approach

Written By

Neha Mathur, Yogesh Kumar Meena, Shruti Mathur and Divya Mathur

Submitted: 06 June 2017 Reviewed: 05 October 2017 Published: 14 March 2018

DOI: 10.5772/intechopen.71485

From the Edited Volume

High-Resolution Neuroimaging - Basic Physical Principles and Clinical Applications

Edited by Ahmet Mesrur Halefoğlu

Chapter metrics overview

1,838 Chapter Downloads

View Full Metrics


The process of accurate detection of edges of MRI images of a brain is always a challenging but interesting problem. Accurate detection is very important and critical for the generation of correct diagnosis. The major problem that comes across while analyzing MRI images of a brain is inaccurate data. The process of segmentation of brain MRI image involves the problem of searching anatomical regions of interest, which can help radiologists to extract shapes, appearance, and other structural features for diagnosis of diseases or treatment evaluation. The brain image segmentation is composed of many stages. During the last few years, preprocessing algorithms, techniques, and operators have emerged as a powerful tool for efficient extraction of regions of interest, performing basic algebraic operations on images, enhancing specific image features, and reducing data on both resolution and brightness. Edge detection is one of the techniques of image segmentation. Here from image segmentation, tumor is located. Finally, we try to retrieve tumor from MRI image of a brain in the form of edge more accurately and efficiently, by enhancing the performance of diffe rent kinds of edge detectors using fuzzy approach.


  • fuzzy inference system (FIS)
  • magnetic resonance imaging (MRI)
  • nuclear magnetic resonance (NMR)

1. Introduction

The tumor refers to as a swelling in any part of body, which creates a lump or mass in the body. The term “tumor” which literally means swelling, can be applied to any pathological process that produces a lump or mass in the body. Tumors are the major characteristic of neoplasm’s [1]. Neoplasm is a group of diseases term usually used for cancers. Sometimes while performing image diagnosis, doctors get confused between the diseases caused due to tumor and diseases caused due to infections. Sometimes it may happen that body cell loses its capacity to react towards the normal physiological mechanisms. The physiological mechanisms help to control the growth of such tissue. Due to which tumor get into place. Neoplastic tissue originates from the body cells due to uncontrolled growth and further can be indicated by the term tumor. In brain, tumor can be found in places such as neurons, blood vessels, skull, lymphatic tissue, pituitary and pineal gland. Brain tumor can be classified on the basis of their level of growth and also on the basis of resemblance with their parent cell. Based on their growth tumor can be classified as: benign tumor and malignant tumor. Benign tumors grow slowly and also do not spread to adjacent tissues whereas malignant tumor grows rapidly and get spread to the adjacent tissues. Based on their resemblance tumor can be classified as: differentiated and undifferentiated. Tumors that are different from their parent cell type are known as differentiated tumors and thus have slow growing rate. Tumors that seem like their parent cell type are known as undifferentiated tumors and thus have high growing rate. While growing, cells of tumor are shed into the surrounding extra cellular space and into the lymphatic system and are trapped in lymph nodes, where they begin to grow, and producing lymph node metastases.

The visualization of tumor depends on the surrounding tissue properties. These properties are physical or metabolic which when different from the tumor helps in visualizing the tumor. Otherwise the tumor boundary will be either distinct or fuzzy. A tumor can be differentiated from the normal tissue with the help of its matrix. This matrix can be textured, homogeneous based on the tumor type. The visualization of tumor boundary greatly depends on the surrounding tissues.


2. Objective

In recent years, segmentation of Magnetic Resonance (MR) image is a good research field requires detection of edges of a tumor in the brain. The purpose of edge detection is to generate an edge map based on the distribution of the intensity discontinuity of the image. The methods used for MRI of a brain have many disadvantages such as the noise and intensity in homogeneities are the two factors from which thresholding-based segmentation method gets affected. The region growing base segmentation method has a demerit as it requires manual interaction which helps in obtaining the seed point and also its noise sensitive nature and dependency on homogeneity that makes it a bad choice for segmentation. Region splitting and merging method are subject to a restriction of segmenting only those body parts that have well-defined boundaries such as lungs or bony structures. In order to obtain training data in classifier method, it requires manual interaction which then restricts it. Since no new data is generated for iteration, thus the usage of same data each time lead to unfair results which then cannot be used for differentiating between anatomical and physiological subjects related information. In order to choose an appropriate parameter that helps in placing an initial model, the boundary-based methods require manual interaction and are also more computationally expensive. Hybrid methods are insufficient for the segmentation of complex medical images. So, to make hybrid methods efficient enough to produce successful segmentation they are combined with powerful initialization techniques. In order to overcome the mentioned shortcoming of the above methods used for segmentation of brain MR image, edge detection using fuzzy approach. On the basis of the intensity histogram of an image, this system divides an image into multiple groups. These groups are determined on the basis of threshold values of an input image such that each group will have a different threshold value. To cluster the pixels into groups we have used k-means clustering where the pixels are grouped on the basis of their intensities and different groups are represented as the interval defined by two consecutive strong valleys on the intensity histogram of the image. The fuzzy-based automatic thresholding technique with k-means clustering improves the edge image when it is used by the classical Sobel operator.


3. Overview of brain MRI image segmentation

The Brain MRI image segmentation is a technique which involves study of the brain tumors, which can be detected easily from brain MR image [7]. While detecting the tumor; it involves techniques that differentiate different tumor area from Magnetic Resonance (MR) images. Magnetic resonance imaging (MRI) is used for brain imaging and is a high-quality medical imaging. This technique is useful to see the level of detail in the human body. Many imaging methods are developed for the early detection of brain tumors and also for its diagnostics purpose. As compared to other imaging techniques such as Positron Emission Tomography (PET), Magnetic Resonance Imaging (MRI), and Computed Tomography (CT), MRI is the most efficient one. These are the qualities of MRI, which make it efficient such as high contrast of soft tissues, high spatial resolution.

The important feature of MRI is that it does not produce any harmful radiation also it is reliable and has fast detection and classification of brain cancer. The brain tumor segmentation has many stages. When segmentation of brain MR images is done manually, the process gets time consuming and gets tedious. Thus to reduce manual interaction in brain MR image segmentation, there is a requirement of automatic methods.

3.1. Types of brain MRI image segmentation

The image processing techniques used for brain MRI image segmentation can be classified in three ways, the first way contains region-based methods, the second way contains boundary-based methods and the third way contains hybrid method. The following Figure 1 represents the classification of brain image segmentation methods.

Figure 1.

Block diagram of MRI image segmentation methods.

The segmentation methods which are used to segment a MRI image of a brain are as follows:

3.1.1. Region-based methods

Region is an important concept in the field of segmentation of an image. In an image of a scene a region may correspond as an object as pixels belonging to an object are grouped together and marked. The accurate segmentation of an image involves proper portioning of an image into different regions, which thus can be possible by using gray values of the pixels of an image. The region-based segmentation groups the pixels of an image, which are neighbors and also have similar values. The pixels having different values are split from each other.

The region-based methods for segmentation of MRI image of a brain includes following approaches:

  1. Generation of thresholds

    In this technique images is assumed to be composed of different regions having different gray level ranges. Under the sequence of steps followed during image processing operations, thresholding is the initial step which is used to determine the intensity value of an image called the threshold, which generates the different classes. In this technique of segmentation the pixels are grouped according to the intensity between the two thresholds into one class. Thus, in this method more emphasis is given to the selection of good threshold. This approach-based methods generally deal with activities used to perform preprocessing of medical images and preregistration problems. But the spatial characteristics of an image are not considered by this method, which makes thresholding more sensitive to noise and intensity in homogeneity’s, which occur in MRI images.

  2. Region extraction

    On the basis of some predefined criteria such as intensity information and edges in an image, etc. some regions of the image are being extracted. The first step of this technique requires an initial seed point which is useful in extracting regions connected to that seed point with same intensity value. The pixels or group of pixels belonging to the region of interest is known as seeds. In the second step, on the basis of homogeneous pixels in small neighboring regions are examined and selected pixels are added to the growing region. The above step repeats until and unless no more pixels are added to the growing region. Finally the object is detected from all the pixels that are added to the growing region. But this method has disadvantages that for extraction of each region of interest seed point is to be planted which requires manual interaction. Another demerit of region growing is that it is sensitive to noise and also its dependency on homogeneity criteria may cause extraction of those regions which are not of interest.

  3. Region splitting and merging

    This approach is the special case of region growing method, such that after applying region growing method when homogeneity criteria is not satisfied by a region, then a splitting method is applied which splits the region into four subregions. The splitting method continues until all regions satisfy the homogeneity criteria. In the final step of this technique, a quad tree having each vertex with exactly four descendent is generated and the leaf vertices of the quad tree represent homogeneous regions. This technique performs quite well while segmenting organs that have well-defined boundaries, such as lungs or bony structures. The major problem with this approach is the boundary leakage. As this method is a hierarchical approach to region-based image segmentation, so it also has the same disadvantage as the region growing have.

  4. Classification methods

    With the help of image data having prior known labels, a feature space is derived from them, which is the range space for any function of the image. Thereafter, classification methods implement efficient strategies to partition a feature space. It is based on the pattern recognition techniques.

3.1.2. Boundary-based methods

In this method an image is viewed as a collection of various objects. Each object is assumed to be composed of many solid shapes, by making outlining on the surface of objects into solid shapes with the help of parabolic lines. The objects get separated from the background due to which it’s become easier to get information from an image.

This type of approach consists of the following method:

  1. Parametric deformable model

    Under the influence of internal and external forces, some curves or surfaces, gets deformed, the selection of these curves or surfaces is made by the parametric deformable model. In the MRI image when a tumor is present at the boundary of an object, it is extracted by placing a closed curve or surface near the desired boundary and then makes this as an input for an iterative relaxation process. The major disadvantage of this method is that for the selection of initial model and appropriate parameters, this method require manual interaction.

  2. Non-parametric deformable model

    Curve convolution theory and level set methods are the concepts on which this model is based on. There is no dependency on parameters for the evolution of the curve, but this involves expensive computations.

3.1.3. Hybrid methods

The hybrid method is the combination of above approaches containing advantages of above approaches. In this approach limits of interested region is determined with the help of segmentation of an image is achieved. In order to select threshold values several diffe rent methods exist which includes manual selection of thres hold value or an automatic computation of threshold value known as automatic thresholding [8, 9, 10, 11, 12]. This type of approach consists of the following methods:

  1. Level set methods

    To handle any of the cracks, concavities, convolution, splitting, or merging without the need of training data, level set methods are used [7]. But limitation of this method is the requirement of specifying initial curves and also good results will be provided only if these curves are placed in the symmetric form with respect to the object boundary. In order to produce successful segmentation complex medical images, Level set segmentation need to be combined with powerful initialization techniques.

  2. Graph cut method

    The concept of graph partitioning is used by this method under which each image is treated as a graph G such that the vertices of graph G are composed of pixels and in order to achieve image segmentation, weight of each edge is determined based on the vertices it relates.

The graph cut method can also be implemented using following methods:

  1. Min-cut/max-flow method

    Under this approach two reusable and non-overlapping search trees represented as tree S from sources and T from sink t are used. The direction of tree S is from parent node for children and the tree T has a direction from children to parent node. On the basis of outer border or inner border both tree either tree S or T can have active or passive nodes respectively. And those which are not present in either tree are known as free nodes. In some case min-cut algorithm for graph cuts can produce bad partition.

  2. Normalized graph cuts method

    In this method measurement of dissimilarity among different groups and similarity within groups is computed. Using the above measure of similarity a MRI image of a brain gets segmented.

From the above content it is clear that, clustering methods are more suitable to implement for MRI image segmentation, but it needs some automation.


4. Overview of fuzzy logic

The Fuzzy logic is an approach in the field of computation which is rather than using usual “true or false” (1 or 0), which is used by modern computers as a Boolean logic, determines the “degrees of truth.” Dr. Lotfi Zadeh from the University of California [2], at Berkeley in the 1960s, while working on the problem that how the computer can understand natural language, was the first one to present the idea of fuzzy logic. Natural language which is used for many activities in universe is not easily translated into the absolute terms of 0 and 1.

Fuzzy logic to some extent seems similar to the working of a human brain. A human brain while taking any decision or reaching to any result initially aggregates some related data, from that data generates some partial truths. These partial truths are further aggregated by human to create some new truths of higher level, when these truths exceed some threshold values, a decision is taken or certain resultant state is being reached e.g. motor reaction. The working of an artificial computer neural network and the expert systems is analogous to the above process.

The mathematical models are used in the classical control theory, required for the description of physical plant under idea but the core of fuzzy logic emphasis on the creation of a model made of human expert, who does not thinks in terms of mathematical models to control the plant [3].

Fuzzy systems have its application in following situations:

  • Fuzzy system is used in situations where actions of a system are not well understood e.g. highly complex systems, and

  • Another type of situation in which Fuzzy system is used is those situations whose solutions exist, but the solutions that exist are an approximate one.

Fuzzy logic was first utilized for practical applications by the Japanese in their high-speed Sendai train. With the help of fuzzy logic, Japanese was able to improve economy, comfort, and precision of the ride on the train [4].

Fuzzy logic has its applications in many areas such as: in Sony pocket computers for the recognition of hand written symbols; in helicopters for flight aid; In subway systems controlling to improve the driving comfort, precision of the halting, and power economy; in automobiles to improve fuel consumption; in washing machines controlling through single-button, in vacuum cleaners to provide automatic control to motor with recognition of surface condition and degree of soiling; and prediction systems for early recognition of earthquakes through the Institute of Seismology Bureau of Metrology, Japan [5].


5. Overview of fuzzy inference system

The mapping from a given input to an output is expressed by the fuzzy inference system using fuzzy logics. The resultant output helps in taking the decisions and detection of various patterns. The fuzzy inference system involves concept which is described in membership functions, logical operations, and if-then rules [2]. The fuzzy inference systems have application in the area such as automatic control, the data classification, decision analysis, expert systems, and the computer vision. Because of the multidisciplinary nature, the fuzzy inference systems can also be called as, fuzzy-rule-based systems, the fuzzy expert systems, the fuzzy modeling. A fuzzy inference process whose initial state starts from fuzzification and end at a state defuzzification is displayed by following Figure 2 :

Figure 2.

Fuzzy inference system.

The Figure 2 above represents the Fuzzy inference process which comprises of five operations:

  • Initially input variables get fuzzified.

  • Then the fuzzy operator (AND or OR) are used in the antecedent.

  • Implication from antecedent to the consequent.

  • Aggregation of the consequents across rules.

  • Defuzzification.

Figure 3.

Image histogram after segmentation.

Sugeno-type fuzzy inference system was introduced in 1985 by Takagi-Sugeno-Kang [6] is similar to mamadanitype in the context of fuzzification and application of fuzzy operator. But sugeno type system has ouput membership functions either linear or constant.


6. Tumor detection using fuzzy-based K-means clustering system

The K-means segmentation method is used for further segmentation. In this method the procedure defines to obtain different threshold values, the histogram was segmented into groups/classes. Then this algorithm is used to calculate total image cluster centers, used to evaluate the most significant value of threshold. This proposed method is basically a measure of class separation. The local threshold method is used to find K-means segmentation threshold.

The basic steps of the algorithm of the proposed technique are:

  1. Read the input MRI image 7.tif represented as f(x, y).

  2. The histogram H of an input MRI image is generated. The histogram H is segmented using K-means segmentation method and gets divided into different groups (set of pixels). The groups generated for 7.tif MRI image are (0, 63), (64,137), (138,199), (200,255). The following Figure 3 shows groups marked as the red circle on peak valleys, obtained after the segmentation of histogram H.

  3. An input MRI image f(x, y) is convolved with Sobel kernel to generate gradient image f’(x, y).

  4. Using fuzzy reasoning process, the Mean of edge magnitude, Mode and pixel count for the each group: (0, 63), (64,137), (138,199), (200,255) are calculated individually. Mode referred as most repeated value. Pixel count determines the number of pixels in the groups. The following equations are used to compute mode and pixel count.

    Mode K = calmode group k ; E1
    Pixel count K = Sum of pixels group k / sum of pixels b ; E2

    A mean of edge magnitude for a particular group is computed by using a mean value mng1 of pixels which is greater than group mean and a mean value mng2 of pixels which is lesser than group mean. Mean of edge magnitude for a particular group can be calculated using the below equation.

    Mean of the edge K = mng 1 mng 2 E3

    The parameters such as mean of an edge, mode and pixel count all are applied as an input to Fuzzy inference system whose membership functions for mode, mean edge, pixel count and output are represented in Figures 4 , 5 , 6 and 7 respectively.

  5. In this step each group is applied to the fuzzy inference system. Here group includes the parameters such as mean edge, mode and pixel count which are taken as an input values to be applied. Each system has its rule set, here in the proposed algorithm the fuzzy rule set for MIN-MAX Mamdani fuzzy inference system are used represented in the Table 1 . The Fuzzy Inference System describes the rule base where 18 inference rules are determined. In the rule set three subsets are defined as “S” for small subsets, “M” for the medium subsets and “L” for large subsets. In the fuzzification process of fuzzy inference system these subsets are used to determine the effect of a particular group parameter. The output obtained from the fuzzy rule set is represented either in form of M or L. In the fuzzy rule set an output set is defined individually for each possible 18 combinations of S, M and L subsets for mean edge, mode and pixel count respectively for each group.

Figure 4.

Membership function for mode.

Figure 5.

Membership function for mean edge.

Figure 6.

Membership function for pixel count.

Figure 7.

Membership function for output.

Rules 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Mean edge S S S S S S M M M M M M L L L L L L
Mode S S M M L L S S M M L L S S M M L L
Pixel count S L S L S L S L S L S L S L S L S L
Output M M M M M M M M M L M L M L M L L L
Mean edge S S S S S S M M M M M M L L L L L L

Table 1.

Fuzzy rules set for MIN-MAX Mamdani fuzzy inference system.

While working on the Mamdani fuzzy inference system there occur the following window shown in Figure 8 which represents possible 18 combinations of S, M and L subsets for mean edge, mode and pixel count respectively for each group. The user can select the values of each subset on the basis of parameters of the group. Then on the basis of values of each subset, a particular output (either in form of M or L) will be generated.

  1. This step involves the process of defuzzification. The output value obtained above for each group is taken as an input to generate crisp scalar output value represented as fuzzyi , for i th group. The crisp scalar output value is used to determine threshold value for a particular group can be represented from the following equation:

t i = mode i + fuzzy i E4

where ti is the threshold value for the i th group, modei is mode value of i th group, fuzzyi is output of fuzzy inference system defuzzification process for i th group.

  1. In the last step the final thresholds ti for each group of histogram is applied independently to the gradient image f’(x,y) generated in the third step. The output is an edge detected binary images shown in the last column of Table 2 . The flow chart in Figure 9 represents the basic steps of algorithm used for detection of edges in MRI image of a human brain. In the first step, the image is input into two systems: from the one system its histogram is generated and with the other system, known as Sobel edge kernel, image is convolved to generate a gradient image f ’(x, y). Then in the second step, different groups are generated from the histogram of an image by using k-means algorithm. These groups in the third step input into a fuzzy reasoning process used to compute the mean, mode and pixel count of each group. In the fourth step, membership function is computed for each group using above values of mean, mode and pixel count and rule set of Mamdani fuzzy inference system. In the last step, different threshold values are obtained. Then these threshold values and the gradient image f ’(x, y) is used to obtain final edge detected binary image.

Figure 8.

Selection of membership function through rule base.

Table 2.

Comparison of various edge detectors with proposed method.

Figure 9.

Flow chart showing steps of proposed approach.


7. Conclusion

In this method we take an MRI image of a human brain for edge detection. MRI image given as input to the system and its histogram segmented using our proposed method and get better results. In this step, a process must be executed after giving input, which checks all the required outputs and obtain the one which produces images in a proper and desired format. Each MRI image of a human brain is segmented while applying each type of edge detector. The performance evaluation of various edge detectors can be made by two ways. First on the basis of human judgment this is known as subjective method. Second on the basis of values of signal to noise ratio and mean square error between the edge detector image and the original image, this is known as an objective method. The edge detection is performed using automatic generation of threshold values using fuzzy approach. While using automatic thresholding approach the initial groups are computed using k-means clustering algorithm. Then for each obtained group a different threshold value is being generated using Mamdani fuzzy inference system rules set. These thresholds are then provided to Sobel edge detector. The comparison between the performance of edge detectors, by considering an edge detected image obtained by using edge detectors such as classical Sobel edge detector, canny edge detector and Sobel edge detector with proposed method is made on the basis of subjective method. The simulation results are shown in Table 2 , whose first column represents the input of original MRI images 7.tif, 30.tif, 9.tif, 35.tif, respectively. The second, third and fourth column of table contains the output edge detected image obtained from the classical Sobel edge detector, Canny edge detector and modified Sobel edge detector using proposed method respectively.

In Table 2 , the performance of classical Sobel and canny edge detectors on the basis of human judgment, compare with the performance of the improved Sobel edge detector implemented by the proposed method. After Serial number, the leftmost column shows the original image and the rightmost column shows the edge detected image of it obtained from the improved Sobel edge detector. The edge detected image obtained from the classical Sobel and canny edge detectors is presented by the second and third column respectively.

From the above result, it is clear that Canny edge detector provides over segmentation as it provides a large number of edges in an image which makes difficult to detect the tumor. Classical Sobel provides a limited number of edges, which in some images not even completes the boundary of tumor. When proposed method is applied to the classical Sobel, it enhances its performance by providing complete edges of the tumor.


  1. 1. Jain R, Kasturi R, Schunck BG. Machine Vision. McGraw-Hill, Inc.; 1995. pp. 140-185. ISBN 0-07-032018-7
  2. 2. Zadeh L. Fuzzy sets. Information and Control. 1965;353:338-353
  3. 3. Kerre EE, Nachtegal M. Fuzzy Techniques in Image Processing (Studies in Fuzziness and Soft Computing, 52). Physica Verlag; 2000
  4. 4. Russo F. Edge detection in noisy images using fuzzy reasoning. IEEE Transactions on Instrumentation and Measurement. 1998;47(5):1102-1105
  5. 5. CS Lee, Kuo Y-H. Adaptive fuzzy edge detection for image enhancement. Proceedings of IEEE World Congress on Computational Intelligence, vol. 2; May 1998. pp. 1542-1547, ISBN 0-7803-4863-X
  6. 6. Tizhoosh HR. Fast Fuzzy Edge Detection. IEEE 0-7803-7461-4/02
  7. 7. Balafar MA, Ramli AR, Saripan MI, Mashohor S. Review of brain MRI image segmentation methods. Artificial Intelligence Review, Springer Science. March 2010;33(3):261-274
  8. 8. Pham DL, Xu CY, Prince JL. Current methods in medical image segmentation. Annual Review of Biomedical Engineering. August 2000;2:315-337, ISSN: 0269-2821
  9. 9. Gonzalez RC, Woods RE, Eddins SL. Digital Image Processing Using MATLAB. New Delhi: Dorling Kindersley (India) Pvt. Ltd., McGraw-Hill; 2011, ISBN0071084789
  10. 10. Shapiro LG, Stockman GC. Computer Vision. Prentice-Hall; 2001. pp. 279-325, ISBN 0130307963
  11. 11. Mobahi H, Rao S, Yang A, Sastry S, Ma Y. Segmentation of natural images by texture and boundary compression. Proceedings of International Journal of Computer Vision (IJCV), Springer. October 2011;95(1):86-98, ISSN0920-5691
  12. 12. Tang J, Peli E, Acton S. Image enhancement using a contrast measure in the compressed domain. IEEE Signal Processing Letters. October 2003;10(10):289-292, ISSN1070-9908

Written By

Neha Mathur, Yogesh Kumar Meena, Shruti Mathur and Divya Mathur

Submitted: 06 June 2017 Reviewed: 05 October 2017 Published: 14 March 2018