用于颜色提取的图像 HSV EMGUCV 的值范围
下面,
Image<Hsv, Byte> hsvimg = img.Convert<Hsv, Byte>();
Image<Gray, Byte>[] channels = hsvimg.Split();
Image<Gray, Byte> imghue = channels[0];
Image<Gray, Byte> imgsat = channels[1];
Image<Gray, Byte> imgval = channels[2];
Image<Gray, byte> huefilter = imghue.InRange(new Gray(?), new Gray(?));
Image<Gray, byte> satfilter = imghue.InRange(new Gray(?), new Gray(?));
Image<Gray, byte> valfilter = imgval.InRange(new Gray(?), new Gray(?));
不同颜色提取的不同通道(h,s,v)的范围值是多少?是0-255还是0-128。我想检测图像中的橙色、黑色和天蓝色物体。
In the following,
Image<Hsv, Byte> hsvimg = img.Convert<Hsv, Byte>();
Image<Gray, Byte>[] channels = hsvimg.Split();
Image<Gray, Byte> imghue = channels[0];
Image<Gray, Byte> imgsat = channels[1];
Image<Gray, Byte> imgval = channels[2];
Image<Gray, byte> huefilter = imghue.InRange(new Gray(?), new Gray(?));
Image<Gray, byte> satfilter = imghue.InRange(new Gray(?), new Gray(?));
Image<Gray, byte> valfilter = imgval.InRange(new Gray(?), new Gray(?));
What is the range value of different channel (h, s, v) for different color extraction? Is it 0-255 or 0-128. I want to detect Orange, Black and Sky blue object for an image.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你能尝试这样的橙色
-10 和 +10 只是一个猜测,可能很广泛。只需使用它,看看效果如何。
对于
satfilter
您可以使用Color.Orange.GetSaturation()
对于第三个,我假设您可以使用
Color.Orange.GetBrightness()< /代码>
Can you try something like this for orange
-10 and +10 is just a guess and could be broad. just play with it and see what works.
for
satfilter
you can useColor.Orange.GetSaturation()
and for the third one, I'm assuming you can use
Color.Orange.GetBrightness()