0
votes

I am using below script to draw a mask on an image. I need image to clear whenever I update [pnts]. However, it does not clear. I have to restart Notebook to clear it.

Any solution?

cv2.fillPoly(image, [pnts], color =(255,255,255))
plt.imshow(image)
plt.show()