Page 184 - Algorithm Collections for Digital Signal Processing Applications using MATLAB
P. 184
4. Selected Applications 173
temp=reshape(temp(r1:1:r1+7,r2:1:r2+7),1,64);
temp=double(temp);
temp=lpc(temp,16);
temp=temp(2:1:17);
a=[ ];
for n=1:1:size(I,1)
a= [a sum(temp.*I(n,:)) ];
end
feaext1{k}=a;
k=k+1;
end
end
FEA=cell2mat(feaext1');
C1=mean(FEA(1:1:1000,:));
save C1 C1
C2=mean(FEA(1001:1:2000,:));
save C2 C2
_______________________________________________________________________
phototest.m
for i=1:1:20
s=strcat('C:\Documents and Settings\user1\Desktop\Photorealistic\',num2str(i),'.jpg');
A=imread(s);
B=rgb2gray(A);
B=B(101:1:300,101:1:300);
imshow(B)
C=blkproc(B,[8 8],'assigncenno(x)');
if(length(find(C==1))>length(find(C==0)))
disp('The image is photorealistic image')
else
disp('The image is photographic image')
end
end
_______________________________________________________________________