mercredi 16 avril 2014

OpenCV C++ 0xC0000005 erreur pendant la lecture d'appareil photo [Résolu] - Stack Overflow


As said I get a 0xC0000005 reading access violation error realted to VSFilter.dll when I try to get a frame from the camera. I've tried different sample code found online and in the OpenCV documentation but I still get the error. For example this is the code I'm using now:


#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;
}

And in the output there are this two errors (a first-chance exeption and an unhandled exeption, sorry for the italian):


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.

So the code is pretty simple and it shouldn't be the problem, I am wondering why the error is related to VSFilter.dll (VobSub & TextSub filter for DirectShow/VirtualDub/Avisynth)?


I'm using OpenCV 2.4.5 and VisulaStudio 2012.


All answers are apereciated! Thanks to everyone who will help




I've downloaded VSFilter.dll and replaced the original one in Windows/system32/, now everything work!




any chance, you ended up in "dll hell" ?


like:



  1. linking release code against debug dll's ( or the other way round )

  2. linking 32bit code against 64bit dll's ( or the other way round )

  3. linking vc9 code against vc10 dll's ( .. i hope, you get the pattern, now )



As said I get a 0xC0000005 reading access violation error realted to VSFilter.dll when I try to get a frame from the camera. I've tried different sample code found online and in the OpenCV documentation but I still get the error. For example this is the code I'm using now:


#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;
}

And in the output there are this two errors (a first-chance exeption and an unhandled exeption, sorry for the italian):


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.

So the code is pretty simple and it shouldn't be the problem, I am wondering why the error is related to VSFilter.dll (VobSub & TextSub filter for DirectShow/VirtualDub/Avisynth)?


I'm using OpenCV 2.4.5 and VisulaStudio 2012.


All answers are apereciated! Thanks to everyone who will help




I've downloaded VSFilter.dll and replaced the original one in Windows/system32/, now everything work!



any chance, you ended up in "dll hell" ?


like:



  1. linking release code against debug dll's ( or the other way round )

  2. linking 32bit code against 64bit dll's ( or the other way round )

  3. linking vc9 code against vc10 dll's ( .. i hope, you get the pattern, now )


0 commentaires:

Enregistrer un commentaire