Using nvdewarper element for homography

Hi,

I’m trying to use the nvdewarper element to apply an homography transformation matrix that I obtained by executing the OpenCV function cv2.findHomography(…). The result from that function is a 3x3 matrix. I’ve successfully used the nvdewarper for image undistortion in the past, but I don’t know how to structure the nvdewarper config file in order to apply an homography transformation. Is there any example for this use case?

Thank you in advance.

Hi,

Is VPI an option for you?
It can adopt the OpenCV transform matrix directly:
https://docs.nvidia.com/vpi/sample_perspwarp.html

Thanks.

Hi AastaLLL,

thanks for the response, I am afraid we can’t use VPI as we currently deploy only a gstreamer pipeline, so that would mean we have to write a new element that utilizes that code. Isn’t there any form of information of what this element can do? Can it actually perform such a transformation ? Thanks in advance.

Hi,

For nvdewarper component, you can find more info in the below GitHub.
There are also some samples (configure) that you can refer to.

Thanks.