Additional properties from regionprops
Show older comments
Hi all,
I'm using regionprops to extract some properties from a watershed segmentation of polygonal objects in an image. It returns values for the centroid, area, and perimeter of each segmented polygon.
Does anyone know if there's a way to extract specific lengths of the sides of the polygons, rather than just their entire perimeters?
Looking forward to your suggestions!
Thanks!
Best,
Veena
Accepted Answer
More Answers (1)
Image Analyst
on 10 Mar 2020
1 vote
You need to compute the boundary of each polygon with bwboundaries(). Then use findpeaks() to decide how many vertices there are. Then you can extract each "straight" segment from the boundary and do some kind of analysis on the shape of that "line". See my attached shape recognition demo to get you started.
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!