NvMediaLDCProcess fails in NVMEDIA_LDC_MODE_GEOTRANS_TNR3 mode

Hi,

I’m trying to use the NvMedia Lens Distortion Correction (LDC) API in
NVMEDIA_LDC_MODE_GEOTRANS_TNR3 mode. But I cannot make it work.
NvMediaLDCProcess fails when the source resolution is different from the destination resolution.

E.G.

nvmimg_ldc -v 3 -cf ./ldc_GeoTrans_TNR3.conf

Output:

NVM_LDC     :  954,  Version 2.1
nvmedia: Library version: 2.1
nvmedia: Header version:  2.1
nvmedia: NvMediaLDCCreate done. LDC Handle:0x4208c0
nvmedia: NvMediaLDCMappingGen(0x4208c0) done.
nvmedia: Current inptut surface 0x44db70 created
nvmedia: Previous output surface 0x460f20 created
nvmedia: Output surface 0x4616d0 created
nvmedia: Processing frame:0
nvmedia: ReadImage(frame:0 from ./front_2896x1876.yuv in to curr:0x44db70) done
nvmedia: NvMediaLDCUpdateTNR3Params(0) done
NVM_LDC     : 1806, ERR: TVMRLDCProcess failed:1
nvmedia: ERROR: NvMediaLDCProcess failed! status = 1
nvmedia: Processed 0 frames, cleaning up
nvmedia: NvMediaLDCDestroy(pLDC:0x4208c0) done
nvmedia: Destroying input surface
nvmedia: Destroying output surface
nvmedia: Destroying previous surface
nvmedia: Destroying device

This works correctly when
NVMEDIA_LDC_MODE_GEOTRANS mode is used.(ldcMode set to 0 in ldc_GeoTrans_TNR3.conf)

Can you help set up API correctly to use NVMEDIA_LDC_MODE_GEOTRANS_TNR3 when the source image size is different then destination? Are there any undocumented API limitations?

front_2896x1876.yuv (23.3 MB)
ldc_GeoTrans_TNR3.conf (13.1 KB)

Software Version
DRIVE OS Linux 5.2.6

Target Operating System
Linux

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)

Dear @bartosz.tomczyk,
The error code denotes bad input parameters. Is the sample working with same input/output size? Could you share the syslog when it fails.

There are no errors in syslog when the issue occurs.

Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Starting D-Bus User Message Bus Socket.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Listening on GnuPG cryptographic agent and passphrase cache.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Reached target Paths.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Listening on GnuPG network certificate management daemon.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Reached target Timers.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Listening on D-Bus User Message Bus Socket.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Reached target Sockets.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Reached target Basic System.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Reached target Default.
Aug 31 08:44:03 ve-ares-0001b systemd[2597]: Startup finished in 84ms.
Aug 31 08:44:03 ve-ares-0001b systemd[1]: Started User Manager for UID 1000.
Aug 31 08:44:08 ve-ares-0001b systemd[1]: Started Session 21 of user nvidia.

Yes the sample works when input and output size are the same. The sample also works when input and output size differs and the mode is set to NVMEDIA_LDC_MODE_GEOTRANS.

The issue is only with NVMEDIA_LDC_MODE_GEOTRANS_TNR3 mode, which should do both GEOTRANS and TNR at the same time.

The issue can be reproduced using reference nvmimg_ldc app and files attached to first post.

Dear @bartosz.tomczyk,
It looks we should use same input/output size for GEOTRANS+TNR3 mode.

Is this HW limitation or API limitation? Can it be fixed in upcoming releases?

Dear @bartosz.tomczyk,
There are no releases targetted for DRIVE AGX Xavier platform. DRIVE OS 5.2.6 is the last release.

We will switch to DRIVE AGX Orin near future. Is this feature working in DRIVE OS 6.x.x ?

Dear @bartosz.tomczyk,
Yes. It works on DRIVE AGX Orin.

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