title: SciPy Create 2D Polygon Mask
body: <p>I need to create a numpy 2D array which represents a binary mask of a polygon, using standard Python packages.</p>
  
  <ul>
  <li>input: polygon vertices, image dimensions</li>
  <li>output: binary mask of polygon (numpy 2D array)</li>
  </ul>
  
  <p>(Larger context: I want to get the distance transform of this polygon using scipy.ndimage.morphology.distance_transform_edt.)</p>
  
  <p>Can anyone show me how to do this?</p>