I am trying to code an openCV program that opens a new widow that displays video from the webcam (laptop), and recieve the error Unhandled exception at 0x7530C41F in cv.exe: Microsoft C++ exception: cv::Exception at memory location 0x001FF5D0.
i have double checked all of the included dll's as well as the system path without any positive results.
here is my code:
#include <opencv\cv.h>
#include <opencv\highgui.h>
using namespace cv;
int main()
{
Mat image;
VideoCapture cap;
cap.open(0);
namedWindow("window", CV_WINDOW_AUTOSIZE);
while (1)
{
cap >> image;
imshow("window", image);
waitKey(33);
}
return 0;
}
cap.openfails, and thencap >> imagecrashes. you can set up an exception handler and inspect the exception message. but easiest here is probably just to single-step in the debugger.dell webcam centraland it showed a single frame from the webcam, never more than one,