Opencv

Can’t use OpencV imshow to display high resolution pictures on NX?I have installed the SDK of KINECT DK, but when I use imshow to display color images, the program will be very slow. After turning off imshow, it will work normally, and the resolution is 1280*720

Is it taking up too much CPU?However, I used the official KINECT DK interface to open the image and it was smooth regardless of the resolution.

Hi,
In general we run a gstreamer command in cv2.VideoCapture(), as shown in this post:
V4l2src using OpenCV Gstreamer is not working in Jetson Xavier NX - #3 by DaneLLL

Please check steps in Jetson Nano FAQ
[Q: I have a USB camera. How can I launch it on Jetson Nano?]
and try to launch the camera in gst-launch-1.0 command. If it works in gst-launch-1.0 command, it should work fine by applying the command to cv2.VideoCapture().

I am not using a USB camera, so I do not use the V4L2 driver for capturing stream. My device is Kinect DK, and I also use RealSense D435 to switch to high resolution for testing, which has the same problem

Hi,
It is possible the SDK takes significant CPU usage. Please execute sudo tegrastats to check loading of CPU cores.

For general camera source such as USB cameras supporting YUV422 formats, we have samples to capture frame data into hardware DAM buffer. And can do processing through CUDA or use hardware engines for conversion/encoding. Your devices are unique and can only run on the SDK. The performance is possibly dominated by CPU capability.

Do you mean CUDA will be optimized for YUV422 formats devices only? I currently display images in RGB format, kINECT DK does support other data frame formats, such as YUY2 NV12 MPJG format will these formats also have CUDA optimization?

Hi,
YUY2 should be YUYV and is one type of YUV422 formats. You may try the samples:

/usr/src/jetson_multimedia_api/samples/12_camera_v4l2_cuda/
/usr/src/jetson_multimedia_api/samples/v4l2cuda

I still want to ask, are these optimizations you mentioned only for USB cameras? The KINECT DK I use has its own SDK driver, so I don’t know how to use it.

Hi,
The SDK driver for KINECT DK should be CPU based. To get maximum throughput, please try the 20W modes listed in developer guide
May try either 2 cores at 1.9GHz, or 6 cores at 1.4GHz. Check which mode works better with the SDK.