how can I teach glcm features with SVM

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

댓글 수: 4

Ahmet Gürbüz
Ahmet Gürbüz 2017년 11월 17일
편집: Walter Roberson 2017년 11월 17일
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
Ahmet Gürbüz
Ahmet Gürbüz 2017년 11월 17일
편집: Walter Roberson 2017년 11월 17일
.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
Walter Roberson
Walter Roberson 2017년 11월 17일
It is recommended that you use fullfile() instead of those concatenations of strings.
Ahmet Gürbüz
Ahmet Gürbüz 2017년 11월 17일
how can ı do it

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

2017년 11월 17일

댓글:

2017년 11월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by