$$ \left.\begin{array}{l} \displaystyle \text{tan}\left(\frac {\text{FOV}} 2\right) = \frac r f_c \\ \displaystyle (2r)^2 = w^2 + h^2 \end{array} \right\} \Rightarrow \displaystyle f_c = \frac {\displaystyle {\frac {\sqrt{w^2+h^2}} 2}} {\displaystyle {\text{tan}\left(\frac {\text{FOV}} 2\right)}} \Rightarrow \displaystyle f_c = \frac {\sqrt{w^2+h^2}}{\displaystyle 2\cdot{\text{tan}\left(\frac {\text{FOV}} 2\right)}} $$ | (1) |
$$ \frac{\displaystyle a}{\displaystyle \text{sin}(A)} = \frac{\displaystyle b}{\displaystyle \text{sin}(B)} = \frac{\displaystyle c}{\displaystyle \text{sin}(C)} = 2R $$ | (2) |
$$ \frac{\displaystyle d}{\displaystyle \text{sin}(k)} = \frac{\displaystyle p}{\displaystyle \text{sin}\left(\frac{\pi}{2}-\phi+d\phi\right)} = \frac{\displaystyle t}{\displaystyle \text{sin}\left(\frac{\pi}{2}-\theta \right)} = 2R $$ | (3) |
$$ \begin{array}{l} k+\left(\frac{\displaystyle \pi}{\displaystyle 2}-\phi+d\phi\right)+\left(\frac{\displaystyle \pi}{\displaystyle 2}-\theta\right) = \pi \Rightarrow \\ k = \pi-\left(\frac{\displaystyle \pi}{\displaystyle 2}-\phi+d\phi\right)-\left(\frac{\displaystyle \pi}{\displaystyle 2}-\theta\right)=\phi+\theta-d\phi \end{array} $$ | (4) |
$$ \frac{\displaystyle d}{\displaystyle \text{sin}k} = \frac{\displaystyle t}{\text{sin}\left(\frac{\displaystyle \pi}{\displaystyle 2}-\theta\right)} \Rightarrow t = d \frac{\text{sin}\left(\frac{\displaystyle \pi}{\displaystyle 2}-\theta\right)}{\displaystyle \text{sin}(\phi+\theta-d\phi)} $$ | (5) |
$$ \begin{array}{l} \text{tan}(d\phi) = \frac{\displaystyle s}{\displaystyle f_c} \Rightarrow d\phi = \text{arctan}\left(\frac{\displaystyle s}{\displaystyle f_c}\right) \Rightarrow \\ d\phi = \text{arctan}\left(\frac{\displaystyle \sqrt{u^2+v^2}}{\displaystyle f_c}\right) \\ \text{or} \\ d\phi = \text{arctan}\left(2\frac{\displaystyle \sqrt{u^2+v^2}}{\displaystyle \sqrt{w^2+h^2}}\text{tan}\left(\frac{\displaystyle \text{FOV}}{\displaystyle 2}\right)\right) \end{array} $$ | (6) |
$$ d\phi_u = \text{arctan}\left( \frac{\displaystyle u}{\displaystyle r} \text{tan} \left( \frac{\displaystyle \text{FOV}}{\displaystyle 2} \right) \right) \\ d\phi_v = \text{arctan}\left( \frac{\displaystyle v}{\displaystyle r} \text{tan} \left( \frac{\displaystyle \text{FOV}}{\displaystyle 2} \right) \right) $$ | (7) |
Having in mind that | |
$$ f_c = \frac{\displaystyle r}{\displaystyle \text{tan}\left(\frac{\displaystyle \text{FOV}}{\displaystyle 2}\right)} $$ | (8) |
We get | |
$$ d\phi_u = \text{arctan}\left( \frac{\displaystyle u}{\displaystyle f_c} \right) \\ d\phi_v = \text{arctan}\left( \frac{\displaystyle v}{\displaystyle f_c} \right) $$ | (9) |
Thus since angles in the object side are equal to the angles in the image side | |
$$ d\phi_X = d\phi_u \Rightarrow \text{arctan}\left(\frac{\displaystyle X}{\displaystyle Z}\right) = \text{arctan}\left( \frac{\displaystyle u}{\displaystyle f_c} \right) \xRightarrow[\text{of generality}]{\text{without loss}} X = Z \frac{\displaystyle u}{\displaystyle f_c} \\ d\phi_Y = d\phi_v \Rightarrow \text{arctan}\left(\frac{\displaystyle Y}{\displaystyle Z}\right) = \text{arctan}\left( \frac{\displaystyle v}{\displaystyle f_c} \right) \xRightarrow[\text{of generality}]{\text{without loss}} Y = Z \frac{\displaystyle v}{\displaystyle f_c} $$ | (10) |
From the geometry of the problem and equation (5) we have | |
$$ Z = \text{cos}(d\phi) \cdot t = d \frac{\displaystyle \text{cos}(d\phi)\, \text{sin}\left(\frac{\displaystyle \pi}{\displaystyle 2}-\theta\right)}{\displaystyle \text{sin}(\phi+\theta-d\phi)} \Rightarrow Z = d \frac{\displaystyle \text{cos}(d\phi)\, \text{cos}(\theta)}{\displaystyle \text{sin}(\phi+\theta-d\phi)} $$ | (11) |
Overall, we may use equation (6) to get the \(d\phi\) angle using all known parameters, then apply it to equation (11) to estimate the \(Z\) coordinate, and finally use equations (10) to get the remaining \(X,Y\) coordinates.
1 | 2 | 3 |
4 | 5 | 6 |