I would like to calculate the image excess in Matlab. Matlab has a kurtosis function kurtosis I can use this function on a matrix. For instance:
m = rand([4 5]); kurtosis(m(:));
Although I use this grayscale image: 
I = imread('0.tiff'); kurtosis(I(:));
I get this error:
Error in use - Integers can only be combined with integers of the same class or scalar doubles.
Error in excesses (line 39) x0 = x - repmat (nanmean (x, dim), tile);
Now my question is: what am I doing wrong, and how can I calculate the excess of the image.
source share