I am trying to remove lens distortion from the input image in the Deepstream app. In OpenCV, this can be done using the undistort function with a matrix and distortion coefficients, but I haven’t been able to find a standard implementation of this in Deepstream. My Jetson device comes with OpenCV installed, but without CUDA support, so installing cv::cuda::remap would be difficult and require a lot of storage space.
I have read that the gst-nvdewarper plugin can be used to undistort 360-degree videos, but I am not sure if it can be used for regular images. I have also tried to use gstcameraundistort from gst-plugins-bad, but I keep getting an error message saying “No such element or plugin ‘cameraundistort’”.
Can anyone provide guidance on how to remove lens distortion from the input image in Deepstream? I would appreciate any help or advice on this topic. Thank you!
I switched to Deepstream 6.2 and Orin NX. The implementation worked perfectly as described by yuweiw. Thanks for the hint. However, I have a performance problem. Without dewarper I get about 50fps. With the dewarper activated it is only 38fps. Does the plugin run on the GPU? It’s quite a bottelneck in the pipeline. Without dewarper enabled I have permanently 99% GPU utilization. With dewarper, GPU utilization jumps between 35% and 99%. I also see an increased CPU load.
• Hardware Platform (Jetson / GPU) Jetson Orin NX 16GB • DeepStream Version Deepstream-6.2 • JetPack Version (valid for Jetson only) Jetpack 5.1 • TensorRT Version 5.1 • OpenCV without CUDA