Azzera filtri
Azzera filtri

Kurtosis and skewness detection

3 visualizzazioni (ultimi 30 giorni)
Jhilam Mukherjee
Jhilam Mukherjee il 24 Dic 2013
Commentato: Image Analyst il 24 Giu 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.

Risposta accettata

Image Analyst
Image Analyst il 24 Dic 2013
Modificato: Image Analyst il 24 Dic 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 Commenti
azkya novia
azkya novia il 24 Giu 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 il 24 Giu 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.

Accedi per commentare.

Più risposte (1)

Matt J
Matt J il 24 Dic 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