I’m new to JetPack dev kit - I’m trying to capture a video from TheImagingSource grabber and run actions on the captured video using OpenCV. TheImagingSource has it’s own software TisCamera that works along side the GStreamer to communicate with the camera device. So based on their example I am able to run the video and show it on my screen through OpenCV but the process is very heavy for the CPU, the output video lags where it should run smoothly on 30fps.
I wonder if there is anything I can do to accelerate the process on GPU instead?
Hi,
We have power modes listed in developer guide. Please execute sudo nvpmodel -m 2 and sudo jetson_clocks to get max performance.
If the performance is still not expected, please run sudo tegrastats to check system loading and find the bottleneck.
Thanks for your reply!
Unfortunately maxing out the settings did not change anything. I tried to change tcambin to v4lscr and I achieved 30FPS video but I need the video format to be BGRx instead of YUY2 to do post processing in OpenCV so I did conversion which drops the fps from 30 to ~15 gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1' ! videoconvert ! 'video/x-raw,format=BGRx' ! ximagesink sync=0
so I tried to use nvidconv to do the conversion but I get an error: Internal data stream error. gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1' ! nvvidconv ! 'video/x-raw,format=BGRx' ! ximagesink sync=0
Thank you, the GStreamer pipeline works but the video stream is slow again. the camera is capable of outputting 30FPS while I get laggy ~20FPS. So I thought maybe the Jetson Xavier is just unable to handle the 1920x1080 video stream even on max performance mode ? What Can I do to improve my situation ?
I have rebuilt OpenCV with cuda enabled but the performance did not improve, then I added WITH_QT=ON and now its working flawlessly! Stable 30FPS and smooth image! I don’t know if QT can have impact on the performance but I’m happy with my current results. Thanks for your feedbacks!
One more update to this - I just realized that OpenCV built on Qt uses QGraphicsView with OpenGL acceleration and that is the reason that the image window runs smoother than on GTK interface.