我正在用 emgucv 库编写一个 C# 程序。 我使用 emgucv 中的图像框从网络摄像头捕获图像。 我想通过鼠标单击图像框使用 bitmap.Getpixel() 来获取图像的颜色像素。 然而, 它包含错误错误是..它不能隐式地将类型'Emgu.CV.IImage'转换为'System.Drawing.Bitmap'
谁能给我解决这个问题的想法?
Bitmap bitmap = newdetectimageBox.Image; //error
最佳答案
请使用此代码
Image<Bgr, Byte> ImageFrame = newdetectimageBox.Image ; //Capture the cam Image
Bitmap BmpInput = ImageFrame.ToBitmap(); //Convert the emgu Image to BitmapImage
关于c# - 将EmguCV图像转换为系统绘图位图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15406235/