Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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