Getting a trial of Emgu CV Motion Detection: Unable to load DLL 'opencv_legacy249'

I am trying to get the Emgu CV motion detection example mentioned in the answer to β€œSearch for a function to detect motion on emgucv” .

To get a working example code, I first needed

  • add links to Emgu CV Emgu.CV , Emgu.CV.UI and Emgu.Util in the project
  • make sure that the corresponding open DLLs (listed in the EMGU wiki and found in C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\bin\x86 ) are always copied to the output of the project executable
  • change build target to x86

When execution moves to a line in Form1.cs

 _forgroundDetector = new BGStatModel<Bgr>(image, Emgu.CV.CvEnum.BG_STAT_TYPE.FGD_STAT_MODEL); 

it throws an Unable to load DLL 'opencv_legacy249': The specified module could not be found. (Exception from HRESULT: 0x8007007E) exception Unable to load DLL 'opencv_legacy249': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Unable to load DLL 'opencv_legacy249': The specified module could not be found. (Exception from HRESULT: 0x8007007E) . Looking at the runtime directory, there is a DLL:

Explorer screenshot showing required DLL's presence

What's happening? How to fix it?

0
dll emgucv
source share
1 answer

Fixed.

I think I had a version error. If I take the above steps with an example of motion detection, since it installs with Emgu CV, i.e. from C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\Emgu.CV.Example\MotionDetection instead of http: // github. com / artemisvision / emgu_openCV / tree / master / Emgu.CV.Example / MotionDetection , then it works.

0
source share

All Articles