Given a binary mask with an object in Matlab. I am going to find the concavity point of the boundary of the object. The concavity point that I have in mind here is the deepest concavity point relative to the Euclidean distance to the convex chords K_1, K_2 and K_3 in the concavity regions B_1, B_2, B_3, respectively. The red dot indicates the concavity point I want to find, where in the concavity area B_1 I draw three lines perpendicular to the chord K_1, the deepest concave point is the middle one, since it has the longest length.

Who has an efficient way / code for this? Thanks.
The following figure shows an example with a convex hull, where the red dot indicates the actual concavity point.

source share