title: How to apply distortion on an image using OpenCV or any other library?
body: <p>I am performing calibration as showed <a href="https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_calib3d/py_calibration/py_calibration.html" rel="nofollow noreferrer">here</a>, but with cv.CALIB_RATIONAL_MODEL.</p>
  <p>I am using around 40 images and my average re-projection error (calculated by cv2.calibrateCamera) is always less than 0.5.</p>
  <p>Now, I want to be able to take any other image and apply to it, the distortion that I got from the calibration.</p>
  <p>I know I can calculate and re-distort calibration images by using corners I saved during calibration, but I want to apply distortion on a completely different image using only intrinsic and/or extrinsic parameters that I can save and use.</p>
  <p>Is it possible?</p>
  <p>I tried passing <code>np.negative(distortion)</code> to <code>cv.undistort()</code> hoping it would undistort with negative values so it will actually distort, but it is not working and giving me totally messed up results.</p>
  <p>I tried translating answers on other (<a href="https://stackoverflow.com/questions/58127381/opencv-how-to-apply-camera-distortion-to-an-image">one</a>, <a href="https://answers.opencv.org/question/148670/re-distorting-a-set-of-points-after-camera-calibration/" rel="nofollow noreferrer">two</a>, <a href="https://stackoverflow.com/questions/34612337/cant-distort-back-image-in-opencv-c">three</a>) threads from c++ to Python, and also creating my own function by studying the theory behind distortion, but it is not working.</p>
  <p>Are there any other libraries or theories I can leverage to solve this issue?</p>