Anda di halaman 1dari 9

BRAIN TUMOR SEGMENTATION AND

DETECTION USING NUERAL NETWORKS

ABSTRACT:
The field of medical imaging is gaining importance with an increase in the
demand for automated, reliable, fast and efficient diagnosis which can provide
insight to the image better than human eyes. Brain tumor is the second leading
cause for cancer-related deaths in men in age 20 to 39 and fifth leading cause
cancer among women in same age group. Brain tumors are painful and may
result in various diseases if not cured properly. Diagnosis of tumor is a very
important part in its treatment. Identification plays an important part in the
diagnosis of benign and malignant tumors. A prime reason behind an increase in
the number of cancer patients worldwide is the ignorance towards treatment of a
tumor in its early stages.

Introduction:
The brain is a soft, spongy mass of tissue which is protected by the bones of the
skull, three thin layers of tissue called meninges and cerebrospinal fluid.
Sometimes there occurs abnormal growth in brain tissues causing brain tumor.
Tumors are categorized basically into two types-

a) Benign Brain Tumour:


Cells from benign tumours rarely invade tissues around them. They don't
spread to other parts of the body. However, benign tumours can press on
sensitive areas of the brain and cause serious health problems. Benign
tumours can be removed, and they seldom grow back.
b) Malignant Brain Tumour:
Malignant brain tumours also called as brain cancer. They are likely to grow
rapidly and crowd or invade the nearby healthy brain tissue. MRI is a
medical imaging technique used in radiology to form pictures of the anatomy
and the physiological processes of the body in both health and disease. MRI
scanners use strong magnetic fields, radio waves, and field gradients to
generate images of the inside of the body.

METHODOLOGY:
Two pixel-based segmentation methods are applied in our proposed method.
One is histogram statistics and the other is K-means clustering. The
histogram method defines single or multiple thresholds to classify an image
pixel-by-pixel. A simple approach to determine the gray value threshold T is
by analysing the histogram for peak values and finding the lowest point,
which is typically located between two consecutive peak values of the
histogram. If a histogram is clearly bi-modal, the histogram statistics method
can provide good results. By comparing the gray value of each pixel with the
determined threshold T, a pixel can be classified into one or the two classes.

An image f(x,y) can be segmented into two classes


using a gray value threshold T so that

where g(x,y) is the segmented image with two classes of binary values, “1”
and “0”, and T is the threshold assigned to the lowest point, which is located
between two peak values of the histogram.
FLOWCHART:

And we taking the values of the segmented image and we are using matlab
inbuilt neural processing tool which helps us to determine the type of
tumour.

We have to train the nueral network with different images values and we are
able to do the testing and validation .
Matlab code:
clc;
clear all;
close all;
a=imread('download.jpg');
figure,
imshow(a);
try
Dimg=rgb2gray(imread('download.jpg'));
catch
Dimg=imread('download.jpg');
end
imdata=reshape(Dimg,[],1);
imdata=double(imdata);
[IDX,nn]=kmeans(imdata,4);
imIDX=reshape(IDX,size(Dimg));
figure,
imshow(imIDX,[]);
title('Index image');
figure,
subplot(3,2,1),imshow(imIDX==1,[]);
subplot(3,2,2),imshow(imIDX==2,[]);
subplot(3,2,3),imshow(imIDX==3,[]);
subplot(3,2,4),imshow(imIDX==4,[]);
subplot(3,2,5),imshow(imIDX==5,[]);
bw=(imIDX==2);
se=ones(5);
bw=imopen(bw,se);
bw=bwareaopen(bw,400);
figure,imshow(bw);
title('Segmented tumour');
signal1 = bw(:,:);
[cA1,cH1,cV1,cD1] = dwt2(signal1,'db4');
[cA2,cH2,cV2,cD2] = dwt2(cA1,'db4');
[cA3,cH3,cV3,cD3] = dwt2(cA2,'db4');
DWT_feat = [cA3,cH3,cV3,cD3];
G = pca(DWT_feat);
g = graycomatrix(G);
stats = graycoprops(g,'Contrast Correlation Energy Homogeneity');
Contrast = stats.Contrast
Correlation = stats.Correlation
Energy = stats.Energy
Homogeneity = stats.Homogeneity
Mean = mean2(G)
Standard_Deviation = std2(G)
Entropy = entropy(G)
RMS = mean2(rms(G))
Variance = mean2(var(double(G)))
b = sum(double(G(:)));
2
Smoothness = 1-(1/(1+b))
Kurtosis = kurtosis(double(G(:)))
Skewness = skewness(double(G(:)))
m = size(G,1);
n = size(G,2);
in_diff = 0;
for i = 1:m
for j = 1:n
temp = G(i,j)./(1+(i-j).^2);
in_diff = in_diff+temp;
end
end
IDM = double(in_diff)
feat = [Contrast,Correlation,Energy,Homogeneity, Mean,Standard_Deviation,
Entropy, RMS, Variance, Smoothness, Kurtosis,Skewness, IDM];

Results:

input image:
Plotting the confusion matrix and ROC:
REFERENCES:

[1] Gonzalez, R. C.; Woods, R. E., Digital Image Processing,

2nd ed., Prentice-Hall, Englewood Cliffs, NJ, 2002.

[2] Ng, H. P., Ong, H. H., Foong, K. W. C., Goh, P. S.,

Nowinski, W. L., “Medical Image Segmentation Using KMeans

Clustering “.

Anda mungkin juga menyukai