What is the preferred way of doing the conversion using PIL/Numpy/SciPy today?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since 2010 when the linked question was asked the corresponding code moved from scipy to a separate toolkit:
http://scikit-image.org/
So here’s the code I was actually looking for:
It should also be noted that due to Lab nature srgb->lab conversion depends on an additional parameter: whitepoint, eg:
• Photoshop uses a white point called D50 (which is a standard for icc)
• OpenCV and skimage use D65 (which is a standard for srgb).
• default Matlab implementation uses D50 (it is capable of using others),
This nice FAQ explains it this way:
You can tell which whitepoint you’re dealing with by converting RGB
(0,0,255)to Lab:• D50 would give you (30, 68, -112)
• D55 (30, 73, -110)
• D65 (32, 79, -108)
The numbers after ‘D’ correspond to (internally) used color temperature of white point: D50 = 5003 K (yellowish), D65 = 6504 K (blueish)
I’m grateful to Alex and Roman for their answers because they pointed me into the right direction.