12
$\begingroup$

I'm on a project of liver tumor segmentation and classification. I used Region Growing and FCM for liver and tumor segmentation respectively. Then, I used Gray Level Co-occurence matrix for texture feature extraction. I have to use Support Vector Machine for Classification. But I don't know how to normalize the feature vectors so that I can give it as an input to the SVM. Can anyone tell how to program it in Matlab?

To the GLCM program, I gave the tumor segmented image as input. Was I correct? If so, I think, then, my output will also be correct.

My glcm coding, as far as I have tried is,

I = imread('fzliver3.jpg');
GLCM = graycomatrix(I,'Offset',[2 0;0 2]);
stats = graycoprops(GLCM,'all')
t1= struct2array(stats)


I2 = imread('fzliver4.jpg');
GLCM2 = graycomatrix(I2,'Offset',[2 0;0 2]);
stats2 = graycoprops(GLCM2,'all')
t2= struct2array(stats2)

I3 = imread('fzliver5.jpg');
GLCM3 = graycomatrix(I3,'Offset',[2 0;0 2]);
stats3 = graycoprops(GLCM3,'all')
t3= struct2array(stats3)

t=[t1,t2,t3]
xmin = min(t); xmax = max(t);
scale = xmax-xmin;
tf=(x-xmin)/scale

Was this a correct implementation? Also, I get an error at the last line.

My output is:

stats = 

   Contrast: [0.0510 0.0503]
Correlation: [0.9513 0.9519]
     Energy: [0.8988 0.8988]
Homogeneity: [0.9930 0.9935]
t1 =

Columns 1 through 6

0.0510    0.0503    0.9513    0.9519    0.8988    0.8988
Columns 7 through 8

0.9930    0.9935
stats2 = 

   Contrast: [0.0345 0.0339]
Correlation: [0.8223 0.8255]
     Energy: [0.9616 0.9617]
Homogeneity: [0.9957 0.9957]
t2 =

Columns 1 through 6

0.0345    0.0339    0.8223    0.8255    0.9616    0.9617
Columns 7 through 8

0.9957    0.9957
stats3 = 

   Contrast: [0.0230 0.0246]
Correlation: [0.7450 0.7270]
     Energy: [0.9815 0.9813]
Homogeneity: [0.9971 0.9970]
t3 =

Columns 1 through 6

0.0230    0.0246    0.7450    0.7270    0.9815    0.9813
Columns 7 through 8

0.9971    0.9970

t =

Columns 1 through 6

0.0510    0.0503    0.9513    0.9519    0.8988    0.8988

Columns 7 through 12

0.9930    0.9935    0.0345    0.0339    0.8223    0.8255

Columns 13 through 18

0.9616    0.9617    0.9957    0.9957    0.0230    0.0246

Columns 19 through 24

0.7450    0.7270    0.9815    0.9813    0.9971    0.9970

??? Error using ==> minus
    Matrix dimensions must agree.

The input images are:

fzliver1 fzliver2 fzliver3

$\endgroup$
6
  • $\begingroup$ What did you use to implement Fuzzy C-Means algorithm? $\endgroup$
    – Spacey
    Mar 22, 2012 at 16:02
  • $\begingroup$ @Mohammad I don't get you sir. If you are asking about the software, I used Matlab. $\endgroup$
    – Gomathi
    Mar 22, 2012 at 16:04
  • $\begingroup$ Yes I realize that, but I mean did you use a built in library for implementation of Fuzzy-C-Means segmentation, or did you write your own, or import a 3rd party library? I ask because I am also interested in implementing a segmentation algo as well, and my platform is also MATLAB. $\endgroup$
    – Spacey
    Mar 22, 2012 at 16:25
  • $\begingroup$ @Mohammad No sir, I didn't install any library specific for FCM. I used FCM Thresheholding. Refer to the Matlab Central File Exchange. I hope it would be useful for you. $\endgroup$
    – Gomathi
    Mar 23, 2012 at 4:21
  • $\begingroup$ good method but I have ENVI 4.0 Software. I want processes Landsat 7 satellite imagery to evaluate tree volume $\endgroup$
    – user5636
    Oct 10, 2013 at 16:11

2 Answers 2

8
$\begingroup$

Are you using Matlab? If so then you would either need the Bioinformatics Toolbox, that includes an SVM classifier, or you can download libsvm, which has Matlab wrappers for training and testing.

Then you are going to need some labeled data. Are you classifying liver tummors as opposed to healthy liver? Then you would need images of liver tumors and healthy livers, each labeled as such.

Then you need to compute some features. What those are, depends on the nature of the problem. Texture features seem like a good start. Consider using co-occurrence matrices or local binary patterns.

Edit: As of the R2014a release there is a fitcsvm function in the Statistics and Machine Learning Toolbox for training a binary SVM classifier. There is also fitcecoc for training a multi-class SVM.

$\endgroup$
1
  • $\begingroup$ Thank you. I have downloaded libsvm. I also computed texture features using gray level co-occurence matrices. But I don't know how to give input to the svm program. Kindly refer to the stackoverflow.com/questions/9751265/… Kindly guide me. $\endgroup$
    – Gomathi
    Mar 22, 2012 at 14:17
2
$\begingroup$

This article deals exactly with the same type of supervised classification based on labelled GLCM classes: GLCM Textural Features for Brain Tumor Classification

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.