title: The type initializer for 'Emgu.CV.CvInvoke' threw an exception
body: <p>I'm getting this error</p>
  
  <blockquote>
    <p>The type initializer for 'Emgu.CV.CvInvoke' threw an exception.</p>
  </blockquote>
  
  <p>when I try to use Emgu CV. I've tried everything I can think of to fix this but it's still giving the same error, and when I click a button it shows</p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>This is the code I'm trying:</p>
  
  <pre><code>void ProcessFunction(object sender, EventArgs e)
  {
      imgOrg = capturecam.QueryFrame();
      if (imgOrg == null) return;
      imgProc = imgOrg.InRange(new Bgr(50, 50, 50), new Bgr(255, 255, 255));
      imgProc = imgProc.SmoothGaussian(9);
      imageBox1.Image = imgOrg;
      imageBox2.Image = imgProc;
  }
  </code></pre>
  
  <p>What might I have done wrong and how can I debug this further? Thanks!</p>