hello everyone. i have updated my opencv to opencv 3.1 and used the following instructions to process the onboard camera. the problem is that if i do simplest process on image in full hd resolution, the result isnt realtime any more.what is the problem.(1-gstreamer parameters are not set correctly,2-opencv is slow for displaying, …) thanks.
We did the test with OpenCV 3.1.0 with onboard camera, we can see it work successfully.
Here are some tips to open the default camera
- Please try openCV version be 3.0.0 or higher. we’re using 3.1.0
- GST 1.0 and related plugins must be installed.
- test program must be linked against built openCV 3.1.0 libs
- test code looks like:
VideoCapture cap(“nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)I420, framerate=(fraction)24/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink”); //open the default camera
if(!cap.isOpened()) { // check if we succeeded
cerr << "Fail to open camera " << endl;
return -1;
}
for(;;)
{
Mat frame;
cap >> frame; // get a new frame from camera
imshow(“original”, frame);
waitKey(1);
}
// the camera will be deinitialized automatically in VideoCapture destructor
cap.release();