how can I teach glcm features with SVM

How can I train with the GLM-specific svm algorithm for brain tumor

4 Comments

Example
>> filename='C:\MATLAB\R2017a\bin\dataset\';
>> a=gorsel(filename,0);
0.0002 8.6622 0.0341
0.0001 8.9730 0.0279
0.0001 9.2377 0.0244
0.0001 9.4267 0.0239
0.0001 9.5962 0.0217
0.0001 9.6768 0.0207
0.0001 9.7512 0.0199
0.0001 9.7999 0.0193
0.0001 9.7608 0.0161
0.0001 9.7153 0.0146
0.0001 9.6964 0.0156
0.0001 9.7230 0.0177
0.0001 9.7560 0.0198
0.0001 9.8653 0.0178
0.0001 9.8902 0.0169
.m
function [output]=gorsel(i,indis)
for artis=indis:15
filename1 = ['C:\MATLAB\R2017a\bin\dataset\' num2str(artis,'%d') '.jpg'];
input=imread(filename1);
% figure,imshow(input);
j=imnoise(input,'salt & pepper',0.02);%image noise
k=medfilt2(j);%median filter
filename2 = ['C:\MATLAB\R2017a\bin\Median\median' num2str(artis,'%d') '.jpg'];
imwrite(k,filename2);
i=imread(filename2);
level=graythresh(i);
bw=imbinarize(i,level);
filename3= ['C:\MATLAB\R2017a\bin\Otsu\otsu' num2str(artis,'%d') '.jpg'];
imwrite(bw,filename3);%otsu algorithm
output=GLCMFeatures(bw); %glcm features for otsu algorithm image
output=struct2array(output);
disp(output);
end
end
It is recommended that you use fullfile() instead of those concatenations of strings.
how can ı do it

Sign in to comment.

Answers (0)

Asked:

on 17 Nov 2017

Commented:

on 17 Nov 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!