Jetson Nano - Remove distortion from LI-IMX219-MIPI-FF-NANO camera

I have a that I’ve been working with for the past couple of months already. I can access it via Python and run what I have to run with it. However, there’s some heavy barrel distortion at 720p, which makes object detection hit or miss at the edges.

Is there anyway to post process the frames I get to reduce/eliminate distortion with this big field of vision, so that when I feed them to the object detection, the frames aren’t distorted anymore?

You may need a opencv post process.