## 2 UAV-Enabled ITS Framework
### Third Layer: Data Collection and Processing
#### 2.3.2 Data Processing  
In a UAV-based ITS, traffic parameters are extracted from UAV-collected video data. UAV video data differ from conventional video data in terms of the background movement of the video frame. In the case of conventional video data, the background of the video frame does not change and remains fixed during the period of the video. However, in the case of UAV video data, the background of the video frame continuously changes. The movement of the background of the video frame is called ego-motion. Because of the ego-motion of the UAV video data, traditional vehicle detection and traffic parameter estimation methods are not appropriate for extracting traffic parameters from them. Research papers addressing ego-motion and extracting traffic parameters from UAV-collected data are discussed in this section. For the accumulation of traffic data and traffic simulation model verification, [PERSON] et al. [59] proposed an open data test platform. In this platform, the authors suggested uploading highly accurate and undistorted traffic data obtained after calibrating camera parameters. The authors proposed a calibration algorithm based on the pinhole camera model to determine intrinsic and extrinsic camera parameters. The calibration of the intrinsic parameters was carried out using HALCON software [75]. Image distortion correction was performed using the model proposed by [PERSON] et al. [76]. The extrinsic parameters were calibrated by leveraging the orthogonal properties of rotation and translation matrices. Additionally, traffic parameters were extracted using the Scale-Invariant Feature Transform (SIFT) and Continuously Adaptive Mean Shift (CAMshift) algorithms. [PERSON] et al. [60] proposed a framework for assessing microscopic traffic behavior and lane-level macroscopic speed, density, and velocity traffic parameters. The framework comprises three modules: functional, data storing, and parameter estimation. The functional module extracts lane-level traffic information by motion vector processing, vehicle detecting, and vehicle tracking. The output data of the functional module are then stored in a unique data structure in the data-storing module. The traffic data stored in the data storing module are processed to estimate microscopic and macroscopic traffic parameters in the parameter estimation module. The authors proposed a new multiple vehicle tracking algorithm consisting of detection, prediction, and association steps. The algorithm uses an ensemble vehicle detector and the Kanade-Lucas-Tomasi (KLT) optical flow tracker for vehicle detection and prediction. Moreover, each predicted vehicle is associated with the corresponding detected vehicle by implementing several rules in the algorithm. To estimate traffic flow parameters in real time for both free and congested flow conditions, [PERSON] et al. [61] proposed a complete analysis framework for UAV video data. In this four-stage framework, vehicle detection and traffic parameter estimation are carried out in the first and last two stages, respectively. A supervised learning method is used for  
Figure 7: Traffic flow video data collection using UAV. traffic flow parameter estimation, and an ensemble classifier is used for vehicle detection. The proposed ensemble classifier outperformed contemporary state-of-the-art vehicle detectors designed for UAV-based vehicle detection. [PERSON] et al. [62] proposed a four-step framework to estimate bi-directional traffic flow parameters in real time by analyzing UAV videos. In the first step, Shi-Tomasi features are used to detect interest points in each pair of consecutive frames, and the interest points are tracked using the Kanade-Lucas optical flow algorithm. In the second step, based on the speeds and directions of the interest points, the optical flow vectors for both vehicles and the background are clustered using the \(k\)-means algorithm. In the third step, for every vehicle, a connected graph is generated, connecting all the associated interest points.