Finding area, average and moments of parts of a segmented image
조회 수: 7 (최근 30일)
이전 댓글 표시
I have an image divided into sections. How can I find the area, mean, second moment and third moment of those sections? I used the "bwconncomp" function to detect the partitions.
댓글 수: 0
답변 (1개)
Image Analyst
2023년 9월 30일
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
Also check out the attached demo on image moments.
댓글 수: 3
Image Analyst
2023년 10월 1일
편집: Image Analyst
2023년 10월 1일
image is a function so you would not want to use that for your variable name. PixelIdxList just gives indexes. I think you'd want PixelList which gives (x,y) coordinates. I don't know what your GPR function or array is, but your means and var_result do not make sense to me. Maybe by mean you mean the mean x and y, in other words the centroid which you should get directly from regionprops.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!