polygon = [(100, 100), (200, 100), (150, 150)]
maskIm = Image.new('L', (imArray.shape[0], imArray.shape[1]), 0)
ImageDraw.Draw(maskIm).polygon(polygon, outline=1, fill=1)
mask = numpy.array(maskIm)
Crop non symmetric area of an image with Python/PIL