Predicting Source and Age of Brain Tumor Using Canny Edge Detection Algorithm and Threshold Technique

Objective: We propose an iterative method and associated with thresholding technique for detecting the tumor source and the age of tumor. Methods: The technique is based on Euclidean distance with strong edge and weak edge for identifying the spreading area of disease and also detecting the tumor age. The work involves the use of canny edge detection algorithm and thresholding technique, which exploits the information detection of brain tumor source through Magnetic Resonance Image (MRI). This system helps in the calculation of the age of tumor (approximate) using Euclidean distance. Results: Calculation of the age range between 0 -100 as 0th stage, between 100 - 250 as 1st stage, between 250 - 400 as 2nd stage, 400 – 650 as 3rd stage and also detection of the spread area, helps stopping the tumor from invading the neighbor cells thereby reducing the percentage of invasion of cancerous cells. Conclusion: This method provides the simulation output of proposed algorithm in additional noise resilient and improved in edge and well defined tumor detection than the existing algorithm.


Introduction
A brain tumor is an abnormal cell that grows within the brain; MRI plays a vital role in the location of the cancerous tissue through MRI images. Segmentation is used for the subdivision of an image, and also for visualization, identification and compression. Segmentation is based on homogeneity criteria based on color, texture or intensity. It helps location and identification of the boundaries or objects in an image. Identification of all pixels (2D images) or Pixels (3D images) relating to an object. Cancerous cells are examined using computed tomography (CT) scan and magnetic resonance image (MRI). The latter is preferable considering its excellent capability for soft tissue imaging (Manasa et al., 2016). MRI helps for finding the size of the brain tumor, its area and location. This facilitates easy, effective and precise diagnose and planning the surgeries for its removal (Siddhi and Nerurkar, 2017). In the existing facility, only the finding of tumor is possible but finding the source is not. Classification and segmentation used for finding the MRI image with tumor is not feasible. Artificial neural network (ANN) and Levenberg-marquardt (LM) algorithm are available for use but they do not provide the exact result when applied on MRI tumor image. The drawback of the existing system is that detection of the source (spreading area) and age of the tumor is not possible (Shenbagarajan et al., 2016). The proposed system uses Canny Edge Detection algorithm and threshold technique Parthasarathy G 1 *, Ramanathan L 2 , Anitha K 1 , Justindhas Y 1 for locating the source of tumor, spread area and age of the tumor cells in the brain. Here the MRI brain images were collected as a dataset. Then preprocessing method was used for the elimination of noise from the image using Gaussian filtering technique. Now a noiseless image is obtained after preprocessing. The second method involves Non Maximum Suppression where the weak and the strong edges of the images are detected using the intensity gradient of the image. The source of the image is also found using this non maximum suppression method and the age of tumor (approximate) is calculated on the basis of Euclidian Distance. Brain cancer ranks as having the 4th-highest average years of loss of life loss among cancers, with an average of nearly 22 years of life loss for every one death.

Study type and Search Strategy
The structure of the brain can be seen with the help of a CT or MRI scan. During the few years, past MRI scanning plays of an important role in the medical research field. Image segmentation is a very important process in image processing as it helps extraction of information from a complex medical image. In this method segmentation of the tumor is done on the basis of canny edge algorithm. Finally threshold is applied to the image (Manasa et al., 2016). MRI image preprocessing is applied in the brain order to eliminate noise from the brain. This is referred to as the removal of noise from MRI image and helps getting detailed information (Shenbagarajan et al., 2016). Edge detection is considered as the main method for obtaining rich and reliable information relating to the image. Canny edge detection algorithm used in computer vision and in the image processing technique, shows MRI image processing as demanding and difficult in field these days. The following methods are considered for the processing of MRI brain image: reprocessing the image by means of sharpening, equalization, improvement of the image with the application of high and low threshold values, followed by the use of morphological operation. Eventually the tumor secession is obtained and detected (Harneet and Sukhwinder, 2014). Removal of skull part using the erosion and dilation morphological technique is effective and automated but rather an inefficient way of stripping the skull. Erosion and Dilation are the two basic operations in morphology. These are applied to the binary image. But there are versions that work on a gray scale image. Erosion is a technique which uses background and the foreground for processing. MRI image features a specific intensity of the background which appears before the brain image with the same appearance as the part of the brain which gives the impression of a false background. Here the algorithm does not have the ability to distinguish the original background from the false one. The area round the false background is eroded leading to distortion in the brain tissues and the skull (Yadav and Patil, 2017). Threshold technique is useful and even essential in image binarization particularly in image segmentation. It determines intensity values referred to as threshold that does the segregation into different classes (Jay and Kaushal, 2014). Segmentation and detection are represented in 2D and also in 3D MRI data helping the detection of the tumor. They involve high pass filtering, histogram equalization, thresholding and morphological operations. The 2D extracted image was reconstructed as 3D image. This is followed by the computation of the tumor value (Rohini et al., 2014). In this segmentation method, basic morphological transformation is used for the separation of the tumor mass from MRI image on the basis of Gaussian filter which finds use in smoothing the image for the purpose of blurring the image to enable elimination of noise and making it uniform to facilitate segmentation. Thresholding is used to creating a binary image when the threshold value is low when it is compressed and high when it has a strong edge (Anjana et al., 2015). The global thresholding method separates out the infected region with the help of a single threshold point and converts a gray scale image into a binary image. From the segmented images it is possible to get detailed information relating to the tumor location, its shape. An attempt has been made to summarize segmentation techniques which are useful for the separation of tumor region from brain tumor MRI images. Selection of a proper segmentation technique enables accurate segmentation of the tumor region and measurement of the area of tumor region using the brain tumor MRI image. This is possible by using digital image processing tool. Digital image processing is useful for CT scan, MRI, and Ultrasound type of medical images (Rohan et al., 2016). The aim of this paper is to assess the prevalence of intestinal parasites in several collections of patients including many cancer patients; organ transplants recipients, and major immunodeficiency patients (Abdoulreza et al., 2018). The brain image segmentation can be considered as an important calculation toward automated diagnosis of regions of curiosity, which can support surgical planning, analyzing changes of brain's volume in several tissue types, and finding neural disorders (Bahar and Mehran, 2019). In this paper outperforms the many benchmark in data mining classification techniques for early detection and diagnosis of brain tumors (Zaka et al., 2018). Sentiment analysis of cancer research journal as ranked based on citation content using data mining algorithm (Parthasarathy et al., 2019). Implementation of Canny edge detection algorithm in C# (Zorana and Petar, 2018).

System Architecture
This method involves MRI image analysis, the canny edge detection algorithm and the threshold technique. System Architecture of the proposed methodology is shown in Figure 1. There are four different stages in the method: preprocessing that involves Gaussian filter process for the removal of noise from MRI image, edge thinning which is done with the help of Non-maximum suppression method, the strong edge and weak edge determined from the MRI image and finally finding the source of the tumor from non-maximum suppression. The age of tumor is found with the application of the threshold technique. The results of this proposed system show efficient location of the source and age of the brain tumor from MRI image. A detailed description of the proposed methodology is provided. The system helps the calculation of the age of tumor (approximate) and the detection of the source (spreading area) of the cancerous cells and also in the prediction of the extent of the spread to enable stopping the spread from invading the neighboring cells, that reducing the percentage of invasion of cancerous cells. There is also the added advantage of detecting the current status of the affliction, knowing the tumor age. Knowing the source will help doctors to predict the exact area to do the treatment.

MRI Brain Image Dataset
The proposed methodology, involves the use of a training dataset which is explicitly available from the BrainWeb namely, Simulated Brain Database, as a dataset which is the standard for storing and transmitting medical image. In BrainWeb: Simulated Brain Database pixels database can be compressed in many standards which include JPEG, lossless JPEG, JPEG 2000. lzw(zip) it can be compressed for entire dataset.

Canny Edge Detection
Canny edge detector is also an edge detector operator. The process of canny edge detection algorithm has different steps. It starts with the application of Gaussian filter to smooth the MRI image for the removal of noise and finding the intensity gradient of the image. Nonmaximum suppression for getting rid of spurious response Predicting Source and Age of Brain Tumor Non-maximum suppression is an edge thinning technique, with calculation of the gradient image, the edge that gets extracted from the gradient value is quite blurred. Hence a strong edge and weak edge concept, are used, the value to 0 for local minimal (i.e. weak edge) and 1 for local maximal (i.e. strong edge), which helps suppression of the gradient value that lies at zero (i.e local minimal) and then the edge strength of the current pixel is compared with the edge strength of the pixel in the +ve and -ve gradient directions. After applying Non-Maximum suppression, edge pixel provides a spurious response. The value will be preserved, if edge strength of the pixel is larger (i.e local maximal) compared to the other pixels in the same direction. Then the local maximal region alone is considered as pixel, and the pixel gets clustered. The clustered area is considered as the Region of Interest.

Source of the Tumor
The source of tumor i.e. chance of spreading area is located, by applying threshold technique which converts the MRI image into a binary image. Then segmentation is used for comparing the neighboring pixel to the initial pixel points (Richa and Amanpreet, 2014). Following the application of non-maximum suppression I[i,j] formula mentioned in (3) still the local maxima are created by the noise to rid of these and threshold is set as low threshold and high thresholds, for capturing weak edges and strong edges. A solution is hysteresis thresholding.
Hysteresis thresholding need two threshold values minimum value and maximum value to compute edge gradient, TL and TH are applied to I[i,j] formula mentioned in (3). Here TL < TH, all the edge points in I[i,j] scanned and fixed in order the locate the next unvisited pixel of I[i,j] such that Starting from I[i,j], it follows the connected local maxima in both perpendicular directions to the normal edges Marking all points visited, and making a list of the locations of all the points help finding the points within the connected contour. The output could be a list, with every part providing a description of the position of a connected contour within the image. There is a tendency to contemplate the closest pixels with a comparison of the worth of the edge and realization of the spreading space.

