when I am using opencv-3.0.0 function VideoCapture cap(0); It throws a error VIDEOIO ERROR: V4L: device /dev/video0: Unable to query number of channels
Here is my code :
include "opencv2/opencv.hpp"
using namespace cv: int main(int,char**) { VideoCapture cap(0); if(!cap.isOpened()) return -1; Mat edges; namedWindow("edges",1); for(;;) { Mat frame; cap >> frame; 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;
}
}
Can someone help me what might be the issue,btw I am using MIPI camera to Tinker Board