在Python中将RGB转换为实验室的快速方法 [英] Fast way to convert rgb to lab in python

查看:72
本文介绍了在Python中将RGB转换为实验室的快速方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有使用D50 sRGB在Python3中将RGB转换为LAB的快速方法?

Is there a quick way to convert RGB to LAB in Python3 using D50 sRGB?

Python-Colormath 太慢

skimage 使用D65

推荐答案

目前,无法将skimage中的白色参考作为参数传递(欢迎拉请求),但这是一种解决方法:

For now, the white reference in skimage cannot be passed as a parameter (pull request welcome), but here is a workaround:

from skimage import color
color.colorconv.lab_ref_white = np.array([0.96422, 1.0, 0.82521])
lab = color.rgb2lab(image)

这篇关于在Python中将RGB转换为实验室的快速方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