How does the regionprops calculate the area or the eccentricity of an object?
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
David Walwark
il 15 Nov 2020
I am looking for this answer too, mostly to confirm and translate the method found here:
Risposte (2)
DGM
il 26 Ago 2024
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 Commenti
Image Analyst
il 26 Ago 2024
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 Commenti
Vedere anche
Categorie
Scopri di più su Image Segmentation and Analysis in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!