我从plt.show获得图像输出,我想保存到数组中。我要保存到列表中的图像是原始图像及其覆盖物的结果。
differencesList = []
for i in range(len(imagesArrayMerged)):
if(imagesArrayMerged[i]!=imagesArrayCorrupt[i]):
background = imagesArrayCorrupt[i]
overlay = imagesArrayMerged[i]
#creates the image of the background and overlay image
plt.imshow(background)
plt.imshow(overlay, cmap='jet', alpha=0.4)
#want to put the output of the prior two lines into a list
differencesList.append(imshow_result_goes_here)