如何转换Emgu.Cv.Image<灰色,字节>到System.Image [英] How to Convert Emgu.Cv.Image<Gray,byte> to System.Image
本文介绍了如何转换Emgu.Cv.Image<灰色,字节>到System.Image的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新的Emgu Cv,我想知道是否有人可以让我知道我如何将Emgu.Cv.Image更改为System.Image?如果需要进一步的解释,让我知道,我会做到。我使用的语言是C#。
I was new to Emgu Cv and i was wondering if someone could let me know how i change Emgu.Cv.Image to System.Image?If there is a need for further explanation, let me know and i will do it.The language i am using is C#.
推荐答案
您可以使用 ToImage c $ c>方法来获取
System.Drawing.Bitmap
(这是一个 System.Drawing.Image
),所以像这样
You can just use the ToImage()
method to get a System.Drawing.Bitmap
(which is a derived class of System.Drawing.Image
), so something like this
// create an Emgu image of 400x200 filled with Blue color
Image<Bgr, Byte> img = new Image<Bgr, byte>(400, 200, new Bgr(255, 0, 0));
// copy to a .NET image
System.Drawing.Image pMyImage = img.ToBitmap();
这是什么意思?
这篇关于如何转换Emgu.Cv.Image<灰色,字节>到System.Image的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文