title: Find a line perpendicular to a contour
body: <p>I am working with image segmentation in Matlab.</p>
  
  <p>I need to find a line perpendicular to a set of points in order to calculate the maximum distance between that line and the set of points.<br/>
  Here's an example of the problem:</p>
  
  <p><img src="https://i.stack.imgur.com/GOeHR.png" alt="Example of image"></p>
  
  <p>The red point represents the concavity of the contour and that point was found from the curvature of the contour.</p>
  
  <p>The black line and the green points, which are the limit of the line, were manually drawn to show the result that I am looking for.</p>
  
  <p>After finding the line, the next task is to calculate the maximum distance between the line and the part of the contour highlighted in yellow.</p>
  
  <p>Could anyone suggest a possible solution?</p>