I have an existing code segment reading image using scipy.misc
imref = misc.imread(self.file_image, False, "RGB")
If I would like to replace it with imageio, how to do that, can I just use
imref = imageio.imread(self.file_image, False).
I am not clear where to setup the "RGB"
parameter while using imageio.imread
.
As explained in the docs you can use the keyword argument pilmode
to specify the modality, while scipy flatten
is replaced by as_gray
. So in your case:
imref = imageio.imread(self.file_image, as_gray=False, pilmode="RGB")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With