Filter löschen
Filter löschen

Kurtosis and skewness detection

3 Ansichten (letzte 30 Tage)
Jhilam Mukherjee
Jhilam Mukherjee am 24 Dez. 2013
Kommentiert: Image Analyst am 24 Jun. 2017
I want to calculate Kurtosis and skewness of a region whose area is 1287 and perimeter is 166.3575, but kurtosis value of total image is obtain. How Kurtosis value of a single region is obtained.

Akzeptierte Antwort

Image Analyst
Image Analyst am 24 Dez. 2013
Bearbeitet: Image Analyst am 24 Dez. 2013
See my demo on image moments, attached below in blue. It calculates skew and kurtosis of the histogram. Feel free to adapt it to your needs.
How were you getting the kurtosis of the entire image up to now? To get it for any particular blob, you have to call regionprops and ask for pixelList, as shown in my BlobsDemo tutorial in my File Exchange. Then loop over all blobs getting their kurtosis:
for k = 1 : numberOfBlobs % Loop through all blobs.
% Get list of pixels in current blob.
thisBlobsPixels = blobMeasurements(k).PixelIdxList;
% Get kurtosis of this blob, using your recipe or Image Analyst's.
kurtosis(k) = ComputeKurtosis(thisBlobsPixels);
end
  2 Kommentare
azkya novia
azkya novia am 24 Jun. 2017
Hello , i tried to run ComputeImageMomentsDemo.m but it gave errors. i tried to fix the plot and moments. but still error. i dont know what to do **Warning: Ignoring extra legend entries. > In legend>set_children_and_strings (line 629) In legend>make_legend (line 321) In legend (line 247) In ComputeImageMomentsDemo (line 121) >>**
Image Analyst
Image Analyst am 24 Jun. 2017
I just ran it again, and I had to change the line that finds the demo images folder to
folder = fileparts(which('peppers.png')); % Determine where demo folder is (works with all versions).
because of a change MATLAB made in where the images were stored a few years ago but after I posted the code. But once I did that, it ran fine. The new program is attached.
Please post your altered version and tell me your MATLAB version so I can fix your code.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Matt J
Matt J am 24 Dez. 2013
if A is your image and bw is a binary mask of the desired region then
data=A(bw)
will be the data in the region in one-dimensional form. You can do any statistical analysis on this just as you would for any 1D data set.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by