Age of the Tumor
To find the age of the tumor the concept of geometer distance is used for finding the age of the tumor. The age is calculated when finding the spreading space of the tumor Geometer can work out the nearest edge component for every component within the growing region. Each component successfully forms the center of a 9 component neighbourhood. Interpolation of the encircling distinct grid values helps calculation of the gradient magnitude at the neighbourhood boundary in every angles perpendicular to the center of the component. When the classifier support this distance, the mean category values are used to edge detection follows. Application of the threshold for the determination of potential edges is the next step. Finally the detection of edges by suppression all the other edges which are weak and not connected to strong edges. The steps in canny edge algorithm for MRI image are briefly explained below.

Brain MRI Image Preprocessing
In brain MRI image tumor detection, preprocessing is used for the elimination of noise from the brain MRI image. The goal is to retain clear edges in an MRI image. Filtering is used mainly for eliminating unwanted distortion represented as noise from the MRI image.

Gaussian Filter for Removal of Noises from the MRI Images
Gaussian filtering is highly effective in smoothing images. It is used for blurring the image and also for the removal of unwanted distortion (noise) before edge detection. Filtering can be done by convolving points in the input array and summing them up to produce an output array with a Gaussian kernel. A filtering is applied to the image, "kernel" which further coefficient of the filter.
The function f( i , j) is presented as gray scale image, the rows and columns of f( i , j) are convolved separately, then we get the filtered image as K( i , j).
Where sigma (σ) stands for the standard deviation of the gaussian filter, used for smoothing the image, hence playing a vital role in image edge detection. Canny edge algorithm select 2*2 neighbor area for the calculation of the image gradient and getting the direction of the magnitude and the gradient direction. The first order deviation of i and j directions can then be formed using the equation.
Where M(i,j) represents the gradient magnitude of the image, D(x,y) represents the gradient direction of the image, where S1, S2, S3, S4 represent the pixel values of the image (i,j), (i, j+1), (i+1, j), (i+1, j+1) respectively. Non-Maximum Suppression G(i) = exp (-i 2 / 2σ 2 ) / 2πσ 2 (1) G(j) = exp (-j 2 / 2σ 2 ) / 2πσ 2 (2) K x = (-S1+S2-S3+S4) / 2 (6) K y = (S1+S2-S3-S4) / 4 (7) as category centers for calculating pixel-center distances and the geometer distance between points in an area that may be common, for calculating the closeness geometer metric. The square distance between 2 vectors x = [x 1 , x 2 ] and y = [y 1 , y 2 ] is that the total of square variations in their coordinates. The notation dx, y is used for denoting the space between vector x and y. Hence this last result will be written as: Then the geometer distance is compared with the threshold value and the age of the tumor is known.

Proposed Brain Tumor Source and Age Prediction Algorithm
The MRI images of Brain Tumor are collected the canny edge detection algorithm, Threshloding technique is used for getting to know the chance of spreading of the area. The age of the brain tumor is computed using the Euclidean distance.

ALGORITHM STEPS
INPUT: MRI Brain Image from dataset OUTPUT: Resultant output image with source and age of the tumor.
Step1: MRI Brain image is collected from the BrainWeb: Simulated Brain Database.
Step2: By applying Gaussian filter for removal of noise from the image.
Step 3: By applying edge thinning to compare pixel intensity with constant intensity value.
Step 4: Getting of two different resultant images for the strong edge and the weak edge.
Step 4.1: The weak edge get suppressed and the strong edge is taken as the final source of image.
Step 5: By applying Euclidean distance for predicting the age of the tumor.
Step 5.2: If the age range is between 100 -250 is considered as 1st stage.
Step 5.3: If the age range is between 250 -400 is considered as 2nd stage and Step 5.4: If the age range is between 400 -650 is considered as 3rd stage.

