demachi
demachi

Reputation: 33

Lens distortion model vs correction model

The lens model in OpenCV is a sort of distortion model which distorts an ideal position to the corresponding real (distorted) position:

where r^2 = x_distorted^2 + y_distorted^2 in the normalized image coordinate (the tangential distortion is omitted for simplicity). This is also found in Z. Zhang: "A Flexible New Technique for Camera Calibration," TPAMI 2000, and also in "Camera Calibration Toolbox for Matlab" by Bouguet.

On the other hand, Bradski and Kaehler: "Learning OpenCV" introduces in p.376 the lens model as a correction model which corrects a distorted position to the ideal position:

where r'^2 = x_corrected^2 + y_corrected^2 in the normalized image coordinate. Hartley and Zisserman: "Multiple View Geometry in Computer Vision" also describes this model.

I understand the both correction and distortion models have advantages and disadvantages in practice. For example, the former makes correction of detected feature point locations easy, while the latter makes the undistortion of the entire image straightforward.

My question is, why they share the same polynomial expression, while they are supposed to be the inverse of each other? I could find this document evaluating the inversibility, but its theoretical background is not clear to me.

Thank you for your help.

Upvotes: 3

Views: 3591

Answers (2)

Gustavo
Gustavo

Reputation: 11

According to taylor expansion every formula in world can be written as c0 + c1*x + c2*x^2 + c3*x^3 + c4*x^4... The goal is just discover the constants. In our particular case the expression must be symmetric in x and -x (even function) so the constants in x, x^3, x^5, x^7 are equal to zero.

Upvotes: 1

Thomas
Thomas

Reputation: 181745

I think the short answer is: they are just different models, so they're not supposed to be each other's inverse. Like you already wrote, each has its own advantages and disadvantages.

As to inversibility, this depends on the order of the polynomial. A 2nd-order (quadratic) polynomial is easily inverted. A 4th-order requires some more work, but can still be analytically inverted. But as soon as you add a 6th-order term, you'll probably have to resort to numeric methods to find the inverse, because a 5th-order or higher polynomial is not analytically invertible in the general case.

Upvotes: 2

Related Questions