Segmentation of Brain Tumor in Multimodal MRI using Histogram Differencing & KNN

Tumor segmentation inside the brain MRI is one of the trickiest and demanding subjects for the research community due to the complex nature and structure of the human brain and the different types of abnormalities that grow inside the brain. A Few common types of tumors are CNS Lymphoma, Meningioma, Glioblastoma, and Metastases. In this research work, our aim is to segment and classify the four most commonly diagnosed types of brain tumors. To segment the four most common brain tumors, we are proposing a new demanding dataset comprising of multimodal MRI along with healthy brain MRI images. The dataset contains 2000 images collected from online sources of about 80 patient cases. Segmentation method proposed in this research is based on histogram differencing with rank filter. Morphology at post-processing is practically implemented to detect the brain tumor more evidently. The KNN classification is applied to classify tumor values into their respective category (i.e. benign and malignant) based on the size value of tumor. The average rate of True Classification Rate (TCR) achieved is 97.3% and False Classification Rate (FCR) is 2.7%. Keywords—MRI imaging; tumor types; image segmentation; Histogram Differencing; KNN


INTRODUCTION
Image segmentation is not a hectic task in the field of image processing.Segmentation is a process of extracting the required region from the overall image.Medical image segmentation helps physicians to identify abnormal regions in the body, which tend to save time and efforts of the physicians.Tumor inside a human brain is among the most lethal diseases nowadays.According to the American National Institute [6], almost 3 billion people die annually because of this disease.According to medical study, more than 100 types of tumor have been diagnosed to date, but few of them are most common including Glioblastoma, which is most acute.In this research work four most acute types of brain tumor i.e.Glioblastoma, Meningioma, CNS Lymphoma, and Metastases have been considering.
In the medical study, Tumor broadly categorizes into two classes, tumor in the initial steps consider as primary and tumor with more aggressive in nature known as secondary.Primary tumors are those which spread in the area of their origin and are further divided into benign and malignant.
A benign tumor can be categorized as non-cancerous and in a stage from where a human can recover while malignant is more aggressive and may lead to cancer.Secondary tumors are spread from one organ to other and are normally not recoverable.
There are several techniques used to generate Medical images for medical studies.Amongst them, MRI is the most widely used, because most of the other techniques like Computed Tomography (CT) and X-Rays uses high ultraviolet (UV), rays which are harmful to human health, while the MRI scans use the magnetic field which is comparatively less harmful to UV rays.MRI images have different kinds of modalities like Sagittal, T1, T2, and Flair which represent the different variation of the same organ.Under the research conducted by American Brain Tumor Association [7], around 78,000 new patient cases including 25,000 fundamental and 53,000 non-risky tumors are apparently going to be diagnosed.

Brain Tumor & Types
A Brain tumor is one of the most widely occurred diseases that can threaten human life to death.Like other types of tumors, the brain tumor has about 120 different types [7].Out of these 120 types, some are acute and some are chronic.In this research work, we will be using the following four types of a brain tumor as they are more severe and grow quickly.

Glioblastoma (GBM)
These types of tumors grow in the glial cells of the brain and are hence called as glioma, one of its types is Gliomablatosma also called astrocytoma, and the cells where it grows are astrocytes [28].

Meningioma
Meningioma is considered as primary, and most of the tumor in Meningioma is benign because of its slow growing nature [29].

CNS Lymphoma
This type of tumor arises in the lymphatic tissues which are the main module of the body immune system; this type of cancer is called CNS Lymphoma (CNSL) or Primary CNS Lymphoma (PCNSL) [30].

Metastatic
The metastatic brain tumor also called secondary brain tumor.A tumor begins in rest of the body and spoils the brain become known as metastatic [31].www.ijacsa.thesai.org

MRI Types
The MRI can produce multiple plan or slices of the brain based on the thickness and position of the head.The Fig 1 show different slices and angles generate in the MRI modalities.For diagnosis single type of brain tumor or diseases multiple modalities generated by a physician to study the nature of the diseases [32].The rest of the paper is organized as: In section II the relevant literature review is presented.In section III the detail description of the proposed dataset is provided.In section IV the methodology proposed in this research work is presented in detail.In section V the experimental values and detail discussion about the end results are explained.In section VI the conclusion is given of this research work.
Shen et al [1] offer an algorithm for segmentation to improve cerebral tumor pattern C (FIMC) between neighbors and neighboring neighbors within each group of each neighboring pixel to try to attract each pixel to its own mass.The results comparing the segmentation of coding algorithms FIMC and MHF in three types of synthetic brain imaging, and brain magnetic resonance imaging exporter (South IBSR General Hospital).Reddy et al [3] present a confidence surface base novel idea on the basis of texture and intensity information from multiple MR images modalities T1(weighted), T2 weighted (T2), and FLAIR to segment brain tumor.The comparison of both proposed and original technique is, that the technique proposed by the authors can also differentiate normal tissues from those which are affected by the tumor.Szilagyi et al [2] present two methods, one for features extraction from images provided by BRATS 2012 dataset and in the second method the features passed to the optimal decision tree for selecting the tumor region.After this, a level-set segmentation is used to separate tumor and edema in the image.
Segmentation obtained with our method is more accurate than before, especially for low-grade tumors.Abdel et al [4] developed a system for the segmentation of tumor using Kmeans with the combination of Fuzzy C-means (FCM) algorithm to identify brain tumor precisely and as quickly as possible in MRI image.The purpose of combining the two algorithms is the accuracy of FCM and fast computation of K-Mean algorithm is considered.For the evaluation of their method total of 255 MRI images were used.Zhan et al [5] develop a method utilizing the intensity feature of multispectral MRI from both normal and abnormal.The feature is then passed to sparse representation classifier and also to Markov Random Field (MRF) regularization to classify into the tumor and normal tissues of the brain.Selva Kumar et al [17] developed brain tumor segmentation method based on k-mean and fuzzy C-mean (FCM).For getting better results of median filter salt and paper noise is added to suppress the noise for more efficient outcome.The extraction of characteristics is done by thresholding, at the end of the last segmented cluster approximates reasoning method for recognizing the shape and position of the tumor on MRI is obtained.The method is compared with the other segmentation algorithms and found to be more accurate in terms of segmentation.
Aslam et al [18] built up an enhanced sobel edge detection system for brain tumor origin extraction.The improved sobel edge detection technique is used with dependent thresholding to finds different regions in MRI images using closed contour algorithm.The improve sobel edge detection technique is working better for closed counter in tumor extraction.The performance of the technique is tested on 7 MRI images.Azhari et al [19] present a method to recognize and detect tumor in brain MRI images.To enhance the quality of the MRI image, the median filter is used as preprocessing step, the Canny edge recognition method is then applied to smooth the edges and get directions of the edges.Initially, the histogram of the cluster is used to build the image and the detection of cancer.To optimize the system design 50 images were used and 100 outside the sample neuroimaging test, the proposed system of the authors gives an error of 8%.Han et al [20] developed an improved segmentation for brain tumor by combining two methods fuzzy clustering and fuzzy edge enhancement.These study results show that the obscure and complex fuzzy segmentation curve were highly efficient.In the case of a medical image processing algorithm provides promising future application.
Angoth et al [21] present a wavelet base fusion method for brain tumor detection.The images from different Modalities CT and MRI passes through the median filter to improve contrast and brightness.After the filtering process, the images are passing through wavelet analysis followed by wavelet fusion by taking the average minimum or maximum of the coefficients.The algorithm compares with other present methods to show the effectiveness of the proposed algorithm.Nosheen et al [22] developed an automatic method for the detection, segmentation, and for features set evaluation of brain tumor using dataset of NCI-MICCAI 2013.The two methods Gabor Wavelet (GW) and Gray Level Co-occurrence matrix have been used.Firstly, different features like frequency, locality, and orientation extracted through GW from the frequency and spatial domain.Secondly, the GLCM, GLRLM, HOG, and LBP methods are used to extract texture base features.At the end, the comparison of both the features extracted method and based on their comparison statistical features gives better results.www.ijacsa.thesai.orgDahab et al [23] in their research present a modified Probabilistic Neural Network (PNN) based image segmentation technique to detect brain relying on learning vector quantization (LVQ) for automated brain tumor classification.First, the image smoothing and enhancement operations were performed using linear and Gaussian filter.For the edge detection, a vector subtraction algorithm with the ROI and Canny edge detection method is practically applied to identify the edges.These are carried to transform the conventional PNN based on LVQ.The experimental results were carried out on 64 MRI images with the overall accuracy rate of 100%.Ahmad et al [24] present a new yet effective and simple method and dataset of multimodal MRI images for the segmentation of four most commonly diagnose types of brain.The segmentation is consist of four basic steps, at the preprocessing 2D adaptive filter is applied to make the brain MRI image more appropriate for segmentation, after this, in the second step a threshold base segmentation utilizing Otsu's is applied to get the segmented image.In the third step, morphological operation is applied using erosion and dilation to remove the extra particles like Gaussian noise and the remaining skull of the MRI image for getting tumor region more precisely and correctly.At the final step, overlay base image fusion is used to craft the tumor region more noticeable for decision making.

