让Emgu CV运动检测示例正常工作:无法加载DLL'opencv_legacy249'

时间:2013-09-24 15:44:22

标签: dll emgucv

我正试图让Motion Detection Emgu CV example中提及的the answer to "Looking for a function for motion detection on emgucv"正常工作。

要使示例代码正常工作,我首先需要

  1. 将对Emgu CV DLL Emgu.CVEmgu.CV.UIEmgu.Util的引用添加到项目中
  2. 确保将相关的Open CV DLL(在the EMGU wiki上列出并在C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\bin\x86中找到)始终复制到项目的输出可执行目录中
  3. 将构建目标更改为x86
  4. 当执行到达Form1.cs

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

    它抛出异常Unable to load DLL 'opencv_legacy249': The specified module could not be found. (Exception from HRESULT: 0x8007007E)。查看执行目录,DLL 在那里

    Explorer screenshot showing required DLL's presence

    发生了什么事?我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

固定。

我认为我有版本冲突。如果我使用动画检测示例执行上述步骤,因为它与Emgu CV一起安装,即从C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\Emgu.CV.Example\MotionDetection而不是http://github.com/artemisvision/emgu_openCV/tree/master/Emgu.CV.Example/MotionDetection,那么它可以正常工作。