One suspicious issue of Fisheye calibration at opencv4.0.0 pre

asked 2018-08-21 05:48:54 -0500

Hi all,

I am working on the camera calibration for a super-fisheye lenses (i.e., FOV above 180 degree). According to the reference below, I know the fisheye calibration algorithm implemented at currently opencv cannot handle the lens with FOV above 180 degree.

https://stackoverflow.com/questions/3...

Therefore, I searched the pre-version of opencv-4.0.0 and found this issue has been opened and resolved by

https://github.com/opencv/opencv/pull...

https://github.com/opencv/opencv/pull...

in the same time, you can find the corresponding document at

link text

The formulas presented at document are reasonable and correct. Next, I compare this document with its corresponds source code. However, I found one piece of code and documents are contradictory:

[document]

a=x/z and b=y/z ………….(1)

x’=(theta_d/r)a ………….(2)

y’=(theta_d/r)b ………….(3)

[code at modules/calib3d/src/fisheye.cpp]

Vec2d x(Y[0], Y[1]); ………….(4)

Vec2d xd1 = x * cdist; ………….(5)

“xd1” at code and “x’, y’” at document are used to represent the location of one incoming light ray which mapping on the camera’s normalize image plane (i.e., f = 1). In which, if the document and code are identical, following two check points should be satisfied at the same time:

(a) “cdist” at code and “theta_d/r” at document should be the same.

(b) “x” at code should be the same as “a, b” at document.

However, check point (b) cannot been satisfied. For the convenience of explanation, I unifying the naming of variables at these two equations as below

[document]

a=x/z and b=y/z ………….(1)

x’=(theta_d/r)a ………….(2)

y’=(theta_d/r)b ………….(3)

[code at modules/calib3d/src/fisheye.cpp]

a=x and b=y ………….(4)

x’=(theta_d/r)a

y’=(theta_d/r)b ………….(5)

Obviously, equation (1) and (4) are difference. Is any one help to recheck it? Is my understanding correct?

Thanks.

edit retag flag offensive close merge delete