AnsweredAssumed Answered

ERROR: v4l2 capture: slave not found!

Question asked by song zhiyuan on Jan 16, 2020
Latest reply on Jan 17, 2020 by igorpadykov

When I run the executable on the development board.

[ 1959.306627] ERROR: v4l2 capture: slave not found!
VIDEOIO ERROR: libv4l unable to ioctl S_FMT
VIDEOIO ERROR: libv4l unable to ioctl VIDIOCSPICT

 

#include <opencv2/ opencv.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui. hpp>
#include <opencv2/videoio. hpp>
#include <iostream>
using nanespace CV;
using namespace std;
int main()
{
cout<<"Built with opencv"<<CV_ VERSION<<endl;
VideoCapture capture(0);
if( !capture. isopened())
cout<<"open camera failed."<<endl;
return - 1;
}
Mat frame;
while( 1)
capture>>frame ;
if(frame . empty())
break;
imshow( "video" , frame);
if(waitKey(20)>0)
break;
}
return 0;

Outcomes