I have a bunch of medical images in a hdf5
file.
path_to_data = "data/train_large_axial_350_x_350.hdf5"
data = h5py.File(path_to_data,"r")
image_list = data["images"]
image = image_list[5]
If I do
cv2.imwrite("maps/image.jpg", image)
I get:
But, if I do
plt.imshow(image)
I get:
What is the cause of this and how can I plot the image so that it looks like that which is produced by cv2.imwrite
?