-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Colorspace conversions are wrong for anything other than uint8 #5979
Comments
Hello @tbenst, and thank you for your interest in
🙂 >>> import skimage
>>> astronaut_uint8 = skimage.data.astronaut()
>>> astronaut_float32 = skimage.img_as_float32(astronaut_uint8)
>>> astronaut_uint16 = skimage.img_as_uint(astronaut_uint8)
>>> astronaut_uint8.max()
255
>>> astronaut_uint16.max()
65535
>>> astronaut_float32.max()
1.0
>>> rgb2luv(astronaut_uint8)[:,:,0].max()
100.0
>>> rgb2luv(astronaut_float32)[:,:,0].max()
100.0
>>> rgb2luv(astronaut_uint16)[:,:,0].max()
100.0 |
@tbenst, if you don't mind I will convert this issue to conversation. |
prior comments from the deleted Discussion
|
Description
I've found what appears to be a severe bug, where colorspace conversions are completely wrong for all dtypes other than uint8.
Way to reproduce
Note that max(L)=100 by definition, so 9341 is clearly wrong, as is 0.272.
Version information
The text was updated successfully, but these errors were encountered: