Optimizing opencv gstreamer with mipi and usb uvc cameras

Hi,
For the USB camera, you may check if you can run

VideoCapture cap("v4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=UYVY,framerate=30/1 ! videoconvert ! video/x-raw,format=BGR ! appsink");

OpenCV is CPU based frameworks and please execute sudo jetson_clocks to get max performance on Jetson Nano.

If OpenCV is not must-have in your implementation, you can consider to use gstreamer or jetson_multimedia_api, which use hardware DMA buffers to get optimal performance.