# General Moving Object Localization from a Single Flying Camera
## 4 Mathematical Formulation
Here, the object is approximated to move with a constant speed in a straight line. and \(i,j,k\), and \(l\) refer to the \(x\) axis intercept of the lines, which is essentially the baseline between the respective camera positions and the origin, which can be defined as follows. \[i=\sum_{1}^{n_{1}}C_{n},\ j=\sum_{1}^{n_{2}}C_{n},\ k=\sum_{1}^{n_{3}}C_{n},\ l=\sum_{1}^{n_{4}}C_{n}. \tag{9}\]  
where \(C_{n}\) is the distance between successive positions of the drones. Each \(n_{1}\), \(n_{2}\), \(n_{3}\), and \(n_{4}\) refers to the time period in which the image is taken (it is also the image number for that sequence) for the positions \"\(i\)\", \"\(j\)\", \"\(k\)\" and \"\(l\)\", respectively. For example, if \(n_{1}\) is 20, the baseline calculation will be:  
\[C_{1}+C_{2}+\cdots+C_{20}=\sum_{1}^{20}C_{n}=i. \tag{10}\]  
Then, the intersections between line \(L_{0}\) and the others can be expressed as follows:  
\[(x_{1},y_{1})=\left(\frac{b-li}{I-a},a\left(\frac{b-li}{I-a}\right)+b\right), \tag{11}\]  
\[(x_{2},y_{2})=\left(\frac{b-lj}{J-a},a\left(\frac{b-lj}{J-a}\right)+b\right), \tag{12}\]  
Figure 7:0  
Figure 7:1  
We can now use the above relations to find an expression for the distances between each successive position of the object. From the geometry in Figure 9, we can obtain the following relations:  
Figure 7:2  
Figure 7:3  
Figure 7:4  
Equations (15)-(17) can be reduced further:  
Figure 7:5  
Figure 7:6  
By simplifying Equations (18) and (19), we can isolate the y-axis intercept \"\(b\)\" as an expression using the slope \"\(a\)\" from Equation (3). From Equations (18) and (19), we can get \(b_{1}\) and \(b_{2}\), respectively, as follows:  
Figure 7:7  
Figure 7:8where:  
Figure 7:9 Figure 6.0 Figure 6.1 Figure 6.2 Figure 6.3 Figure 6.4 Figure 6.5 Figure 6.6 Figure 6.7 Figure 6.8  
Since \(b_{1}\) and \(b_{2}\) must be the same value, we can equate (20) and (21) and derive the equation for the slope \"\(a\)\". Note that in our linear assumption, the object is moving at a constant speed in a straight line, so \(D_{A}=~{}D_{B}=D_{C}\) if four consecutive images in the sequence were used. If, instead, the first two images (i.e., frames 1 and 2) and the last two images where the pedestrian is still detected (say, at frames 18 and 19) were used, we would have \(16D_{A}=D_{B}=16D_{C}\). The final equation for slope \"\(a\)\" is a cubic equation as follows:  
Figure 6.9  
By solving Equation (22), we can get the slope \"\(a\)\" of line \(L_{0}\), as well as the intercept \"\(b\)\" from either Equation (20) or (21). The Cartesian location of the target object \((x_{4},~{}y_{4})\) can then be determined. We solve the cubic Equation in (22) using [PERSON]'s method. Since we are dealing with a cubic equation, there can be up to three real roots for the slope. Only one of the roots is the correct root and will give a valid object position \((x_{4},~{}y_{4})\) that is consistent with the position and the flight path of the camera. Incorrect roots will give invalid positions, such as negative values of \(y_{4}\) (i.e., behind the camera) or some extreme values of \(x_{4}\). Note, also, that in our approach fluctuations in elevation do not affect accuracy. The accuracy of the algorithm only depends on the \(x\)-axis movement.