def displ():
rows = int((len(steps)-1)/COLS)+1
fig, ax = plt.subplots(
ncols=min(COLS,len(steps)),
nrows=rows,
sharex=True,
sharey=True,
squeeze=False,
figsize=(12,7))
for i, (tit, im) in enumerate(steps):
r = int(i/COLS)
c = i%COLS
ax[r][c].imshow(im, cmap=plt.cm.gray)
ax[r][c].set_title(tit)
if (SAVE_OUTPUTS):
imsave(tit+'-out.jpg', img_as_ubyte(im))
ax[r][c].axis('off')
ax[r][c].set_xticklabels([])
ax[r][c].set_yticklabels([])
plt.subplots_adjust(wspace=0, hspace=.1, left=0, bottom=0, right=1, top=.95)
#plt.tight_layout()
plt.show()
# return the XxY of the image
评论列表
文章目录