title: Finding the concavness pixel/point in binary map using Matlab
body: <p>Given an binary mask with an object in Matlab. I am going to find the concavity point of the object boundary. The concavity point I mean here is the deepest concavity point with respect to the Euclidean distance to the convex hull 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 concavity region B_1 I draw three lines perpendicular to the chord K_1, the deepest concavity point is the middle one since it has the largest length.</p>
  
  <p><img src="https://i.stack.imgur.com/BvrZk.jpg" alt="enter image description here"></p>
  
  <p>Anyone have efficient way/code to do that? Thanks.</p>
  
  <p>Another figure below gives an example with the convex hull, where the red dot indicates the valid concavity point. </p>
  
  <p><img src="https://i.stack.imgur.com/RXxgt.jpg" alt="enter image description here"></p>