**2. The Framework**

An extensive literature review of existing studies and frameworks regarding traffic data acquirement using UAVs was carried out [11,15,26–28,31] to establish and applicate a comprehensive guiding framework in this study. A bibliometric and visualization analysis was conducted by identifying the articles with the most effort on traffic data acquirement using UAVs, to evaluate patterns of the existing literature. This methodology is widely accepted in the literature and in bibliometrics [32,33].

Specifically, a comprehensive database of gathered data from Scopus [34] was developed. Documents that contain the keywords "UAVs" and "traffic data collection" were selected for the evaluation. The software VOS [35] was applied to examine and analyze the distribution of co-occurrent keywords of the most common keywords outlined below articles' abstracts. The presence of 1104 keywords in 105 publications was confirmed. The threshold of 4 occurrences was adopted. The consistency of the database ensured the validation of the analysis to the context of this study. The final analyzed keywords and their node size are illustrated in Figure 1.

**Figure 1.** Network visualization of authors' keyword occurrence.

According to the analysis, the higher the keyword and the node, the larger number of articles contain the specific keyword. Moreover, thick lines indicate co-occurrence of the keyword in the literature. Five clusters were developed according to the analysis and each one represents a set of related items. The leading keyword of each cluster and its characteristics in terms of total numbers of occurrences and total link strength of co-occurrences are presented in Table 2.


**Table 2.** The top keywords co-occurrence and total link strength.

According to the identified keywords, it can be concluded that various methodologies regarding the extraction of the traffic information exist. The vehicles' detection and classification to extract trajectories for operational and safety analysis, is the main issue the existing literature is dealing with.

Findings and methods of the existing literature were considered to establish a comprehensive framework regarding UAV survey execution and microscopic traffic data acquirement, following the discrete steps of Figure 2.

**Figure 2.** The discrete steps to acquire traffic data using UAVs.

The proposed methodology of this paper is structured in such a way to be simply and effectively adopted by researchers and engineers. Detailed naturalistic vehicle trajectories data through UAVs can be extracted following a low-cost method, requiring less demand for high skills or expertise in image processing techniques.

#### *2.1. UAV Traffic Survey*

#### 2.1.1. Preparation of the Survey

UAV flight planning for the collection of the required data depends on several aspects that are critical for ensuring a successful UAV flight operation. According to [26], safety issues (such as prohibited fly zones or need for the existence of sufficient space regarding safety distance from sensitive installments) and climate characteristics (such as the weather conditions) can directly affect the survey execution. Thus, an in-depth flight planning before the execution of the UAV survey is essential.

After the identification of the study area, an appropriate number of ground control points (GCPs) need to be distributed homogenously within the area of interest (Figure 3).

**Figure 3.** The location of GCPs as distributed homogeneously for the survey.

The aim of this task intends to transform the acquired frames on real-world coordinates through the process of georeferencing. GCPs of well-known coordinates significantly increase the absolute accuracy of the analysis as presented in the following steps. In the case of manual or semi-automatic georeferencing process as in the experiment of this study, GCPs are required to be visible in all acquired frames. Their use intends to correct errors due to UAV tilt (wind forces affect) and camera lens distortion issues. It is noted that the use of natural GCPs (such as corners of manholes and tactile pavements, intersections of white pavement markings, etc.) provides the flexibility to conduct surveys over different time periods, skipping time-consuming field measurements of GCPs coordinates per survey. The restraint of UAVs low battery and the requirement for visible GCPs per each survey means that permanent natural ground control points are an efficient choice. A proper tool can provide the coordinates of the selected ground control points in high accuracy. Figure 4 presents an example of natural GCPs, the coordinates of which are measured using a RTK GNSS receiver.

**Figure 4.** Natural ground control points.

#### 2.1.2. Survey Execution

During the UAV survey execution, the safety and legal issues should be addressed. UAV flight can be handled manually via a controller or automatically according to a predefined route. It is mentioned that both the surveyor and the equipment should not be noticed by road users. Any distraction of drivers' attitude affects the naturalness of the collected data.

There are three main aspects that affect the level of detail of the study and the surveyor should consider during a UAV flight: (a) the video resolution, (b) the altitude of the UAV and (c) the viewing angle. More specifically, it is recommended video recordings be saved at the highest possible quality. High-resolution videos and low flight altitudes optimize the required time regarding the video processing and increase the accuracy and the quality of the study. Videos recorded from an angle require a process of pixel transformation to achieve an orthographic view. This is usually carried out using perspective filters. Thus, recordings of a nadir point of view minimize camera errors and are preferable.

Through these main aspects, the ground sample distance (GSD) can be reduced, enhancing the final accuracy of the analysis. With lower GSD, the identification of the appropriate point regarding vehicle tracking analysis, will be much easier. It is noted that the measured pixel size determines the minimum threshold of the final accuracy.

Finally, the location of the UAV should be stable to minimize the bias in the stabilizing process. A gimbal system attached to the camera can stabilize the recorded shots in an efficient way.

#### *2.2. UAV Video Processing*

#### 2.2.1. Preliminary Process

A preliminary process is required to simplify the video processing. This step includes the following operations: Firstly, no significant frames form videos (take-off and landing) are removed. A stabilization process is required to minimize rough bias. Proper filters contribute to smoother videos and the elimination of camera shakiness. In the following step, specific events according to the scope of the analysis are identified (for example, in a speed analysis the time periods of vehicles on free-flow speed conditions are identified). The video frames of the selected time periods are extracted per second. Finally, the lens distortion of the acquired images needs to be corrected. There are several techniques that can be adopted. A common practice is to transform images by adopting the distortion profile of the implemented camera.

#### 2.2.2. Geo-Registration

The transformation of UAV-acquired image pixels into real-world coordinates allows the extraction of vehicle trajectory data into real-world coordinates. The use of a cartesian coordinate system calibrated to a specific scale is a common practice regarding the georegistration process. However, the use of GCPs in the experiments, except for the high accuracy of the analysis and the correction of image distortion, provides a comprehensive dataset that can be managed by several applications, depending on the purpose of the study.

A reference image of the study area is georeferenced according to the known coordinates of the GCPs. The extracted frames of the identified events are then co-registered to the reference image. This process can be carried out either in a manual way, which provides accurate but time-consuming results, or in an automatic way by using pixel matching algorithms, which promises quicker and less accurate results.

### 2.2.3. Vehicle Trajectory Acquisition

To acquire microscopic traffic data, the extraction of accurate vehicle trajectories is essential. Several studies carried out recently are dealing with this issue [11,20,26,36–39]. The adopted methodologies can be divided into three main categories: (a) the manual process, (b) the semi-automatic process, and (c) the automatic process technique. The first two methods are more accurate and offer many flexibility advantages, however, they

are time-consuming. On the other hand, the third method promises quicker results by using detection techniques and tracking algorithms with minimum manpower involved. Nevertheless, this requires high expertise and knowledge of computer vision techniques, while its accuracy on high spatial data such as vehicle trajectories sometimes requires manual effort for the correction of missed trajectories.
