# 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