title: Issue with drawContours OpenCV c++
body: <p>I have a code in python and I am porting it to c++. I am getting a weird issue with <code>drawContours</code> function in OpenCV c++.</p>
  
  <pre><code>self.contours[i] = cv2.convexHull(self.contours[i])
  cv2.drawContours(self.segments[object], [self.contours[i]], 0, 255, -1)
  </code></pre>
  
  <p>this is the function call in python and the value -1 for the thickness parameter is used for filling the contour and the result looks like</p>
  
  <p><a href="https://i.stack.imgur.com/AvY0K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AvY0K.png" alt="looks like"></a></p>
  
  <p>I am doing exactly the same in c++, </p>
  
  <pre><code>cv::convexHull(cv::Mat(contour), hull);
  cv::drawContours(this-&gt;objectSegments[currentObject], cv::Mat(hull), -1, 255, -1);
  </code></pre>
  
  <p>but this is the resulting image:</p>
  
  <p><a href="https://i.stack.imgur.com/QWPOp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QWPOp.png" alt="image"></a></p>
  
  <p>(please look careful to see the <code>convexhull</code> points, this is not easily visible). I am getting only the points and not the filled polygon. I also tried using <code>fillPoly</code> like,</p>
  
  <pre><code>cv::fillPoly(this-&gt;objectSegments[currentObject],cv::Mat(hull),255);
  </code></pre>
  
  <p>but doesn't help. 
  Please help me in fixing the issue. I am sure that i am missing something very trivial but couldn't spot it.</p>