Skip to content

Instantly share code, notes, and snippets.

@daniellopez0708
Created April 6, 2020 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniellopez0708/2ec230f236ba53e82425a6eb6fa470bb to your computer and use it in GitHub Desktop.
Save daniellopez0708/2ec230f236ba53e82425a6eb6fa470bb to your computer and use it in GitHub Desktop.
EXIT_PTS = np.array([
[[732, 720], [732, 590], [1280, 500], [1280, 720]],
[[0, 400], [645, 400], [645, 0], [0, 0]]
])
SHAPE = (720,1280)
base = np.zeros(SHAPE + (3,), dtype='uint8')
exit_mask = cv2.fillPoly(base, EXIT_PTS, (255, 255, 255))[:, :, 0]
plt.imshow(base)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment