OpenCV - 用于跟踪红色的 HSV 值范围
您能否告诉我浓红色的色相、饱和度和明度指数的范围是多少?
我尝试使用这个值进行颜色跟踪,但我无法通过谷歌找到具体的答案。
Could you please tell me how to what are ranges for Hue, Saturation and Value indices for intense red?
I try to use this values for color tracking and I couldn't find a specific answer via Google.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将任何颜色映射到 OpenCV HSV。实际上opencv使用1800色调圆柱体,而理想情况下它是360,或者MS油漆使用2400圆柱体。
因此,要获得 OpenCV HSV 值,只需打开 MS 绘图、打开混合器,然后读取 HSV 的值,现在将该值映射到 OpenCV HSV 中,并将其乘以 180/240。
饱和度和值的取值范围为 00-1800
you can map any color to OpenCV HSV. Actually opencv use 1800 hue cylinder while ideally it is 360, on the orher hand MS paint use 2400 cyllinder.
So to get OpenCV HSV value, simply open MS paint, open mixer, and read the value of HSV, now to map this value into OpenCV HSV multiply it with 180/240.
the range to value for saturation and value is 00-1800
您是唯一可以回答这个问题的人,因为我们不知道您对“浓红色”的标准。收集尽可能多的样本,其中一些您认为是强烈的红色,而另一些则很接近,但只是错过了切工。将它们全部转换为 HSL。研究模式。
您可以组装一个小应用程序,其中包含 H、S 和 L 参数的滑块,并显示与设置相对应的颜色块。这会很快告诉你你的极限。
You are the only one who can answer this question, since we don't know your criteria for "intense red". Collect as many samples as you can, some of which you consider intense red and some which are close but just miss the cut. Convert them all to HSL. Study the pattern.
You might put together a small app that has sliders for the H, S, and L parameters and displays a block of color corresponding to the settings. That will tell you your limits very quickly.