如何将ImageBox.Image转换为Image< Bgr,Byte> [英] How to convert ImageBox.Image to Image<Bgr, Byte>

查看:324
本文介绍了如何将ImageBox.Image转换为Image< Bgr,Byte>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在图像变量中包含我的(Emgu CV版本3) ImageBox 的图像,我应该怎么做?

I need to have the image of my (Emgu CV version 3) ImageBox in an image variable, how should I do this?

我没有运气尝试过

 Image<Bgr, Byte> imgeOrigenal;
 imgeOrigenal = ImageBoxbOrigenal.Image; //error line

结果为:


无法将类型'Emgu.CV.IImage'隐式转换为'Emgu.CV.Image'。存在显式转换

Cannot implicitly convert type 'Emgu.CV.IImage' to 'Emgu.CV.Image'. An explicit conversion exists


推荐答案

您可以通过源位图将其转换,如下所示:

You can convert it through the source bitmap, like this:

Image<Bgr, Byte> imgeOrigenal = new Image<Bgr, Byte>(ImageBoxbOrigenal.Image.Bitmap);

这篇关于如何将ImageBox.Image转换为Image&lt; Bgr,Byte&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