I have a .tiff
file/image. When I use the following code to visualize it inline in a python notebook, it looks like the following. Code and image shown below -
orig_img_path = os.path.join("/path/to/tiff/1000.tiff")
img_orig = Image.open(orig_img_path,"r")
img_arr = np.array(img_orig)
min_pix, max_pix = np.amin(img_arr), np.amax(img_arr)
plt.imshow(img_arr, vmin = min_pix, vmax = max_pix, cmap = 'gray')
plt.show()
The image looks like the following -
Whereas the same image when viewed through the standard image viewer on my MacBook looks like so -
I am wondering why is there so much difference between the images when viewed through different methods. It seems like the one which is viewed through ipynb is much grayer than the one which viewed through simply on Mac.
Thanks and please let me know if I am missing anything.
-- Megh