How does the regionprops calculate the area or the eccentricity of an object?
7 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have been reading a lot about image segmentation lately and know that some algorithms are based on the region and some are based on the boundary of a pixel.
I am wondering now how the regionprops function in MATLAB calculates the properties of an object and if there is any proper reference paper on the function to learn how the alogrithm of the regionprops work?
With regionprops () circles can be found by calculating the eccentricity or the roundness of an object. Another method is the Hough Transform to detect lines and circles.
What are the advantages for regionprops in comparison to the Hough Transform?
1 件のコメント
David Walwark
2020 年 11 月 15 日
I am looking for this answer too, mostly to confirm and translate the method found here:
回答 (2 件)
DGM
2024 年 8 月 26 日
If you want to know how regionprops() works, open it up and look.
Unlike bwarea(), regionprops() calculates the simple unweighted area, which is simply the total number of pixels in the connected group.
Eccentricity is derived from the major and minor radii of the blob:
eccentricity = 2*sqrt((Rmaj)^2 - (Rmin)^2)/Rmaj;
0 件のコメント
Image Analyst
2024 年 8 月 26 日
Not sure how I missed your question 5 years ago, but anyway I don't think you'd use hough() anymore. You'd use imfindcircles, though in my experience it's not so robust. It seems to miss a lot of circles. But it seems to be for people who are mainly interested in finding circles. You can then visualize the circles by showing them in the overlay above your image with viscircles. imfindcircles() doesn't measure a bunch of stuff like regionprops, it just measures radii and center locations of the circles it found.
On the other hand, regionprops is if you already have a segmented image (a binary image mask gotten though thresholding or some other means) and you want to make measurements of what's there. It can find the equivalent circular diameter of the blobs, as well as the area, perimeter, intensity, Feret diameters, centroid locations, and lots of other things all in one single function call.
Like @DGM said, regionprops()'s area is a simple pixel count while bwarea measures the areas of blobs by taking into account the shape of the boundary, so a diagonal edge might take up a half pixel instead of a full pixel area. This is possibly what you meant when you said (somewhat unclearly) "that some algorithms are based on the region and some are based on the boundary of a pixel".
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!