Hello,
OpenCV has been working very well for months until 3 days ago. Suddenly, I cannot receive any video feed from my camera's feed. Since re-compiling OpenCV my IDE flags My camera's work fine in other applications (Skype, default camera App).
So far I have: Attempted different camera's - same result Recompiled Opencv 3.2 in CMake, believing a file may have been corrupt Repaired Visual Studio
Environment specs: Opencv 3.2 Windows 10 : Build 15063.250 Visual Studio 2013
Below is a snippet of my code, all I receive is a grey screen.
cv::VideoCapture cap(0); //Behaves the same when 1 - external cam
if (!cap.isOpened()) // Always succeeds
{
std::cout << "Cannot open the video cam" << std::endl;
return -1;
}
cv::namedWindow("MyVideo", CV_WINDOW_AUTOSIZE);
while (1)
{
cv::Mat frame;
bool bSuccess = cap.read(frame); // read a new frame from video
if (bSuccess == false) //Always true
{
std::cout << "Cannot read a frame from video stream" << std::endl;
break;
}
cv::imshow("MyVideo", frame); //Just displays a light grey frame
cv::waitKey(20); -Wait a few - Common mistake for similar issues
}
return 0;
The returned frame DOES have data in the Mat object.
Could anyone offer any insight as to why i'm experiencing my issues?