Skip to content

Instantly share code, notes, and snippets.

@ritwikraha
Created January 16, 2020 18:53
Show Gist options
  • Save ritwikraha/dae44aa6b3b57b03caf03ffff178cf9b to your computer and use it in GitHub Desktop.
Save ritwikraha/dae44aa6b3b57b03caf03ffff178cf9b to your computer and use it in GitHub Desktop.
%[m,n]= size(I)
% using all the statistical texture information
% and plotting them
offsetsEdge = [zeros(40,1)(1:40)];
glcms = graycomatrix(I,'Offset',offsetsEdge);
stats = graycoprops(glcm)
stats.Contrast
stats.Correlation
stats.Energy
stats.Homogeneity
texture_data = [stats.Contrast stats.Correlation stats.Energy stats.Homogeneity];
plot(texture_data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment