Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
330 views
in Technique[技术] by (71.8m points)

ios - HSV Color ranges table

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.

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!

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.

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)

I mean, someone must have done this already sometime!?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

The closest chart I found is publish on Wikipedia under Web colors article. CSS 1–2.0 / HTML 3.2–4 / VGA color names


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...