opencv 3.1 imshow not working when graphic driver is enabled pi3
Hi Friends, Once we enable the experimental graphical driver, opencv 3.1 imshow does not work, it does nothing and the very basic program hangs for infinite. My sample code is as pasted below:
#include "opencv2/opencv.hpp"
using namespace cv;
int main(int, char**)
{
VideoCapture cap(0); // open the default camera
if(!cap.isOpened()) // check if we succeeded
return -1;
Mat edges;
namedWindow("edges",1);
for(;;)
{
Mat frame;
cap >> frame; // get a new frame from camera
cvtColor(frame, edges, COLOR_BGR2GRAY);
GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
Canny(edges, edges, 0, 30, 3);
imshow("edges", edges);
if(waitKey(30) >= 0) break;
}
// the camera will be deinitialized automatically in VideoCapture destructor
return 0;
}
Weird because I have Ubuntu16.04 running here with latest driver and OpenCV runs just smooth with imshow possibilities. Could you give your CMAKE output and system configuration?
Thanks Steven, Basically I am using raspbian pixel OS on raspberry pi 3, I will try installing UBUNTU Mate on raspberry pi and will update you,...