I am looking for a way to create (barrel) distortion using OpenCV in C ++, based on real camera data that are generated by calibrating the camera. So my goal is to simulate the actual distortion of the lens with opencv. So I calibrated the camera using OpenCV. I used only the first distortion parameter k1: x '= x * k1 * r² At this stage I received a calibration file with k1 = 0.129, the external and internal matrix of the camera.
OpenCV provides an image calibration method. And I would like to "invert" this method so that the following is possible for testing: Original image → undistort () → undistorted image → "distort ()" → original image
Is it possible to deny the factor k1 or is it necessary to develop a new formula?
Thanks.
source share