在使用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' 之間的不明確引用任何想法如何修復?
- 2 回答
- 0 關注
- 151 瀏覽
添加回答
舉報
0/150
提交
取消