Lemmouchi Rédha Dida Lemmouchi Rédha Dida - 1 year ago 243
C# Question

How to convert Bitmap to Image<Bgr, Byte>

I am using the OpenCV library for image processing.

I want to convert a

to an
Image<Bgr, Byte>
. How can I do this?

Answer Source

The Image constructor has a Bitmap overload (assuming you're using the Emgu CV wrapper since you've marked it .NET).

Image<Bgr, Byte> myImage = new Image<Bgr, Byte>(myBitmap); 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download