Of course! I called graycomatrix as you can see below...
However, I got the same error.
function stats = GraycoProps(varargin) %%A lot of comments
* *I = imread('I:\pos\TESIS\...\PSM2-74538-0.038.TIF');
GLCM = graycomatrix(I,'G',[1 256],'Numlevels',256,'Offset',[0 1;-1 1;-1 0;-1 -1]);* * *
allStats = {'Contrast','Correlation','Energy','Homogeneity'};
[glcm, requestedStats] = ParseInputs(allStats, varargin{:}); %THE ERROR IS HERE**
% Initialize output stats structure.
numStats = length(requestedStats);
numGLCM = size(glcm,3);
empties = repmat({zeros(1,numGLCM)},[numStats 1]);
stats = cell2struct(empties,requestedStats,1); ... ...
To explain me better, for my output I need to get a kind of file, may be .txt or .xls, with the following information:
gray-levels 'Contrast' 'Correlation' 'Energy' 'Homogeneity'
0 ValueCon(0) ValueCor(0) ValueEne(0) ValueHom(0)
1
2
...
255 ValueCon(255) ValueCor(255) ValueEne(255) ValueHom(255)
In order to generate a plot (X,Y,Z), for example contrast vs correlation vs gray-level.
Thank you in advanced.