How to replace remap function in opencv by remap in vpi

I implemented an app on cpu whose main payload is opencv remap operation,now I need to move the app to Jetson AGX Orin and do remaps on gpu.

I planned to do it by vpi because there just are interfaces like vpi.remap(),but I found it was not that easy as I thought.There is my oringinal code:

    result = cv2.remap(
        fisheye_img,
        map_x,
        map_y,
        interpolation=cv2.INTER_LINEAR,
        borderMode=cv2.BORDER_CONSTANT,
        borderValue=0,
    )

as you can see map_x and map_y is pre-caculated,now I want to remap the img by map_x and map_y on gpu to gain speed,what should I do?

Hi,

You can find a simple code below:

Thanks.