So I want to use imageio to read a black-and-white image as a 3d image.
If I had used opencv I would use the following command since opencv's default is IMREAD_COLOR:
im3d = cv2.imread(im_path)
This results in shape (186, 148, 3)
However, since it is a black-and-white image, imageio contrary to opencv defaults to reading two dimensions. Thus
im3d = imageio.imread(im_path)
results in shape (186, 148).
According to the imageio docs, I need to add "format", a string with "The format to use to read the file." to make imageio behave the way I want to. See this link: https://imageio.readthedocs.io/en/stable/userapi.html#imageio.imread
But this is so badly explained! I am often amazed by how bad documentation is. I have no way to know what to enter as "format" in order to get imageio to behave as I want. So any help on this would be very appreciated!