title: OpenCV fillConvexPoly function in C++ throws exception
body: <p>I'm trying to fill a triangle in a mask using the <code>fillConvexPoly</code> function.
  But I get the following error.</p>
  
  <pre><code>OpenCV Error: Assertion failed (points.checkVector(2, CV_32S) &gt;= 0) in fillConvexPoly, file /home/iris/Downloads/opencv-3.1.0/modules/imgproc/src/drawing.cpp, line 2256
  terminate called after throwing an instance of 'cv::Exception'
   what():  /home/iris/Downloads/opencv-3.1.0/modules/imgproc/src/drawing.cpp:2256: error: (-215) points.checkVector(2, CV_32S) &gt;= 0 in function fillConvexPoly
  </code></pre>
  
  <p>I call the function as like so, </p>
  
  <pre><code>cv::Mat mask = cv::Mat::zeros(r2.size(), CV_32FC3);
  cv::fillConvexPoly(mask, trOutCroppedInt, cv::Scalar(1.0, 1.0, 1.0), 16, 0);
  </code></pre>
  
  <p>where the trOutCroppedInt defined like so,</p>
  
  <pre><code>std::vector&lt;cv::Point&gt; trOutCroppedInt
  </code></pre>
  
  <p>And I push 3 points in the vector,</p>
  
  <pre><code>[83, 46; 0, 48; 39, 0]
  </code></pre>
  
  <p>How should I correct this error?</p>