目前,skimage中的白色参考值不能作为参数传递(欢迎提交拉取请求),但这里有一个解决方法:
from skimage import color
color.colorconv.lab_ref_white = np.array([0.96422, 1.0, 0.82521])
lab = color.rgb2lab(image)
Stefan van der Walt的回答在当时是正确的,但是对于任何仍然有同样问题并找到这个页面的人来说:从scikit-image 0.13(2016年12月)开始,skimage.color.rgb2lab
带有一个illuminant
参数,因此您只需编写:
lab = color.rgb2lab(image, illuminant='D50')
color.colorconv.xyz_from_rgb
,它可以正常工作。再次感谢您的参考!PS 我是Python新手,不确定是否能够正确处理拉取请求。)) - PylypB5200
绣线,其lab值为(91.6, 1.5, -6.3)。但在D65下,该颜色的lab值为(91.6, 1.5, -6.3),属于冷白色。 - Pylyp