ios HSV 颜色范围表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12357732/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
HSV Color ranges table
提问by Bob de Graaf
I'm developing an App in which children need to find certain colors using a certain target dot on the camera screen - kind of augmented reality like. I've got the whole thing working already, but with RGB colors. For each color, red, green, blue, yellow, purple, etc. I've been testing and defining the ranges of the RGB values to determine when it is exactly which color. A lot of work.
我正在开发一个应用程序,其中儿童需要使用相机屏幕上的某个目标点找到某些颜色 - 有点像增强现实。我已经完成了整个工作,但是使用了 RGB 颜色。对于每种颜色,红色、绿色、蓝色、黄色、紫色等。我一直在测试和定义 RGB 值的范围,以确定它何时是哪种颜色。很多工作。
However, I've learned that using HSV it works even better. But I don't want to go through the whole process again of setting ranges for each color. But I simply can't find it anywhere online, I've been googling for two hours already!
但是,我了解到使用 HSV 效果更好。但我不想再次经历为每种颜色设置范围的整个过程。但是我在网上根本找不到它,我已经用谷歌搜索了两个小时了!
So what I'm searching for is pretty simple: For a set of about 8 standard colors: red, green, blue, yellow, purple, etc the corresponding HSV ranges.
所以我要搜索的内容非常简单:对于一组大约 8 种标准颜色:红色、绿色、蓝色、黄色、紫色等对应的 HSV 范围。
For example: The color red - Hue between 0 and 20, Saturation between 0.8 and 1.0, Value between 0.8 and 1.0. (not sure this is right, just an example)
例如:红色 - 色相介于 0 和 20 之间,饱和度介于 0.8 和 1.0 之间,值介于 0.8 和 1.0 之间。(不确定这是对的,只是一个例子)
I mean, someone must have done this already sometime!?
我的意思是,一定有人已经在某个时候这样做了!?
回答by Black Frog
One of the first mathematically defined color spaces is the CIE 1931 XYZ color space. I think that article on Wikipedia should provide some additional insight in the complexity of what you would like to do. I am sure that someone has done this, but I don't believe it's open source.
第一个数学定义的色彩空间是CIE 1931 XYZ 色彩空间。我认为维基百科上的那篇文章应该提供一些关于您想要做的复杂性的额外见解。我确信有人已经这样做了,但我不相信它是开源的。
The closest chart I found is publish on Wikipedia under Web colorsarticle.
我找到的最接近的图表是在 Wikipedia 上的Web 颜色文章下发布。