필터 지우기
필터 지우기

Kurtosis and skewness detection

조회 수: 3 (최근 30일)
Jhilam Mukherjee
Jhilam Mukherjee 2013년 12월 24일
댓글: Image Analyst 2017년 6월 24일
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.

채택된 답변

Image Analyst
Image Analyst 2013년 12월 24일
편집: Image Analyst 2013년 12월 24일
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
azkya novia
azkya novia 2017년 6월 24일
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 2017년 6월 24일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Matt J
Matt J 2013년 12월 24일
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