How to update imshow() window for Python OpenCV CV2
You can call imshow
repeatedly without destroying it. And yes, you will likely need waitKey
, just don't call it with 0 or it will wait indefinitely. Call it with a 1 to wait just 1 millisecond and ensure the image redraws. Try something like:
while True:
cv2.imshow('image', img)
cv2.waitKey(1)
radius = input('Input radius')
# recalculate image with new radius here...