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

前端 未结 11 2286
轮回少年
轮回少年 2020-11-29 10:17

I\'m getting this error

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

when I try to use Emgu CV. I\'ve tried

11条回答
  •  粉色の甜心
    2020-11-29 10:50

    It's probably failing to load the unmanaged DLL dependencies. A couple of suggestoins:

    1. Make sure your .NET project is targeting x86 rather than AnyCPU, since you likely have the x86 build of OpenCV.
    2. Make sure the OpenCV dlls are in your PATH (or directly in the bin directory, if this is a Console/WinForms/WPF app.)

提交回复
热议问题