-1073741811(0xc000000d) error opencv

0

I installed OpenCV version 2.4.3 using Visual Sudio 10 as the IDE (on windows 7 64-bit). The problem is that once I installed it and am running even a simple application like that of loading an image it is giving me an error

The program '[8120] pms1.exe: Native' has exited with code -1073741811 (0xc000000d)

I am getting the same error for any code that I am trying to run. I am not getting any build errors. Build is getting succeeded but when I run it it throws me this.

Note: a sample code which gave me the error

#include <opencv\cv.h>
#include <opencv\highgui.h>
using namespace cv;

int main()
{
  Mat image;

  VideoCapture cap;
  cap.open(0);

  namedWindow(“window”, 1);

  while(1) {
    cap>>image;

    imshow(“window”, image);
    waitKey(33);
  }

  return 0; 
}
c++
visual-studio-2010
opencv
error-handling
runtime-error
asked on Stack Overflow Apr 8, 2013 by Bhagirath N Sai • edited Apr 8, 2013 by Étienne

2 Answers

0

Make sure that your executable and the opencv dll files it calls are both 32-bit or 64-bit.

answered on Stack Overflow Apr 8, 2013 by Boyko Perfanov
0

Most probably the capture interface failed to open device 0, so cap>>image; is probably causing the error. You just don't know it because you forgot to check the success of open():

VideoCapture cap;
cap.open(0);
if (!cap.isOpened())
{
     // print error message and 
     // quit the application
}

Experiment to pass other values for open(), like -1 or 2.

answered on Stack Overflow Apr 9, 2013 by karlphillip

User contributions licensed under CC BY-SA 3.0