How to convert Emgu.Cv.Image <Gray, byte> to System.Image

I was new to Emgu Cv and I was wondering if anyone could tell me how I can change Emgu.Cv.Image to System.Image? If further explanation is needed, let me know and I will. The language I use is C #.

+4
source share
1 answer

You can simply use the ToImage() method to get 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(); 

Is that what you mean?

+5
source

Source: https://habr.com/ru/post/1481601/


All Articles