-
Hi Colour Team, I using colour.read_image to read a ProPhoto RGB image 16 uint, but as I double check with Matlab imread. Why is that? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments
-
Hi @hminle, Colour converts any image to Line 246 in c8acc31 Cheers, Thomas |
Beta Was this translation helpful? Give feedback.
-
Oh and btw, note that we do not linearise the image, so you would need to know which encoding function was used to save the image so that you can use the corresponding decoding function. If Prophoto RGB it might be colour.models.cct_decoding_ROMMRGB. |
Beta Was this translation helpful? Give feedback.
-
Hi @KelSolaar , even I choose to read image as uint 16 for both Matlab and Colour, it's still different. Thanks |
Beta Was this translation helpful? Give feedback.
-
Yes it does! The relevant conversion code is here: Line 101 in c8acc31 Here is a quick Colab notebook showing some back and forth: https://colab.research.google.com/drive/1D4uB_K2MknkdB6aJ65sejcza8Ex0mKkr It should be useful! Let me know if you have any questions! |
Beta Was this translation helpful? Give feedback.
-
@hminle : Did u get this one working? |
Beta Was this translation helpful? Give feedback.
-
Hi @KelSolaar, I think the difference lies behind third-party Library, in colour case, it should be ImageIO. Then we cannot tell exactly. Btw, how could I know "the corresponding decoding function" for each color profile? |
Beta Was this translation helpful? Give feedback.
-
It is really hard, depends actually on the writing library, if you know it is using ICC, then via the profile you should get all the needed info, if not, well it is Dark Magic! |
Beta Was this translation helpful? Give feedback.
-
Hi, so for example, if I load sRGB images using colour, then I manage to convert them to ProPhoto RGB, then I want to save the results. What should I do? |
Beta Was this translation helpful? Give feedback.
-
Should be examples to do that in the Colab Notebook above. |
Beta Was this translation helpful? Give feedback.
-
You mean switch between float 32 and uint16? |
Beta Was this translation helpful? Give feedback.
-
They also show how to do the conversion to ProPhoto RGB. |
Beta Was this translation helpful? Give feedback.
-
Thank you a lot, I see it |
Beta Was this translation helpful? Give feedback.
Yes it does! The relevant conversion code is here:
colour/colour/io/image.py
Line 101 in c8acc31
Here is a quick Colab notebook showing some back and forth: https://colab.research.google.com/drive/1D4uB_K2MknkdB6aJ65sejcza8Ex0mKkr
It should be useful! Let me know if you have any questions!