title: Getting contour's Point using opencv.js
body: <p>I am using opencv.js in javascript as described <a href="https://docs.opencv.org/3.4.1/d0/d84/tutorial_js_usage.html" rel="nofollow noreferrer">here</a>. I am using findContour() method to get countors. I want to get extreme left and right Points among two contours. Is there any way to do that?
  Here is my js code:</p>
  
  <pre><code>    let contours = new cv.MatVector();
      let hierarchy = new cv.Mat();
      cv.findContours(image, contours, hierarchy, 1, 2);
        var cntareas=[];
      for (let i = 0; i &lt; contours.size(); i++) {
         // storing the areas of countors
        cntareas.push(cv.contourArea(contours.get(i)));
       }
     //finding position of largest two areas.
    var twoLargetsValues = findTwoLargestPositions(cntareas);
     //contour with largest area
    var lcnt = contours.get(twoLargetsValues[0]); 
     //contour with second largest area
    var lcnt2 = contours.get(twoLargetsValues[1]);
  </code></pre>
  
  <p>Now how can i find extreme left and right coordinates using lctn and lctn2.(Means getting extreme left, right, top and bottom points)</p>