获取Emgu CV运动检测示例工作:无法加载DLL'opencv_legacy249' [英] Getting Emgu CV Motion Detection sample working: Unable to load DLL 'opencv_legacy249'

查看:166
本文介绍了获取Emgu CV运动检测示例工作:无法加载DLL'opencv_legacy249'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取然后它的作品。


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

  1. add references to the Emgu CV DLLs Emgu.CV, Emgu.CV.UI, and Emgu.Util to the project
  2. 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
  3. 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?

解决方案

Fixed.

I think I had a version clash. If I take the above steps with the motion detection example as 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.

这篇关于获取Emgu CV运动检测示例工作:无法加载DLL'opencv_legacy249'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