# General Moving Object Localization from a Single Flying Camera
## System Design
### Calibration
#### 3.2.2 Baseline Calibration  
Another important set of parameters is the distances between the drone positions at each successive image capture. This represents the baseline between the images. We can determine the drone positions \begin{table}
\begin{tabular}{c c c c} \hline \hline \(Z\) (cm) & \(P\) (cm) & \(p\) (pixels) & \(R\) (pixels) \\ \hline
92 & 57 & 320 & 516.49 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Calibration of the drone’s camera. Figure 3: Geometry of view angle calibration. The object (pedestrian) is at depth \(Z\) and horizontal displacement \(P\) from the camera’s optical center. It subtends an angle of \(\theta\) from the camera axis and has an image offset of \(p\) pixels from the image center. from GPS or WiFi positioning, but these computations are slow and have large errors. It is easier and more efficient to command the drone to perform exactly the same action in each run so that the distances are the same in each run. We can then determine these distances from calibration. The constant action that the drone is tasked to perform is to take a sequence of images at a constant rate while flying with a preset speed to the left (or right). Any pair of images in this sequence can be used to recover the distance of the object, but to reduce the error in estimating depth the length of the baseline should be as long as possible. This means that we should use the first and the last images in the sequence for the best results. However, as the object may be out of the camera's view as the drone flies, we can use any of the intermediate images in the sequence where the object is last seen. In our calibration experiments, we allow the drone to takeoff and hover for a few seconds until it has stabilized, and then we send an instruction to the drone to fly to the left (or right) at the maximum speed (i.e., roll angle phi = \(\pm\)1.0, normalized), while taking a burst of images at a 200 ms interval for a total of 40 images. Figure 4 shows the layout of the baseline calibration. Here, the direction of object movement and drone flight should be equal. For example, if the target object is moving left relative to the drone, then the drone should fly left as well; otherwise, the object will disappear from the image very quickly. These specific values were chosen after numerous tries to give the best tradeoff between the distance flown and the time taken to complete, as the object (pedestrian) may have moved during that time interval. Procedure 1 describes the steps of the baseline calibration procedure. ```
Start
1. Drone takeoff and hover until stabilized. 2. Instruct the drone to fly to the left (or right) with maximum speed (i.e., roll angle phi = \(\pm\)1.0, normalized). Repeat
3. Take an image. 4. Continue to fly for 200 ms. Until (number of images taken equals 40)
5. Match each image taken with the pattern on the wall and measure the distance travelled at the locations where each image is taken. End
```  
**Procedure 1**: Baseline calibration  
It is noteworthy to mention that for a quadrotor drone, from a stabilized hovering position it cannot immediately move horizontally. The drone needs to rotate (i.e., \"roll\") into the direction of intended motion so as to have a component of its lift to generate the force necessary to begin its motion. Due to this, we observe that the position of the drone before the command is sent to the drone (we call this position 0) and the position when the first image is taken (we call this position 1) are exactly the same. The drone was at hovering when the command is sent (i.e., before the drone has even started to rotate (roll)), and the first image was taken just after the drone completed its rotation (roll) to the left or right (but before any horizontal translation takes place--so without any changes in its position). The rest of the images (at positions 2 to n - 1) were increasingly distant from the next, due to the inertia and the acceleration of the drone, which needed some time to accelerate to the desired speed.