模棱两可的参考错误?

在使用canny过滤器检测到最大轮廓后,我现在只想提取其中存在的内容。


Rectangle rect = CvInvoke.BoundingRectangle(contours[largest_contour_index]);            

Bitmap target = new Bitmap(rect.Width, rect.Height);


using (Graphics g = Graphics.FromImage(target))

{

    g.DrawImage(imageInput, new Rectangle(0, 0, target.Width, target.Height),

                rect, GraphicsUnit.Pixel);

}


imageBox2.Image = imageInput;

我收到此错误:


错误 CS0104 'Graphics' 是 'System.Drawing.Graphics' 和 'UnityEngine.Graphics' 之间的不明确引用


任何想法如何修复?


一只名叫tom的猫
浏览 125回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP