0
我是Emgu新手,正在使用C#代码教程在Internet上进行学习。在代码中,我发现某些元素如img [channel](第15行)和NewImage(“Background segmented”,图像)(第21行)未被引用。但是我添加了合适的DLL和引用。如果我在这里丢失任何东西,你能让我知道吗?使用Emgu CV C时发生错误#
using Emgu;
using Emgu.CV;
using Emgu.Util;
using Emgu.CV.CvEnum;
using Emgu.CV.Util;
using Emgu.CV.Structure;
private void CielabChannelMaskBGSubtraction(string filename, bool displayResult)
{
double threshold = double.Parse(max2textBox.Text);
Image<Bgr, byte> rgb = new Image<Bgr, byte>(filename);
Image<Lab, Byte> img = rgb.Convert<Lab, Byte>();
//get the a* channel
Image<Gray, Byte> gray = img[channel];
//threshold and invert
gray = gray.ThresholdBinary(new Gray(threshold), new Gray(255)).Not();
// display the result
if (displayResult) this.NewImage("Background segmented", image);
}
谢谢我试试看..我有一个更多的查询..在代码的最后一行,我有一个对NewImage()的引用。但它显示一个错误,指出该方法未找到,并且可能缺少引用或程序集。对此有何建议? – Blitzkreig1990