"imshow(img, cmap=cm.gray) shows a white for 128 value","plt.imshow(bg, cmap=plt.get_cmap('gray'), vmin=0, vmax=255)"