Closed rsingh2083 closed 3 years ago
Dear @rsingh2083,
That's more an advanced subject. Many Jetson Nano applications use GStreamer to get camera images in OpenCV. With the use of GStreamer, you can define the proper size, frame rate and compression. I think that Google and NVIVIA forum are the place to find your solution in the first place. Let me know if you need further support.
Let me know if you need further support.
Sure sir, please help if you can. Been struggling to solve this. I even tried gstreamer but maybe Im getting some parameters wrong or not optimized. For instance I changed cv::VideoCapture line to use nvargus as follows :-
cv::VideoCapture cap('nvarguscamerasrc sensor_id=ID ! video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)NV12 ! nvvidconv flip-method=M ! video/x-raw, format=I420, appsink max-buffers=1 drop=true', CAP_GSTREAMER);
Please see Q-engineering and GitHub for Raspberry Pi 64-bit OpenCV examples.
Your problem is to find the right parameters in the pipeline. That's not easy, specially with the wide variety of cameras.
Best to start with a simple program and try to get an image on your screen with $ gst-launch-1.0 ......
.
This way, you don't have to compile the code every time. Start for instance with a testscreen.
Ok sir. Another thing which probably might help you figure out is : The fps over the video is showing 25, but the video is choppy as if its between 3 to 5 fps. How come the FPS from your code is showing 25+ if the video is very choppy, have you seen such issue before ?
I measure the time it takes to process the images. Not the whole procedure of grabbing a picture, transferring it to OpenCV, showing results etc. The FPS in this case reflects an ideal situation, without external dependencies. I've done this because some wear out SD-cards can be really slow.
Hi, I tested it on two cameras :-
On the first one which is 480p, the accuracy is low as the default exposure is low and video is coming dark. Hence its saying 'fake' most of the time. While on the second one which is 720p, accuracy is really good, video is well lit but the video is slow compared to first camera.
Any reasons as to why this is happening ? And how to solve it. Id definitely like to use second camera, but how to solve the slow video issue ? Is the video slow because the camera is 720p ?