Imageio and cv2 Read Image - jpeg

311 Views Asked by At

I am working on augmenting some images and I have run not necessary into a problem, but something that struck me as odd. For most of my augmentation methods I am using the Imgaug library and using imageio.imread to read my files. Though for my rotation augmentation I am using cv2.imread. I am using cv2 because of a function I need to not loose any of the image when it is rotated (imutils.rotate_bound()). Both methods work to read the image (jpeg), but I've noticed that the color changes with using the cv2 method. Please see examples below. Is this something that I should be concerned about or ...?

enter image description here

Edits: Just read through this post about cv2. Just to be clear, cv2 is just stacking the bands in a different order? So unless I am adding bands from multiple images and not taking into consideration that band 1 from one image could be the Blue band and one band from another image could be the Red band, then I do not need to convert? The pixel values are the same, but how it is displayed is different?

0

There are 0 best solutions below