I\'m using Visual Studio Express 2013 with OpenCV 2.4.7, following this tutorial.
I have spent hours searching the web for solutions, including all of t
Do this:
VideoCapture cap;
cap.set(CV_CAP_PROP_FRAME_WIDTH, 640);
cap.set(CV_CAP_PROP_FRAME_HEIGHT, 480);
int camOpen = cap.open(CV_CAP_ANY);
Or you can try changing this:
while (true) {
cap >> image;
imshow("window", image);
// delay 33ms
waitKey(33);
}
to
try
{
cap >> image;
imshow("window", image);
waitKey(33);
}
catch (Exception& e)
{
const char* err_msg = e.what();
std::cout << "exception caught: imshow:\n" << err_msg << std::endl;
}