Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I am getting this exception in the line 'image=new Image<bgr,byte>(OF.FileName)' How to solve this exception? I have added the opencv dlls to the project and all the references required but still getting the error.

XML
private void button1_Click(object sender, EventArgs e)
       {
           Image<Bgr, Byte> img;
           OpenFileDialog OF = new OpenFileDialog();

           if (OF.ShowDialog() == System.Windows.Forms.DialogResult.OK)
           {

                   img = new Image<Bgr, byte>(OF.FileName);
                   Bitmap bit = new Bitmap(pictureBox2.Image);
Posted
Updated 28-Nov-17 2:08am
v2

1 solution

You should definitely check the official documentation on this Exception.

The type initializer for 'Emgu.CV.CvInvoke' threw an exception.[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900