I am trying to make new source code displaying camera input stream, but I can not fix errors which relate to camera connection. I already confirmed camera connection using software vendor’s application.
This is type 1) error in my source program.
[b]1)
#include “/usr/include/opencv2/opencv.hpp”
using namespace cv;
int main(int argc, char** argv)
{
VideoCapture cap(0);
Mat frame;
if(!cap.isOpened())
{
std::cout<<“open Fail”<<std::endl;
return 0;
}
for(;;)
{
std::cout<<“good”<<std::endl;
cap>>frame;
if(frame.empty()) break;
imshow(“window”,frame);
if(waitKey(1)==27) break;
}
return 0;
}
- error:
Unable to stop the stream.: Device or resource busy
Unable to stop the stream.: Bad file descriptor
good
VIDIOC_STREAMON: Bad file descriptor
Unable to stop the stream.: Bad file descriptor[/b]
Type 1) error seems to be appeared after right connection. my source should work, but it’s not.
How can I set camera device input to test on TX1?