使用EmguCV的System.AccessViolationException

时间:2015-08-29 12:25:58

标签: c# opencv exception emgucv access-violation

我想从连续帧的匹配中找出关键点集中的异常值。我在Windows 7 64位上使用EmguCV - cd /media/httpd-2.4.16/modules/proxy /usr/apache24/bin/apxs -c -i -a mod_proxy.c proxy_util.c /usr/apache24/bin/apxs -c -i -a mod_proxy_ajp.c ajp*.c /usr/apache24/bin/apxs -c -i -a mod_proxy_balancer.c mod_proxy_connect.c mod_proxy_http.c OpenCV的包装。

我尝试使用此功能

Visual Studio Express 2012

我得到一个例外,如下所示:有时这会在几秒钟后发生,有时几乎是立即发生。
另一个奇怪的事情是,即使函数在Features2DToolbox.GetHomographyMatrixFromMatchedFeatures, 中,我也无法捕获异常

以下是我的代码的一部分:

try-catch block

我得到的例外:

  

m_foundedPreviousSkyKeyPoints = new VectorOfKeyPoint(m_foundedCurrentSkyKeyPoints.ToArray()); m_matcherSky.Add(m_descriptorsSky); m_detector.DetectAndCompute(m_currentFrame, m_maskForSky, m_foundedCurrentSkyKeyPoints, m_descriptorsSky, false); m_maskMatchesSky = new Mat(m_descriptorsSky.Rows, 1, DepthType.Cv8U,1); m_matcherSky.KnnMatch(m_descriptorsSky, m_matchesSky, neighboursNumber, null); try { Features2DToolbox.GetHomographyMatrixFromMatchedFeatures( m_foundedPreviousSkyKeyPoints, m_foundedCurrentSkyKeyPoints, m_matchesSky, m_maskMatchesSky, 10.0d); } catch (System.AccessViolationException e) //does not catch exception { Console.WriteLine(e.Message); }

中发生了'System.AccessViolationException'类型的未处理异常      

附加信息:尝试读取或写入受保护的内存。这通常表明其他内存已损坏。

我不知道是什么原因,感谢任何帮助

0 个答案:

没有答案