Dir = 'C:\Users\Administrator\Desktop\Tinna\PROJECT\soil_jpg\DataSet';
images = dir(fullfile(Dir,'*.jpg'));
F1 = cell(length(images),1) ;
F2 = cell(length(images),1) ;
F3 = cell(length(images),1) ;
F4 = cell(length(images),1) ;
F5 = cell(length(images),1) ;
F6 = cell(length(images),1) ;
for m = 1 : length(images)
Img = imread(fullfile(Dir,images(m).name));
Img = imadjust(Img,stretchlim(Img));
Img = imresize(Img,[256,256]);
hsvHist = hsvHistogram(Img);
autoCorrelogram = colorAutoCorrelogram(Img);
color_moments = colorMoments(Img);
img = double(rgb2gray(Img))/255;
[meanAmplitude, msEnergy] = gaborWavelet(img, 4, 6);
wavelet_moments = waveletTransform(Img);
Feature_Vector = [hsvHist autoCorrelogram color_moments meanAmplitude msEnergy wavelet_moments];
whos Feature_Vector
F1{m} = mean2(hsvHist(:));
F2{m} = mean2(autoCorrelogram(:));
F3{m} = mean2(color_moments(:));
F4{m} = mean2(meanAmplitude(:));
F5{m} = mean2(msEnergy(:));
F6{m} = mean2(wavelet_moments(:));
end
xlswrite('testdata.xlsx',[F1 F2 F3 F4 F5 F6]);
Best Answer