> When I run the following command:
> property = blkproc(glcmPixel, [9 9], @(e) graycoprops(e(
graycoprops expects as input the N x N matrix (default 8 x 8)
that results from graycomatrix. You aren't giving it that
complete matrix: you are giving it the column-wise unraveling of
the matrix. The resulting statistics are likely to be meaningless.
Also, as the default output for graycomatrix is 8 x 8, it would
very likely be an error to be applying graycoprops to a 9 x 9
matrix -- unless you had specifically used 'NumLevels', 9
in the graycomatrix call.
My previous response in this topic copied your function behaviour
rather than giving what would be more likely the correct behaviour.
The code that would be more likely correct would be:
nrowb = size(glcmPixel,1) / 8;
ncolb = size(glcmPixel,2) / 8;
blocks = mat2cell(glcmPixel, repmat(8, 1, nrowb), repmat(8, 1, ncolb));
property = cellfun(@graycoprops, blocks);