MATLAB: About the GLCM Statistic Values

glcm

This is my code:
[path,user_cance]=imgetfile();
if user_cance
msgbox(sprintf('error'),'error','error');
return
end
GLCMS = [0 1 2 3;1 1 2 3;1 0 2 0;0 0 0 3];
stats = graycoprops(GLCMS)
I = imread(path);
C = rgb2gray(I);
GLCM2 = graycomatrix(C,'Offset',[2 0;0 2]);
stats = graycoprops(GLCM2,{'contrast','homogeneity','energy'})
I want to get the values of each GLCM. Like for example, getting the contrast value then send it to a variable, homogeneity value send to another variable and so on. Could you please help me with that? Thanks in advance.

Best Answer

first_variable = stats.contrast;
another_variable = stats.homogenity;
so_on = stats.energy;