3
在下文中,值範圍爲顏色提取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。我想檢測圖像的橙色,黑色和天藍色物體。
Color.Orange.GetHue()從0到255,Color.Orange.GetSaturation返回值()返回值從0-1,我有點困惑什麼img.InRange()範圍值要求...仍然我無法檢測橙色 – littleBrain 2011-05-26 08:35:49
@littleBrain結帳此代碼文件http://code.google.com/ p/howme/source/browse/trunk/PC_Client/MyRobot/CameraControl.cs?spec = svn7&r = 7 – 2011-05-26 18:12:16
Color.Orange.GetSaturation()...是System.Drawing命名空間下的顏色? – littleBrain 2011-05-28 03:54:14