Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I created imageHolder class:
C#
public class ImageHolder : Image<Bgr, Byte>
   {
       private String imagePath;

       public ImageHolder(String path):base(path)
       {
          this.imagePath = path;
       }
       public String imgPathProperty
       {
           get
           { return imagePath; }
           set
           { imagePath = value; }
       }
   }

I create instance of the class and initialize it,like this:

C#
private ImageHolder originalImageHolder;
 originalImageHolder = new ImageHolder(openFileDialog.FileName);

In runtime i get this exception:

The type initializer for 'Emgu.CV.CvInvoke' threw an exception.

Any idea why i get this exception and how can i fix it?

Thank you in advance.
Posted
Updated 15-Sep-12 4:14am
v2
Comments
Kuthuparakkal 15-Sep-12 10:18am    
post you Image class code

1 solution

It's very hard to help you with the information you provided.

Having said that, debug your app and look at the inner exception, it is possible that some assemblies can not be found or you have licensing problems.
 
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