0
$\begingroup$

I'm trying to simulate camera (barrel/radial) distortion, and to reverse it. I.e. a process that would do:

Image --> Distorted Image --> ~ Image

In particular, given an image I, one can create a distorted image (with barrel distortion) with a function f(I,*params). Now the question is: what are a set of new parameters new_params such that f(f(I,*params),*new_params)~I?

At the moment, I am using Python and OpenCV's cv2.undistort which has as inputs the image I, a camera parameter matrix cam, and some distortion coefficients (k1 and k2 for barrel distortion).

I found an article "An Exact Formula for Calculating Inverse Radial Lens Distortions" by P. Drap, and J. Lefèvre which suggests that the parameters for the inverse transformation would be:

k1' = -k1
k2' = 3 * k1**2 - k2

I have tried implementing this, but with very low success. I am not sure whether I have missed something or if maybe one has to also find a new camera matrix new_cam to obtain the original undistorted image.

Any help is highly appreciated.

$\endgroup$
1
$\begingroup$

You should determine your problem more obviously.

|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.