-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency when reading floating point .exr image file #1047
Comments
Did the systems have different version of import imageio.v3 as iio
import numpy as np
im = iio.imread('a.exr', flags=cv2.IMREAD_UNCHANGED)
print(im.shape) # (200, 300)
print(im.dtype) # float32
print(np.min(im), np.max(im)) # 1.0 1.0 |
Thanks for your reply :) The version of OpenCV that both the systems had was 4.8.1. But regardless of OpenCV, we expected the same behaviour when reading from imageio, but we got different results. Can you please tell me which version of imageio are you using and testing this on? Because, you seemed to have used By running your code, I get an error saying I have not seen documentation on imageio which specifies the usage of the argument 'flags'. So your above response has not helped us resolve the issue that we are facing |
@Shrinidhibhat87 The version of mine is import imageio.v3 as iio
im = iio.imread('a.exr', plugin='opencv', flags=cv2.IMREAD_UNCHANGED) |
When reading a floating point image of extension .exr there is an inconsistency with regards to the format and shape.
I verified this with two different systems.
Both were on ubuntu 20.04.
Imageio version: 2.31.5
The image is attached as a zip file:
a.zip
The python script:
Output system 1:
format (1, 200, 300, 3) uint8
range: [255, 255]
Output system 2:
format (200,300) float32
range: [1.0, 1.0] m
I want system 1 to also showcase the same behaviour as system 2. Why is this inconsistency happening?
To give more context, reading the image using opencv with the cv2.IMREAD_UNCHANGED flag set results in
format (200,300) float32
range: [1.0, 1.0] m
Whereas without the flag, the response is the same as system 1
format (1, 200, 300, 3) uint8
range: [255, 255]
The text was updated successfully, but these errors were encountered: