I want to export Numpy ndarray to png files as image using pyqtgraph.
import pyqtgraph as pg
import pyqtgraph.exporters
import h5py
h5file = h5py.File('hoge.h5',"r")
images = h5file['image'].value
for i in xrange(images.shape[0]):
img = pg.image(images[i])
exporter = pg.exporters.ImageExporter(img.view)
exporter.export('image_'+str(i)+'.png')
images
is (N,128,128,3) shaped numpy ndarray. (N is the number of images I require)
When the code run, the image window is displayed N-times because of pg.image
. I want these image windows NOT displayed.
Please give me some ideas about this.