All All: %% Get The File From The Current Folder
All All: %% Get The File From The Current Folder
clear all;
close all;
[f p]=uigetfile('.*')
a=imread([p f])
figure()
imshow(a)
a=imresize(a,[256 256])
a1=rgb2gray(a)
B = medfilt2(a1)
figure()
imshow(B)
b=im2double(B);
z=b; q=b;
[r,c]=size(b);
con=2;
for i=1:r
for j=1:c
z(i,j)=con *log(1+b(i,j));
q(i,j)=con *b(i,j)^0.4;
end
end
I = z;
class_number=3;
potential=0.5;
maxIter=30;
seg=ICM(I,class_number,potential,maxIter);
figure('name','Image segmentation using MRF model');
imshow(seg,[]);title('MRF segmented result');
colormap jet
%% Area Calculation
% % Svm Classification
load Area1
load Area2
load Area3
load Area4
load Area5
load Area6
tst=Area;
svmStruct =
svmtrain(T,C,'kernel_function','rbf','showplot',true);
classes = svmclassify(svmStruct,tst,'showplot',true);
if classes == 1
msgbox('Abnormal');
elseif classes == 2
msgbox('Normal');
end