Hi,
I’m trying to use the VPI library for camera undistortion on my AGX Xavier. My input frames are from the MMAPI in the form of NvBuffers in the ABGR32 format. My output format is the same.
I have created a Remap Payload for Polynomial Lens Distortion model by following the tutorial. I know the camera parameters are right.
Steps:
1) NvBuffer
2) NvEGLImageFromFd
3) cuGraphicsEGLRegisterImage
4) cuGraphicsResourceGetMappedEGLFrame
5) cuCtxSynchronize
6) vpiImageCreateCUDAMemWrapper binding for input and output
7) Create temp VPIImages for remap input and output
8) vpiSubmitConvertImageFormat (BGRA8 -> NV12_ER)
9) vpiSubmitRemap (CUDA backend)
10) vpiSubmitConvertImageFormat (NV12_ER -> BGRA8)
11) vpiStreamSync
However, when I render the final NvBuffer, I get a completely green frame. If I remove the remap (Step 9), I see the camera output as expected. The issue seems to be with the remap operation.
I would appreciate any assistance in getting the VPI remap to work.