Results
The proposed technique is executed in C#.Net programming language, Microsoft visual studio 2012 as Front end and backend used as SQL server 2014. Every tests were did on an Intel i3 1.80 GHz, 500 GB Hard disk, 4 GB RAM and windows 10 OS. MRI images of the brain taken for testing are from Online based medical image repository that were downloaded freely in online.
Here MRI brain images are obtained as an input and implemented under image processing. In this work certain D (x, y) = √ (x1 -y1 ) 2 + (x2 -y2) 2 (10) Figure 1. System Architecture numbers of brain MRI images are taken up. The first process of the proposed system involves the division of the image into several blocks followed by classification based on the canny edge detection algorithm. Thresholding technique is then applied to each block of the image. Since there are several filters, Gaussian filter is applied for smoothing the image without affecting the quality of the image for elimination of noise. The next step is the calculation of the intensity gradient of the image. Then non-maximum suppression method is applied for edge detection. The image is changed from gray scale status to binary image with the help of the threshold technique which classifies the image as strong edge and week edge. Finally the edge detection technique suppresses all the week edges and displays only the strong edge. The spread area of the tumor is presented in a Figure 2. The top of final image represents the brain MRI image which is a gray scale image and is taken as the input image. The second image represents the noiseless image obtained after the application of Gaussian filter for smoothing the image and in turn, to remove noise. Every constituent is successfully formed at the center of a nine constituent neighbourhood. Interpolation of the encompassing separate grid values assists the calculation of the gradient magnitude at the neighbourhood boundary in each direction perpendicular to the center of the constituent. If the constituent is not larger than perpendicular values (i.e. Non-Maximum), it is suppressed. The thresholder utilized in the cagy operator is referred to as "hysteresis". Most thresholders use one threshold limit. The third image is obtained with the application of the non-maximum suppression method which includes both local maxima and local minima in the same image using the setting threshold low and high for an image. Classification of the image with local maxima and minima is done using intensity gradient calculation. This is followed by conversion into a binary image through application of the threshold image.
A Comparison of the current pixel is made with TL and TH, when the value lies above the TH. It is considered as a strong edge and accepted; else it is suppressed if the value lies below the TL. Hence, a comparison of the entire pixel of an image helps location of the exact spreading area of the brain MRI image.
Following the location of the spreading area of the images, the age of the tumor is found using the Euclidean distance. Classification of MRI brain image is done and a portion of the tumor MRI brain image is taken for testing and for calculating the age of the brain tumor are provided in Table 1 (Jay and Kaushal, 2014).
The Table 1 and Table 2 compared the output with existing method. The distance measure is used to point in Euclidean distance. The class values are calculated using the mean value and the class center for computation of pixels and center distance with the help of Euclidean distance. The square of the distance between 2 vectors can be considered as x = [x 1 , x 2 ] and y = [y 1 , y 2 ] where x and y are the sums of square differences in the coordinates. The distance between two vectors x and y can be represented as dx,y , the last result can be written as dx,y = √(x 1 -y 1 ) 2 + (x 2 -y 2 ) 2 . A comparison between Euclidean distance and Lumino distance to calculate Brain Tumor age, shows both helping the location of the

Discussion
This paper has taken up the subject of the source (spreading) of the tumor, its detection and calculation based on Canny Edge detection, thresholding technique and Euclidean distance. During the past decades, brain cancer was a fatal affliction, causing deaths in thousands. Some tumor could be removed through appropriate treatment but this was not possible with others due to their growth into malignancy and failure to detect at an early stage. Advancements in the medical field have equipped doctors with devices to check and treat tumor. But still cases are seen as fatal, due to a rapid growth of abnormal cells. Brain tumor is a deadly disease; it kills more than thousands of people in each year. It also causes problems like headache, memory loss, sensations, loss of muscle control and many more. Tumors are of 2 kinds one is a benign tumor, a not a cancerous one and the other one is malignant tumor which is a cancerous one. There are 4 varieties of brain tumors but not all tumors are alike. Grade 1 represents the beginning of the tumor, grade 2 looks like the start. It also looks less like normal brain cell and can be taken out before it spreads anywhere. It would not create abnormal cells. Grade 3 looks totally different and is totally abnormal. Grade 4 is one where it starts to grow and quickly spreads to other parts of the body. This paper, it is hoped with help locating the spreading area and the age of the tumor assist doctors in finding the patient's current status by knowing the tumor age. Knowing the source with greatly helps predicting the exact area in finding the appropriate treatment.
Earlier research works dealt with finding the existence of the tumor but not its source. This disability led to the problem in predicting the exact area of the tumor and determination of the exact treatment. This paper provides information on the location of the age of the tumor helping doctors in getting to know the status of the patient's affliction and devising the right treatment.
In conclusion, in this paper, Brain MRI image is taken and preprocessing is performed using filters. Detection of brain tumor is an essential application in medical ground of image processing in earlier work. This is performed on the basis of Canny edge detection algorithm, Thresholding technique, and Euclidean distance. The canny edge detector performance measure plays a significant role in edge detection. Eventually the Source (spreading) of the tumor is detected and age of the tumor is calculated using Euclidean distance and demonstrate that the algorithm using thresholding technique of the region to replace the entire threshold for the idea of optimizing the threshold naturally set the algorithm, has a efficient anti-noise ability to enhance the accuracy of edge detection.