Page 173 - Algorithm Collections for Digital Signal Processing Applications using MATLAB
P. 173
162 Chapter 4
[m1,n1]=min(s);
r=[r n1];
end
for k=1:1:8
subplot(4,2,k)
title('Assign the rank')
s=strcat(num2str(r(k)),'.jpg');
A=imread(strcat('E:\Naturepix\',s));
imshow(A)
title(strcat('Image',num2str(k)));
end
end
___________________________________________________________
igaimagegv.m
for i=1:1:94
s=strcat(num2str(i),'.jpg');
A=imread(strcat('E:\Naturepix\',s));
B{i}=naturefeature(A);
end
FEATURE=cell2mat(B');
save NATUREFEATURE FEATURE
_________________________________________________________
naturefeature.m
function [res]=naturefeature(x)
x=x(100:1:size(x,1),1:1:size(x,2)-100,:,:);
x=imresize(x,[200 200]);
y=rgb2hsv(x);
h=y(:,:,1);
res=blkproc(h,[32 32],[8 8],'huevar(x)');
res1=reshape(res,1,size(res,1)*size(res,2));
y=rgb2gray(x);
res=blkproc(y,[32 32],[8 8],'unif(x)');
res2=reshape(res,1,size(res,1)*size(res,2));
res=blkproc(y,[32 32],[8 8],'entropy(x)');
res3=reshape(res,1,size(res,1)*size(res,2));
res=blkproc(y,[32 32],[8 8],'relativesmooth(x)');
res4=reshape(res,1,size(res,1)*size(res,2));
res=blkproc(y,[32 32],[8 8],'wavelet(x)');