如前所述,当我试图从相机中获取一个帧时,我得到了一个0xC0000005读取访问冲突错误,这个错误发生在VSFilter.dll上。我尝试过在网上和OpenCV文档中找到不同的示例代码,但仍然会遇到错误。例如,这是我现在使用的代码:
#include <opencv/cv.h>
#include <opencv/highgui.h>
using namespace cv;
int main(int, char**)
{
VideoCapture cap(0);
if(!cap.isOpened()) return -1;
Mat frame;
namedWindow("Camera",1);
while(1)
{
cap >> frame;
imshow("Camera", frame);
if(waitKey(30) >= 0) break;
}
return 0;
}
在输出中有以下两个错误(第一次机会外泄和未处理的出丑,对意大利语表示歉意):
Eccezione first-chance in 0x000007FEEB115791 (VSFilter.dll) in OpenCV.exe: 0xC0000005: violazione di accesso durante la scrittura del percorso 0x000000000468E000.
Eccezione non gestita in 0x000007FEEB115791 (VSFilter.dll) in OpenCV.exe: 0xC0000005: violazione di accesso durante la scrittura del percorso 0x000000000468E000.
所以代码非常简单,不应该是问题,我想知道为什么错误与VSFilter.dll (VobSub & TextSub filter for DirectShow/VirtualDub/Avisynth)有关?
我使用的是OpenCV 2.4.5和VisulaStudio 2012。
解出
我下载了VSFilter.dll并替换了Windows/system32 32/中的原始版本,现在一切都正常了!
发布于 2013-05-08 21:06:31
有没有可能,你最后被关进了"dll地狱“?
像这样:
https://stackoverflow.com/questions/16449971
复制相似问题