0
votes

I downloaded EMGU Cv control , ImageBox Im trying to display a video stream in this control . The control image object is IImage, how can i display image to the ImageBox? its accept IImage only, how can i create or convert image or bitmap to IImage , or create one ?

EDIT: I've done this:

                            Bitmap bmp = new Bitmap(picBuffer.FramesDicitionary[addr]);
                            Image<Bgr, Byte> img1 = new Image<Bgr, Byte>(bmp);
                            pbTopLeft.Image = img1; 

and when i run the app , its say: The type initializer for 'Emgu.CV.CvInvoke' threw an exception How to fix this ?

1
Have you added the unmanaged dlls to your project? Have a look at this link - Anders

1 Answers

0
votes

Have you copied the OpenCV dlls to the execution directory? Make sure the unmanaged DLLs are in the execution directory. The best way to set up your project is:

  1. Copy the unmanaged DLLs to your project folder
  2. Right click on the project, click Add->Existing Item and select all unmanaged DLLs. Add them to the project.
  3. For each of the included Dlls, left click on it, find the "Copy to Output Directory" option and select "Copy if newer"