how to convert mat to image in (Emgu CV version 3) in c#?

匿名 (未验证) 提交于 2019-12-03 08:50:26

问题:

I need to convert a Mat to an Image in Emgu CV. Trying to cast a Mat to an image produces an exception: Cannot implicitly convert type 'Emgu.CV.Mat' to 'Emgu.CV.Image

Image<Bgr, Byte> imgeOrigenal;  Capture capWebcam = null;  imgeOrigenal = capWebcam.QueryFrame();//error line 

How can I convert the Mat to an Image?

回答1:

the correct answer is the first comment @David_D sent under the question.

 Image<Bgr, Byte> imgeOrigenal = capWebcam.QueryFrame().ToImage<Bgr, Byte>(); 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!