Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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#.

like image 803
Sisay Avatar asked May 19 '13 09:05

Sisay


1 Answers

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

Is that what you mean?

like image 128
Roger Rowland Avatar answered Oct 12 '22 02:10

Roger Rowland