Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

dll - unable to load cvextern in a c# project

i'm trying to debug my program, using emgu and HaarCascade in c#. i'm getting an exception like so :

Unable to load DLL 'cvextern': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

i've added the file cvextern.dll to my project and tried both "copy always" and "copy if newer" options on the properties of the file. also, the build is in platform x64.

here's partly what i wrote :

    private void Load_Click(object sender, EventArgs e)
    {
        OpenFileDialog dlg = new OpenFileDialog();
        dlg.Filter = "Photo Files (*.jpg)|*.JPG";
        dlg.CheckFileExists = true;
        if (dlg.ShowDialog() == DialogResult.OK)
        {
            Image<Bgr, Byte> My_Image = new Image<Bgr, byte>(dlg.FileName);
            HaarCascade face = new HaarCascade("haarcascade_frontalface_alt.xml");

and the exception is in the last line.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The error your receiving is not solely down to cvextern this dll actually points to almost all of the other opencv dlls and all are required. With this error you will require the following dll in your project.

Note that the "220" is the version number this will change according to updates.

  • cudart64_32_16.dll
  • cufft64_32_16.dll
  • cvextern.dll
  • npp64_32_16.dll
  • opencv_calib3d220.dll
  • opencv_contrib220.dll
  • opencv_core220.dll
  • opencv_features2d220.dll
  • opencv_flann220.dll
  • opencv_gpu220.dll
  • opencv_highgui220.dll
  • opencv_imgproc220.dll
  • opencv_legacy220.dll
  • opencv_ml220.dll
  • opencv_objdetect220.dll
  • opencv_video220.dll

This error is covered along with others in my article on codeproject here.

Any other problems let me know,

Cheers,

Chris


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...