Reputation: 573
I am trying to use K1 and K2 to correct radial distortion in camera calibration using functions from OpenCV. There are four kinds of combination of sign of K1 and K2:
A K1: positive K2: positive
B K1: positive K2: negative
C K1: negative K2: positive
D K1: negative K2: negative I encounter A, B and C. Is there special meanings for the sign of K1 and K2? There are two kinds of radial distortion: barrel distortion and pincushion distortion. Is the sign of K1 and K2 related to the kind of radial distortion? The more the absolute value of K1 and K2, the larger radial distortion?
Upvotes: 1
Views: 4410
Reputation: 51
According to the new version of OpenCV Docs, if (1 + k_1 r^2 + k_2 r^4 + k_3 r^6) is monotonically decreasing, you will get a barrel distortion, if it is monotonically increasing you will get a pincushion distortion. k1, k2 and k3 should be considered together to make a judgement.
I have a real camera which has a FOV of 130deg, and the distortion parameters calculated by OpenCV are [[-0.37008322, 0.20173808, 0.00591339, -0.00228824, -0.07194846]]. If you pick up k1 k2 and k3, and type this 1 + (-0.37008322)x^2 + (0.20173808)x^4 + (-0.07194846)x^6 into google, you will see a monotonically decreasing curve. This means my camera lens has a barrel distortion.
Generally, k1<0 gives a barrel distortion.
Upvotes: 5
Reputation: 36
Yes, from the docs at Camera Calibration and 3D Reconstruction
"barrel distortion (typically k_1 > 0 and pincushion distortion (typically k_1 < 0)."
And yes, the greater the value the greater the distortion.
Upvotes: 1