如何将垫子转换为图像 [英] how to convert mat to image
本文介绍了如何将垫子转换为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在Emgu CV中将Mat转换为Image。尝试将Mat投射到图像会产生异常:无法将类型'Emgu.CV.Mat'隐式转换为'Emgu.CV.Image
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
如何可以将Mat转换为图像吗?
How can I convert the Mat to an Image?
推荐答案
正确的答案是在该问题下发送的第一条@David_D评论。
the correct answer is the first comment @David_D sent under the question.
Image<Bgr, Byte> imgeOrigenal = capWebcam.QueryFrame().ToImage<Bgr, Byte>();
这篇关于如何将垫子转换为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文