III. PROPOSED DATASET
The proposed dataset consists of multiple modalities and different variations of MRI images.The total number of MRI images in our dataset is 2000 including healthy and tumor affected MRI.The detail about our proposed dataset is given in Table 1.The dataset builds from the online available radiological sources Radiopaedia [25] and verified from an FCPS Neurosurgeon for make it more authenticated.The sample of our proposed dataset for the aforementioned types of tumors can be seen in

B. Post Processing
In the post processing, we combine two techniques, 2-D order statistic filter and Morphological operations for getting better tumor resultant image.The 2-D order statistic filter is applied to support morphology to minimize the size of structure element used in morphology for erosion and dilation.

a) Order statistic filter
The above Fig 6 clearly shows that the extra boundaries affect the shape and the Tumor Size in the resultant image getting after the histogram differencing to remove those boundaries we apply order static filter.The order statistic filter is an order based filter, which defines or estimate the order like first order statistic or min, largest order statistic max etc.Given observationsX 1 , X 2 , X 3…………….. X N of a random variable X.
The order statistics are obtained by sorting the ascending order.This produces Y(i) satisfying X(1),X( 2
Filtering using order statistics perform extremely fine in the existence of preservative white noise or impulsive noise if the filter is designed appropriately.One of its property is to preserve the edges and is very much simple in term of computational complexity, their computation can become faster if the algorithm is designed properly [26].After applying order static filter the tumor shape and size become more prominent, the result of the order static filter can be seen in Fig 7, where the boundary removes without affecting the size and shape of the tumor up to certain level.C. Classification using KNN KNN (K-nearest neighbor) is a non-parametric, because of its non-parametric approach it's become very useful for the real world problems to classify, KNN used in both classification and regression of data.KNN is a simple algorithm that store all variable or cases and classifies new cases based on some similarity function like distance base using Euclidian distance etc to find the nearest cases.KNN is a statistically based method used for pattern recognition and classification of cases.

V. RESULTS AND DISCUSSION
After segmentation the tumor size will be calculated and will find the percentage of tumor in MRI image.According to WHO report of 2007 [27], the tumor is graded into four different grades from grade 1 to grade 4 based on the size, aggressiveness, and intensity etc of the tumor.To classify the tumor into their respective category, size is one the main features of through which we can easily identify the tumor category.In this research work, the size of the tumor region is calculated through matrix manipulation (MM), the purpose of the matrix manipulation (MM) is to find out the total number of foreground/tumor pixels and background/non-tumor pixels.
To find both foreground and background pixels, first we find and calculate the total number of pixels (TNP) from the matrix of the final segmented image.After calculating TNP through MM from the matrix of the segmented image, we then calculate the number of foreground pixels (NFP), the foreground pixels is representing by 1 in the matrix and 0 represent background pixels in the matrix.The NFP is the indication of tumor pixels which is further used for finding the size of the tumor.In  After calculating the TNP and NFP in the image matrix, we locate and find out the Tumor Size in two modes, in percentage and in millimeter square (mm 2 ).Firstly, the Tumor Size is calculated in percentage using the parameters generate during the MM.In the first mode of calculating the Tumor Size in percentage is as follow.
In the following, divide NFP by TNP and multiply by 100 to find out the tumor size in percentage.
Secondly, after calculating the tumor size in percentage in the first mode, the same number of parameters of MM will be utilized in the second mode for calculating the tumor size in mm 2 .
The following steps of calculation are used to find out the Tumor Size in mm 2 during the second mode.In the second mode, first take under-the-root of NFP and then multiply with a single pixels value in mm 2 which is 0.264mm 2 (1 pixels = 0.264 mm 2 ).
After calculating size of tumor from the foreground pixels, the size value calculated in mm 2 is considered to classify the values into two classes benign and malignant using KNN, the www.ijacsa.thesai.orgsize values are calculated for both healthy and tumor MRI images and divided into two classes for classification.Using the KNN for classification, we used the Euclidian Distance in KNN and consider the different variation of k values from 1 to 9 for classification to verify the effectiveness of our algorithm.
To get the accuracy rate for different variations of k using KNN, the True-Classification-Rate (TCR) and False-Classification-Rate (FCR) is calculated for the number of values generated from the dataset.(2) The details results of classification via KNN for the different variation of k are presented in Table II.The results can vary on different datasets and may possibly be affected by the number of data being used for classification.The number of 80 patient cases containing 2000 MRI images for the four used types of tumors with healthy MRI images is consider for testing purpose based on k values from 1 to 9. If we look into the table II, it is very much clear that every value of k gives a different rate of classification, for k = 1 the TCR rate is 95% and for k = 9 the TCR is 99%.The overall results show that taking value of k higher than 9 will give results that will become bias for our proposed dataset.So far it is observed from the testing that for the proposed dataset the best suitable k value is in between 1-to-9.
The table II shows the overall TCR and FCR for the proposed dataset generated on the basis of k values from 1 to 9. In

Fig 2 (
Fig 2 (a), shows the presence of Primary CNS lymphoma in different modalities of MRI, given the homogeneous vivid enhancement, location, and restricted diffusion.The MRI image related to a male patient case with 79 years of age.

Fig. 2 .
Fig. 2. Sample of MRI Modalities and Tumor Types used in our proposed dataset IV.METHODOLOGY In this research work, we proposed a new technique for the segmentation and classification of four basic types of tumors using brain multimodal MRI images.This method is based on the histogram differencing based segmentation and unsupervised KNN classification.In the post processing rank filter is used with morphological analysis to remove the skull and extra particles from the segmented image for making thing easy during the calculation of tumor region.The Tumor Size is calculated from the matrix manipulation of the segmented image.In the Fig 3, shows the step by step implementation of our proposed algorithm.

Fig. 3 .
Fig. 3. Proposed algorithmA.Histogram DifferencingHistogram base segmentation method depends on one of two essential properties of force qualities intermittent and similitude.To start with class is to segment an image in light of sudden changes in force, for example, edges in a picture.Second class depends on parceling an image into locales that are comparative as indicated by predefined criteria.Histogram based approach falls under this class.The Histogram is developed by part the scope of the information into equivalent estimated of canisters/sections likewise called classes.At that point for every cluster, the quantity of focuses from the information set that fall into every canister is numbered.Building the picture histograms, the pixels shape the flat pivot is considered.First, the histogram of the initial grayscale MRI image is generated.Fig 4 shows the histogram of the original grayscale image.

Fig. 4 .
Fig. 4. (a) The original gray scale image (b) histogram of the original gray scale image After getting the histogram of the initial image.we than calculate number of columns in the gray scale image to extract the left and right side of the image for histogram differencing HD, and then separate histograms of left and right side images are computed to find the difference between the two histogram.The steps of the histogram differencing method are as follow.

Fig. 5 .
Fig. 5. a) Represent the left half the gray scale image with the resultant histogram, (b) Represent the right half the gray scale image with the resultant histogram When the two parts, left half of the original gray scale image LH and right half of the original gray scale image RH with their appropriate histograms are computed from the initial brain MRI image, the difference between the two histogram generated from the two histograms LH and RH.Difference of both histograms results in segmented image with the affected or tumor region inside the MRI.The resultant image produced by the histogram differencing can be seen in Fig 6.In Fig 6(a) shows the histogram of the two previously constructed histograms, in Fig 6(b) the resultant image produced by the through histogram differencing with the tumor region as foreground.

Fig. 6 .
Fig. 6.The resultant display after histogram differencing (a) showing the resultant histogram of Histogram Differencing while subtracting the two histogram (b) shows the resultant image after applying thresholding on the resultant image generated from histogram differencing

Fig. 7 .
Fig. 7. the figure shows the resultant display of the order static filter, (a) the resultant image of the histogram differencing, (b) the actual resultant image generated after applying order statistic filterb) Morphological operation Applying the order static filter gives significant results but still, there is some noise which may affect the size of the tumor during calculation.To get the more precise region of the tumor for size calculation, we apply morphological operations to removes that extra little noise and particles.In combination applying morphology with the order static filter gives significant results.The structure element design for performing the morphological operation is 5*5 for dilation and 7*7 for erosion.In Fig8, the size and the construction of the structure element developed for this purpose can be seen.Both the structure elements give the desired results as required.

Fig. 8 .
Fig. 8.The two structure elements (SE) used in the morphology steps, (a) diamond shape 7*7 SE, (b) diamond shape 5*5 SE In Fig 9, we can clearly see that the tumor is coming more prominent after applying morphological erosion and dilation bases on the design structure elements showing in the above Fig 8 after applying morphological operation its becomes easy to calculate the size of the tumor and to classify the tumor based on the size.

Fig. 9 .
Fig. 9.The resultant display image of morphology step, (a) the result of order static filter showing in 7 (b), (b) the resultant image after applying morphology The KNN is used for continuous values; applied the various number of k values for measuring and to compute the distance between the values of two classes, for this the Euclidian distance is consider based on k values from 1 up to 9. In this research work, the KNN classification is used to classify the tumor values into two classes benign or malignant.For the classification, the values of tumor are generated from the segmented image showing the tumor tissues, the value represent different size of tumor in mm 2 .The values are generated for the complete dataset of the proposed images and consider for KNN classification.For the classification of two classes, we have the data in a and b (a 1 ,b 1 ),……………………….,(an ,b n ).a€R D , a represent the values of classes tumor and nontumor on the x-axis in D-Dimensional plane.b € {0,1}, b belongs to finite class representing the classification of values.The b will consider values from the two classes for classification it will be either in tumor or nontumor.Now taking a new values z which will represent a new label of a class as k-nearest value to classify the values into their respective category.If the highest numbers of labels from the two classes close to the k-nearest point z then the classification results will award the same class as an outcome.
Fig 10 shows the matrix of the segmented image displaying the value of foreground/tumor pixels and the values of background pixels in the segmented image which is further use to calculate the size of the tumor.

Fig. 10 .
Fig. 10.Shows the matrix of the segmented image, (a) is a full-length matrix of an image representing TNP, (b) is the segmented area/tumor area with its desire matrix to find and calculate NFP for tumor size To calculate the TCR and FCR we use the Total Number of True Classified Values (TNTCV) and Total Number of False Classified Values (TNFCV) out of the Total Number of Values (TNV) used for KNN for classification.To calculate TCR: TCR = (TNTCV /TNV) *100 (1) To calculate FCR: FCR = (TNFCV/TNV) *100 Fig 11, showing the result for different k values.In Fig 11 (a), it can be seen that from different values ranging from 1 to 9 the minimum TCR of is 95% with k=1 and for k=9 the TCR is 99%.In Fig 11(b) shows the FCR, the maximum recorded FCR is for k=5 which is 5% and the FCR is decreasing taking higher values of k.The TCR and FCR graphs are clearly explaining the classification achieved by applying different variations of k within the proposed method.

Fig. 11 .
Fig. 11.Shows the graphical representation of TCR and FCR for k values from 1 to 9, (a) representing TCR, (b) representing FCR VI.CONCLUSION A brain tumor is a kind of mass over the brain, the mass can be either benign or malignant.The nature of brain tumor varies depending on the location, and size of the tumor inside the brain.Image processing helps to diagnose and treat brain tumor successfully using the benefit of MRI imaging technology.In this research work, a technique to segment and classify four most common types of brain tumor has been proposed.The dataset used in this research contains 2000 MRI images with an expert opinion of FCPS Neurosurgeon.To segment tumor pixels from the rest of the brain tissues, the histogram differencing based approach is applied to segment and detect tumor pixels.After applying histogram differencing the order

TABLE .
II. DETAIL DESCRIPTION OF TCR AND FCR BASED ON K VALUES FROM 1 TO 9