[英]C++ OpenCV 0xC0000005 error while reading from camera
如前所述,當我嘗試從相機獲取幀時,收到了一個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(DirectShow / VirtualDub / Avisynth的VobSub和TextSub過濾器)有關?
我正在使用OpenCV 2.4.5和VisulaStudio 2012。
我已經下載了VSFilter.dll並替換了Windows / system32 /中的原始文件,現在一切正常!
有機會,您最終陷入“ dll地獄”嗎?
喜歡:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.