How to convert ImageBox.Image to Image

2019-07-18 04:38发布

问题:

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);


标签: c# emgucv