MATLAB: Find intersection of boundary points

bwboundariesdotImage Processing Toolboxintersectionvector

I have set of boundary points which has been acquired through bwboundaris function( it is almost square). Now how to find 4 vertices of the shape.

Best Answer

Use convhull().