Created
May 11, 2020 10:47
-
-
Save prateekjoshi565/f4975361608bd75cb36639459424fef1 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
# create a zero array | |
stencil = np.zeros_like(col_images[idx][:,:,0]) | |
# specify coordinates of the polygon | |
polygon = np.array([[50,270], [220,160], [360,160], [480,270]]) | |
# fill polygon with ones | |
cv2.fillConvexPoly(stencil, polygon, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment