How to measure the length of the sides in polygon at BW image? Obviously that the polygon is not ideal (it’s a picture) Note that the polygon is filled (background is "0" and polygon and its inside is "1")
You can use bwboundaries() to find the bounary pixels and then maybe this FEX file to fit it to a polygon
I wonder, though, what created the binary image and whether geometric info about the polygon was used for that. If so, it would make sense to use that geometric info instead.
Use bwboundaries() to get the (x,y) coordinates of the outer perimeter. Then use the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_find_.22kinks.22_in_a_curve.3F, which points to an Answers posting where I gave demo code.