# General Moving Object Localization from a Single Flying Camera
## System Design  
### System Overview  
In this research, we want to propose a new algorithm for drones with a single camera to localize objects moving in an arbitrary direction. We do not assume any prior knowledge of the object class (e.g., person, vehicle, farm equipment, etc.) or its size, speed, and direction of motion. To achieve the maximal increase in baseline, we instruct the drone to fly in a direction perpendicular to the direction of the camera. As the drone flies, it will take a burst of images at small time intervals. As the drone's motion is known, the location of the drone where each image is taken is completely determined. Using this information and the location of the object in each of the images, we will be able to recover the distance of the object from the camera even though the object's motion is unknown. We demonstrate that, by using four images, we can recover the location of an object moving linearly in an arbitrary direction.  
Our algorithm has the advantage that it does not require any additional cameras or apparatus, so it is very effective for lightweight or low-cost drones (e.g., Parrot rolling spider (1996)) which have a low payload or low lift force. We demonstrate our algorithm on a pedestrian detector, but we will only use the centroid of the bounding box for our computations and will not make any assumptions about the shape or size of the object. By changing the object detector, our algorithm can work for objects of any class. Once the distance of the object from the drone is known, we can map the object's location to any global coordinate system (assuming that we know the drone's position--e.g., through Global Positioning System (GPS) or WiFi positioning). Our system is also robust to occlusions, as our drone will be taking a series of images as it flies, and we can always select only those that have the object in them. We can also arbitrarily choose the length of the baseline that we want in order to meet the accuracy that we need.  
Figure 1 shows an overview of our system. Our system consists of a drone mounted with a single camera at position \((x_{d},~{}y_{d})\). Using the algorithm described later in this section, the drone will compute the distance \(Z_{d}\) and angle \(\theta_{d}\) of an object (e.g., pedestrian) relative to itself, and then use this distance to compute the position of the object \((x,y)\) in global coordinates. We assume that the position of the drone is always known (e.g., through GPS or WiFi positioning, or from an Inertial Navigation System (INS), if available).  
After calculating the position of the object, the drone will compute a new position for it to fly to (if the object has moved) so that it will continue to have the object in its view. Figure 2 gives a flowchartof the overall system, including takeoff and landing. Our algorithm is the part in the loop, and it can be repeated as often as necessary.  
Figure 1: Overview of the proposed localization system. The drone is at position \((x_{d},\,y_{d})\) and the object is at position \((x,y)\). The object is at a distance \(Z_{d}\) and angle \(\theta_{d}\) from the position of the drone.  
Figure 2: Overall system flowchart.