OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Thu, 20 Oct 2016 17:20:03 -0500Radial distortion parameter k2=-300, is it possible?http://answers.opencv.org/question/59473/radial-distortion-parameter-k2-300-is-it-possible/ I'm doing some calibration for micro photogrammetry close range with a reflex (macro 60mm + extension 36mm maximum zoom) but I obtain always a value of K2 very big, from -100 to -500, even if not any particular distortion is evident in the photos. Any idea of the reason?
In the opencv guide there's the explanation of the formulas behind the process of calibration where radial distortion coefficients are multiplied for "r", the distance between the point and the center, is that distance in pixels or mm?Fri, 10 Apr 2015 05:26:54 -0500http://answers.opencv.org/question/59473/radial-distortion-parameter-k2-300-is-it-possible/Answer by Milkboy for <p>I'm doing some calibration for micro photogrammetry close range with a reflex (macro 60mm + extension 36mm maximum zoom) but I obtain always a value of K2 very big, from -100 to -500, even if not any particular distortion is evident in the photos. Any idea of the reason?
In the opencv guide there's the explanation of the formulas behind the process of calibration where radial distortion coefficients are multiplied for "r", the distance between the point and the center, is that distance in pixels or mm?</p>
http://answers.opencv.org/question/59473/radial-distortion-parameter-k2-300-is-it-possible/?answer=105384#post-id-105384> In the opencv guide there's the explanation of the formulas behind the process of calibration where radial distortion coefficients are multiplied for "r", the distance between the point and the center, is that distance in pixels or mm?
I just had this problem today and asked myself the same question. If you look at the math you find that the radial distortion is (just showing x component) where r^2 = x^2 + y^2 is:
x' = x( 1 + k1 r^2 + k2 r^4 + k3 r^6)
I originally thought that x was in pixels and therefore if x were merely 10 pixels from center then the r^6 term would dominate no matter what the other terms.
But looking through the math more closely ,x = X/Z and is not in pixels. It is dimensionless. In fact I can imagine that with most cameras with a FOV less than 90 degrees, that Z will be greater than X so X/Z will be less than one and y=Y/Z will be less than one. Now when you use those fractions as inputs to the distortion formulas you get much more reasonable results. The higher order terms are now *less* dominant than more dominant and it makes more sense.
In other words, r^2 = (X/Z)^2 + (Y/Z)^2 where X, Y, and Z are the 3D camera space coordinates.
This may not help your overall problem with your cameras and this question is very old so you've probably moved on but I hoped to answer your specific question.
Thu, 20 Oct 2016 17:20:03 -0500http://answers.opencv.org/question/59473/radial-distortion-parameter-k2-300-is-it-possible/?answer=105384#post-id-105384