Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8527591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:36:00+00:00 2026-06-11T08:36:00+00:00

I created imageHolder class: public class ImageHolder : Image<Bgr, Byte> { private String imagePath;

  • 0

I created imageHolder class:

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:

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

In runtime i get this exception:

The type initializer for ‘Emgu.CV.CvInvoke’ threw an exception.

enter image description here

Here is Solution Explorer window:

enter image description here

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

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:36:02+00:00Added an answer on June 11, 2026 at 8:36 am

    The TypeInitializationException (the exception that you are seeing) is thrown whenever a static constructor throws an exception, or whenever you attempt to access a class where the static constructor threw an exception – its InnerException property is the property that contains the detail of the exception that was actualy thrown – this is the exception that you need to investigate.

    In this case from your screenshot the problem appears to be that the DLL “opencv_core240.dll” could not be found. This could be for a number of reasons

    • The DLL couldn’t be found
    • One of the dependencies of the DLL could not be found
    • The DLL was in the incorrect image format (32 bit as opposed to 64 bit)

    I’d suggest that you take a look at this question to see if any of the suggestions on there help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a following class within a namespace Global namespace Global { public static
I've created an image service in C# which takes a base layer image (JPG),
I have created a database by extending SQLiteOpenHelper class. And its created also. This
I have created a custom Base Adapter class, to populate a list view with
Created Private Key & Self signed certficate in a Key Store keytool -genkey -alias
I created a JButton which has an image set as an icon representing the
I have created a class call ImageLoader and use memory cache to store all
Created a custom validation attribute and I would like to get it to work
I've been trying to get this working, and not having 100% success, basically trying
Created a new App, created a new Fanpage for this App but if i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.