MATLAB: Additional properties from regionprops

Image Processing Toolboximage segmentationMATLABperimeterpolygonsregionpropswatershed

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

Best Answer

You could also return the "ConvexHull" values which will return a p-by-2 matrix for each polygon where each row of the matrix contains the x- and y-coordinates of one vertex of the polygon. Then you could use pdist() to compute the length of each segment.