为什么HSV到RGB算法的工作方式如此? [英] Why does the HSV-to-RGB algorithm work the way it does?
问题描述
我已阅读关于从HSV转换为RGB 的维基百科文章,但我已不明白。
I have read the Wikipedia article about converting from HSV to RGB, but I don't understand. Why is each case option the way it is, and why they are ordered like that, if the order matters?
推荐答案
维基百科的概要:为什么每个案例的选择都是这样的?一个漂亮的防弹方法来编码它,所以我假设你对实现的逻辑混淆。您对此感到困惑,是否正确?
Wikipedia outlines a pretty bulletproof approach to coding it, so I'll assume you're confused about the implementation's logic. You're confused about this, correct?
如果你看看它旁边的图片,你会明白为什么:
If you look at the image adjacent to it, you will see why:
img src =https://i.stack.imgur.com/SeiSb.pngalt =enter image description here>
每个频道的功能是分段的功能由五个线性段组成。案例考虑了每个分布的每个范围,即上图的阴影区域。
Each channel's function is a piecewise function consisting of five linear segments. The cases account for each range of each distribution, namely the shaded regions of the above picture.
这篇关于为什么HSV到RGB算法的工作方式如此?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!