Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created May 11, 2020 10:50
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 prateekjoshi565/1e1d5eaeef112b3e94523c4b0b4f61eb to your computer and use it in GitHub Desktop.
Save prateekjoshi565/1e1d5eaeef112b3e94523c4b0b4f61eb to your computer and use it in GitHub Desktop.
# apply polygon as a mask on the frame
img = cv2.bitwise_and(col_images[idx][:,:,0], col_images[idx][:,:,0], mask=stencil)
# plot masked frame
plt.figure(figsize=(10,10))
plt.imshow(img, cmap= "gray")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment