Ive been looking at implementing GLCM within MATLAB using graycomatrix
. There are two arguments that I have discovered (NumLevels
and GrayLimits
) but in in my research and implementation they seem to achieve the same result.
GrayLimits
specified bins between a range set [low high]
, causing a restricted set of gray levels.
NumLevels
declares the number of gray levels in an image.
Could someone please explain the difference between these two arguments, as I don't understand why there would be two arguments that achieve the same result.
From the documentation:
Thus the first parameter sets the input gray level range to be used (defaults to the min and max values in the image), and the second parameter sets the number of unique gray levels considered (and thus the size of the output matrix, defaults to 8, or 2 for binary images).
For example:
As you can see, these parameters modify the output in different ways: