I have a bunch of satellite images that I am inspecting for errors and it is pretty tedious. I would like a way to do this efficiently in Python where I can look at an image, close the window when I'm done, look at the next image, etc. without requiring me to alter the code each time (e.g. plt.imshow(image1)
, plt.imshow(image2)
, etc.).
I tried using input()
which pauses a function until the user presses ENTER but unfortunately it prevents plt.imshow()
from displaying the image until the loop is completely finished, and then it only shows the last image in the loop.
npoints = 100 * 100
noise = randgen.randn(npoints).reshape([100, 100])
image_1 = np.mgrid[0:100:100j, 0:100:100j][0]
image_2 = np.mgrid[0:100:100j, 0:100:100j][1]
image_3 = image_1 * image_2
images = [image_1, image_2, image_3]
for image in images:
plt.imshow(image)
input()
Any ideas for how I might do this, or another way to interactively plot in Python?
Thank you