Curtose function in the image

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: enter image description here

 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.

+4
source share
1 answer

Kurtosis needs me to be double. It works:

 kurtosis(double(I(:))); 

or

 kurtosis(double(I)); 
+5
source

Source: https://habr.com/ru/post/1435466/


All Articles