How to convert ImageBox.Image to Image<Bgr, Byte>

倾然丶 夕夏残阳落幕 提交于 2019-12-24 00:43:14

问题


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

I tried this without luck:

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

Results in:

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


回答1:


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

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


来源:https://stackoverflow.com/questions/34948499/how-to-convert-imagebox-image-to-imagebgr-byte

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