Use VPI for distortion correction with pre-calculated correction matrix


I want to replace my OpenCV code and use VPI for distortion correction.
I have pre-calculated matrix for the correction, using OpenCV remap:

cv::Mat src = /* read image /;
cv::Mat dst(src.size(), src.type());
cv::Mat correction_x = /
image x correction /;
cv::Mat correction_y = /
image y correction */;

remap(src, dst, correction_x, correction_y, INTER_LINEAR, BORDER_CONSTANT, Scalar(0, 0, 0));

I want to use VPI Lens Distortion Correction or vpi remap examples but I don’t find a way to use my pre-calculated matrix without initializing the VPIWarpMap with a for loop.



1 Like


This forum talks more about TensorRT related updates and issues. We recommend you please reach out to the VPI related platform for better help.

Thank you.

1 Like