title: Create mask by coordinates of multiple convex polygons
body: <p>I need to draw a 2D binary mask based on array of vertexes of N convex polygons.</p>
  
  <pre><code>import numpy as np
  
  mask = np.zeros((100, 100), dtype=np.int8)
  
  polys = np.array([[[30,32], [36,46], [41,48], [50, 36]],
                    [[10,32], [16,46], [30,48], [40, 36]],
                    [[56,44], [58,70], [78,90], [75,34]]], np.int32)
  </code></pre>
  
  <p>Area of intersection between polygons should be also masked. I know how to implement it using cv2 library:</p>
  
  <pre><code>import cv2 
  
  for i in polys.tolist():
      cv2.fillConvexPoly(mask, np.array(i), 1)
  
  imshow(mask, cmap='gray')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6l9su.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6l9su.png" alt="Draw multiple convex polygons using opencv"></a></p>
  
  <p>But I cannot figure out how to do that using native numpy operations (without for loops) to reduce time to run the function.</p>