2016-09-17 110 views
0

我正在嘗試使用EMGUCV執行簡單的人臉檢測。但是,當我嘗試初始化它拋出異常EMGU CV異常

型「System.EntryPointNotFoundException」未處理的異常發生在Emgu.CV.dll的CascadeClassifier對象

其他信息:無法找到名爲切入點「CvCascadeClassifierCreate '在DLL'cvextern'中。

下面是我的源代碼

` 私人CascadeClassifier _cascadeClassifier;

 _cascadeClassifier = new CascadeClassifier(Application.StartupPath + "/haarcascade_frontalface_default.xml"); 
     using (var imageFrame = _capture.QueryFrame().ToImage<Bgr, Byte>()) 
     { 
      if (imageFrame != null) 
      { 
       var grayframe = imageFrame.Convert<Gray, byte>(); 
       var faces = _cascadeClassifier.DetectMultiScale(grayframe, 1.1, 10, Size.Empty); //the actual face detection happens here 
       foreach (var face in faces) 
       { 
        imageFrame.Draw(face, new Bgr(Color.BurlyWood), 3); //the detected face(s) is highlighted here using a box that is drawn around it/them 

       } 
      } 
      imgCamUser.Image = imageFrame; 
     } 

`

請我怎樣才能解決這個問題?

回答

0

我使用的是DLL EMGU.CV和EMGU.CV.Util。它們來自以前版本的EMGU cv。在3.1版本中,這些DLL被嵌入到EMGU.CV.World中。我通過刪除對舊DLL的引用並用新的替換它來解決此問題。

有關更多詳細信息,請查閱版本3.1的發行說明。