I got a single-layer uint16 tiff image, i.e 2d array each value ranges between 0-65355. When I read and display the image with cv2 it works corrrectly.
im = cv2.imread(path, -1)
cv2.imshow('im', im)
Now I'm trying to make a GUI with Tkinter and incorporate the image into the GUI, but all it displayed is a white canvas.
im = cv2.imread(path, -1)
height = im.shape[0]
width = im.shape[1]
canvas.config(width=width, height=height)
image = Image.fromarray(im)
root.photo = photo = ImageTk.PhotoImage(image=image)
canvas.create_image(0, 0, image=photo, anchor=tk.NW)
Other types of RGB 8bit images are displyed as shuold. How can I disply the image? what Im doing wrong?