Dewarp Deepstream 6

Hello,

I am using deepstream 6 to do multiple car tracking detection in a parking lot. I would like to know how to add dewarp to the pipeline and how to generate the calibration matrix. Can you help me?

You can refer this guide link:
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvdewarper.html
And the demo code from deepstream

/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-dewarper-test

Thanks,

About the config_dewarper_perspective.txt file, how do I find the distortion values?

To get the correct distortion coefficients you need to use the following calibration method of opencv :
https://docs.opencv.org/2.4.13.7/doc/tutorials/calib3d/camera_calibration/camera_calibration.html
This will give you focal length(fx, fy), principal point(cx, cy) and 5 distortion coefficients : (k1, k2, p1, p2, k3)
You can set them in the dewarper plugin config file as follows :

focal-length=fx/fy/avg(fx,fy)
src-x0=cx
src-y0=cy
distortion=k1;k2;k3;p1;p2 (please note the reordering here)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.