Created
June 14, 2018 10:21
-
-
Save GTimothee/72be4e9900af94d7682bc61b8b680d19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def drawMask(width, height, coordinatesList): | |
mask = np.zeros((height,width,3), np.uint8) | |
color = (255,255,255) | |
for coordinates in coordinatesList: | |
cv2.fillConvexPoly(mask, np.array(coordinates, 'int32'), color) | |
return mask |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment