title: get bottomLeft & TopLeft corners
body: <hr>
  
  <p>I have a <strong>point list</strong> (<code>vector&lt;cv::Point&gt;</code>) like this:</p>
  
  <pre><code>[ 5, 10;
   15, 25;
   40, 30;
   10, 15]
  </code></pre>
  
  <p>I'd like to extract the 4 corners like... </p>
  
  <ul>
  <li><strong>top left corner</strong>.       <code>cv::Point topLeft = cv::Point(5,10) ;</code></li>
  <li><strong>top right corner</strong>.      <code>cv::Point topRight = cv::Point(10,15) ;</code></li>
  <li><strong>bottom left corner</strong>.    <code>cv::Point bottomLeft = cv::Point(15,25) ;</code></li>
  <li><strong>bottom right corner</strong>.   <code>cv::Point bottomRight = cv::Point(40,30) ;</code></li>
  </ul>
  
  <blockquote>
    <p>How can I get the 4 corners from the list using objc++?</p>
  </blockquote>
  
  <hr>
  
  <p><strong>Note:</strong> This is what I've tried so far but obviously it doesn't seems working.</p>
  
  <pre><code>cv::Rect rect = cv::boundingRect(points);
  cv::Point topLeft = rect.tl();
  cv::Point bottomRight = rect.br();
  cv::Point topRight = ??
  cv::Point bottomLeft = ??
  </code></pre>
  
  <p><em>I know that many questions have been asked on openCV &amp; point vectors, but I hope someone is kind enough to give me a short answer to my question, as I am quite at a loss right now.</em></p>
  
  <p><strong>Edit</strong>: <code>topLeft == minX &amp; minY</code>, <code>topRight == maxX &amp; minY</code>, <code>bottomLeft == minX &amp; maxY</code>, <code>bottomRight == maxX &amp; maxY</code>. This is how the corners are defined. </p>
  
  <p><strong>Note</strong>: The area will be a rectangle and it's not possible that two values are straight up like in a <a href="http://www.coloringpages101.com/coloring-pages/Shapes/tn_new25_euszs.gif" rel="nofollow noreferrer">diamond</a> (like @Jive mentioned).</p>