I'm trying to get the Motion Detection Emgu CV example mentioned in the answer to "Looking for a function for motion detection on emgucv" working.
To get the example code working I first needed to
- add references to the Emgu CV DLLs
Emgu.CV
,Emgu.CV.UI
, andEmgu.Util
to the project - make sure that the relevant Open CV DLLs (listed on the EMGU wiki and found in
C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\bin\x86
) are copied always to the output executable directory of the project - change the build target to x86
When execution gets to the line in Form1.cs
_forgroundDetector = new BGStatModel<Bgr>(image, Emgu.CV.CvEnum.BG_STAT_TYPE.FGD_STAT_MODEL);
it throws the exception Unable to load DLL 'opencv_legacy249': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
. Looking at the execution directory the DLL is there:
What's going on? How do I fix this?