%path D:\matlab\data\Training\glossy\*.jpg
path='D:\matlab\data\Training\test\';list=dir([path, '*.jpg']);for x=1:length(list) images{x}=imread([path, list(x).name]); if length(size(images{x}))==3 %check if the image I is color
I=rgb2gray(images{x}); end; offsets0 = [0 1; -1 1; -1 0; -1 -1]; glcm1 = graycomatrix(I,'offset',offsets0); stats{x} = graycoprops(glcm1,{'all'}); writetable(struct2table(stats{x}), 'test_glcmfeatures.csv')end
MATLAB: How can i save data from 1*5 cell array into excel file. I have 5 images in loop and i extract glcm features now i want to save each imgaes features but only the last image data is saved.
extract glcm features
Best Answer