0

I realize that this has been posted before, but I haven't been able to glean any info from the previous posts (Most of them are in previous versions where the solution was a bugfix).

I just downgraded to 2.4.9 from 3.0.0 when someone told me I had pulled from the wrong repo. Before this I had been having issues with constants when compiling the ARUco library thanks to changes made from 2.4.9 to 3.0.0, so the change apparently worked as I can now compile. However, my program which had been working before now fails to open the VideoCapture object. I know this because the assertion assert(webCamL.isOpened()) in the code below fails, and frames returned when the assertion is removed are empty.

webcamL = cv::VideoCapture(0);
assert(webcamL.isOpened());
Mat tmp;

webcamL.read(tmp);

int width       = webcamL.get(CV_CAP_PROP_FRAME_WIDTH);
int height      = webcamL.get(CV_CAP_PROP_FRAME_HEIGHT);

cout << width << " " << height << endl << tmp.size().width << " " << tmp.size().height << endl;

I'm honestly at a loss here. Is 2.4.9 broken? It's such a basic procedure that I can't really think of any way to debug. The camera is definitely present in /dev/video0 and it worked yesterday, so I'm not sure what I'm supposed to do.

EDIT: Tried recompiling OpenCV, no success there.

SwarthyMantooth
  • 1,541
  • 1
  • 13
  • 26

0 Answers0