VideoCapture not working OpenCv3.0.0/lubuntu 14.04

asked 2015-12-04 23:13:32 -0600

I am pretty sure my code is ok. I used OpenCv3.0.0.

'cap' opens but '' returns false.

The webcam (logitech sphere) works through guvcview after I used the ppa to get the latest version. The same webcam works with opencv 2.4.8 on a different machine, but essentially same lubuntu setup.

I tried going back to OpenCv 2.4.8 but it did not change anything. Still cannot read frames from camera.

Any clues would be appreciated....

#include "opencv2/highgui/highgui.hpp"

using namespace cv;

void MainWindow::on_pushButton_clicked()
      VideoCapture cap(0);
      if (cap.isOpened())  // if not success, exit program
        while(true) {
          Mat image;
          if ( {
            imshow("Image", image);
          int c = cvWaitKey(40);

edit retag flag offensive close merge delete