且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

HSL 是否优于 HSI 和 HSV 颜色空间?

更新时间:2023-01-27 12:05:47

哪个***很大程度上取决于您使用它的目的.但根据我的经验,HSL (HLS) 在亮度和饱和度之间存在不幸的相互作用.

这是一个将图像亮度降低 2 的示例.最左边的图像是原始图像;接下来是使用 RGB、HLS 和 HSV 的结果:

请注意 HLS 中蝴蝶边缘周围过于明亮和饱和的斑点,尤其是底部的红色斑点.这就是我所说的饱和问题.

此示例是在 Python 中创建的,使用 colorsys 模块进行转换.p>

Is HSL superior over HSI and HSV, because it takes human perception into account.? For some image processing algorithms they say I can use either of these color spaces, and I am not sure which one to pick. I mean, the algorithms just care that you provide them with hue and saturation channel, you can pick which color space to use

Which one is best very much depends on what you're using it for. But in my experience HSL (HLS) has an unfortunate interaction between brightness and saturation.

Here's an example of reducing image brightness by 2. The leftmost image is the original; next comes the results using RGB, HLS, and HSV:

Notice the overly bright and saturated spots around the edge of the butterfly in HLS, particularly that red spot at the bottom. This is the saturation problem I was referring to.

This example was created in Python using the colorsys module for the conversions.