A formula of official documentation and source code are different

Hello,
I have a question about the formula in the official documentation.
You can find the formula in ink below:
https://docs.opencv.org/4.5.4/db/d58/group__calib3d__fisheye.html

This is the formula about distorted point coordinates conversion into pixel coordinates:

\begin{align*} x' &= (\theta_d / r) a ~~~ & ~~~ (1) \\ y' &= (\theta_d / r) b ~~~ & ~~~ (2) \\ u &= f_x (x' + \alpha y') + c_x ~~~ & ~~~ (3) \\ v &= f_y y' + c_y ~~~ & ~~~ (4) \\ \end{align*}

I found the source code in link below:

And this how the source code programed:

            double scale = (r == 0) ? 1.0 : theta_d / r;
            u = f[0]*x*scale + c[0];
            v = f[1]*y*scale + c[1];

My question is:
1.what is α in formula(3)?
2.Why the calculation of formula(3) is different from source code?

Thank you!

several places in the module’s documentation mention “alpha” and describe it as a “skew coefficient”. I suspect that you can set it to zero. that’s the best I can find.

1 Like