# An Open Data Platform for Traffic Parameters Measurement via Multirotor Unmanned Aerial Vehicles Video

Authors: Yuchuan Du; Cong Zhao; Feng Li; Xuefeng Yang
Journal: Journal of Advanced Transportation
 (2017)

---

## Abstract

Multirotor unmanned aerial vehicle video observation can obtain accurate information about traffic flow of large areas over extended times. This paper aims to construct an open data test platform for updated traffic data accumulation and traffic simulation model verification by analyzing real time aerial video. Common calibration boards were used to calibrate internal camera parameters and image distortion correction was performed using a high-precision distortion model. To solve external parameters calibration problems, an existing algorithm was improved by adding two sets of orthogonal equations, achieving higher accuracy with only four calibrated points. A simplified algorithm is proposed to calibrate cameras by calculating the relationship between pixel and true length under the camera optical axis perpendicular to road conditions. Aerial video (160 min) from the Shanghai inner ring expressway was collected and real time traffic parameter values were obtained from analyzing and processing the aerial visual data containing spatial, time, velocity, and acceleration data. The results verify that the proposed platform provides a reasonable and objective approach to traffic simulation model verification and improvement. The proposed data platform also offers significant advantages over conventional methods that use historical and outdated data to run poorly calibrated traffic simulation models.


---

## Body

## 1. Introduction

Traffic congestion is frequently encountered on ground roads and urban expressways [1]. Many advanced traffic control strategies and complex traffic behaviors have been proposed using traffic simulation models to minimize congestion and enlarge/modify traffic networks [2, 3]. For example, the cell transmission model (CTM) can determine optimal on-ramp metering rates, emergency dissipation response traffic density estimation, and congestion mode estimation for a freeway [4, 5]. Cellular automata (CA) is a flexible and powerful visualization tool used in urban growth simulations [6–8] and has many appealing features, including simulating bottom-up dynamics and capturing self-organizing processes [7, 8]. However, these optimization methods require reasonably accurate estimates for the relevant parameters [9]. Almost all traffic simulation models are confronted with the same difficulties, for example, lack of continuous and detailed real time data and lack of frequent updates based on reliable timely data, leading to inaccurate and improperly calibrated traffic simulation models with questionable results [10, 11]. Thus, mismatches and discrepancies between predicted traffic situations (simulation model output) and actual traffic patterns occur. Since each traffic network component (segment) has distinct characteristics, one cannot use the same set of calibrated data and parameter values across all network components [11, 12]. This is only possible if the collected data is frequently updated and reliable, and data sources are readily available.Classical methods to accumulate traffic data and estimate traffic parameters depend upon induction loops and other on-site instruments [13]. However, they do not provide a comprehensive picture of two-dimensional (2D) traffic situations, with the primary drawback being their limitation for measuring important traffic parameters and accurately assessing traffic conditions [14]. Detection through unmanned aerial vehicle (UAV) video image processing is among the most attractive alternative new technologies, offering opportunities to perform substantially more complex tasks and provide more precise, accurate, and widespread traffic parameters than other sensors [15].Recent advances in UAV technology and utilization for traffic surveillance have allowed traffic planners to consider the eye in the sky approach to traffic monitoring, using detailed real time data collection and data processing to evaluate traffic patterns and determine origin destination flows and emergency response [16–19]. Several research teams are focused on UAV applications for transportation engineering. German Aerospace Center, University of California at Berkeley, and Western Michigan University have proposed several methods to investigate the most effective methods of transmitting and analyzing UAV acquired traffic data [20–22]. The University of South Florida, University of Washington, and Linkopings University have focused on the type of data and information that should be collected and extracted to design traffic simulation models and evaluate traffic networks [16, 23, 24]. UAVs are preferred over traditional technologies because of their mobility and lower operating costs relative to manned systems [25].Most aerial cameras are not perfect and tend to include a variety of distortions and aberrations. To guarantee aerial data accuracy, improvements in airborne camera calibration and image distortion correction algorithms are essential. Abdel-Aziz and Karara proposed a method based on direct linear transformation into object space coordinates for close range photogrammetry. However, their method does not consider nonlinear distortion [26]. Zhang used a precise lattice template to optimize internal camera parameters using template physical coordinates and image coordinates, resulting in a method that is simple, accurate, and flexible [27]. Heyden and Astrom showed that automatic calibration of variable parameters is possible under certain conditions [28, 29]. The advantage is that the algorithm may achieve high accuracy, provided that the estimation model is good, and correct convergence has been achieved. However, since the algorithm is iterative, the procedure may settle on a bad solution unless a good initial guess is available. Espuny proposed an automatic linear calibration method for planar movement [30]. While automatic calibration is more flexible compared to traditional calibration methods, the accuracy is insufficient. This paper presents a simple and effective calibration method of intrinsic and external parameters and a high distortion model for lens cameras.Simulation models require calibration based on unique features and traffic patterns associated with specific networks. Requirements for collecting reliable and robust traffic state information have become increasingly urgent during the past decade. Multirotor UAVs are different from fixed ring UAVs, with the ability to hover at low or high altitudes and focus on data collection from a specific link or intersection. This paper proposes an open data test platform for updated traffic data accumulation and traffic simulation model verification and improvement (in terms of variable parameters values) by analyzing real time collected aerial video, shown diagrammatically in Figure1. To offer a reliable way of collecting spatial-temporal data, camera parameter calibration methods and image distortion correction problems are explored under aerial shooting conditions. A simplified algorithm for camera calibration is proposed based on calculating the relationship between pixel and true length with the camera optical axis perpendicular to the road conditions. The most appropriate shoot altitudes were also determined. Large quantities of aerial videos from the Shanghai inner ring expressway were collected and traffic simulation models calibrated using the collected data and traffic parameters.Figure 1
Proposed open data platform for traffic simulation model tests.


## 2. Purpose of Open Data Platform

The objective of our open data platform is to provide real-world data sets with corresponding data descriptions, which will be used as a resource to assist in the verification, validation, calibration, and development of existing traffic simulation models, such as car following, lane changing, gap acceptance, and queue discharge. Traffic simulation models have complicated data input requirements and many model parameters [31]. For example, to build a microscopic simulation model for certain network, two types of data are required. The first type is the basic input data used for network coding of the simulation model. The second type is the observation data employed for the calibration of model parameters and the simulation model. The data sets of our platform contain the following two types.(i)
Basic Input Data. Basic input data include data of network geometry, transportation analysis zones, travel demand, and traffic detection systems.(ii)
Data for Model Development, Improvement, and Validation. After extensive research into the traffic data for potential use in microsimulation model development, improvement, and validation, this platform plans that a data collection program should include the following.
First, a freeway traffic data collection program includes both vehicle trajectory data and wide-area detector data for operational and tactical algorithm research.Second, an arterial traffic data collection program includes both vehicle trajectory data and wide-area detector data for operational and tactical algorithm research.Finally, a regional traffic data collection program includes both instrumented vehicle data and wide-area detector data for strategic algorithm research.Despite the importance of UAV video traffic data for research traffic flow theory, these data proved to be massively affected by measurement errors in the vehicle’s spatial coordinates. If not properly accounted for, these errors would make these data sets unusable for any study on traffic theory. The accuracy of the computation of the true location of the vehicle is mainly influenced by the error of the UAV position (the maximum error is estimated below 4-5 meters for distances to the object of 80 meters), the springs in the camera platform suspension, and the object recognition algorithm to automatically track the precise location (with an accuracy of one foot or less) of every vehicle on a subsecond basis. Existing efforts have relatively high vehicle detection and tracking failure rates, which require some manual transcription to ensure appropriate vehicle capture rates. The current work presents a multistep procedure for reconstructing vehicle trajectories, which aims at eliminating the outliers that give rise to unphysical acceleration and deceleration and jerks and smoothing out the random disturbances in the data, preserving the driving dynamics (vehicle stoppages, shifting gears during acceleration and deceleration), and the internal consistency of the trajectory, that is, the space actually traveled [32]. In spite of these concerns, ongoing trajectory data collection efforts can make UAV video traffic data usable for studies on traffic flow theory.


## 3. Platform and Hardware

The DJI PHANTOM 2+ miniature UAV was employed, as shown in Figure2, with the following characteristics.(i)
The UAV has four rotors (quadcopter), 400 g payload, 25 min maximum flight time, and weight 1000 g.(ii)
Precision flight and stable hovering were achieved using an integrated GPS autopilot system offering position holding, altitude lock, and stable hovering, which allows the controller to focus attention on video production.(iii)
Automated return to home: if the vehicle is disconnected from the controller during flight, the system failsafe protection activates and transmits a message to the controller (if the signal is strong enough) and automatically navigates home.(iv)
The flight path may be programmed from an iPad using the 16 waypoint ground station system, enabling the controller to shoot with more precision.Figure 2
DJI PHANTOM 2+ and GoPro HERO3+ Black Edition.The camera employed was GoPro HERO3+ Black Edition, as shown in Figure2, a commercially available “action” camera popular with athletes and extreme sports enthusiasts. It is capable of recording smooth, high definition video at various resolutions from 720 to 4000 p at 15–120 frames per second (fps). Although the GoPro has no zoom capability, there are three field of view settings (wide, medium, and narrow), which allow the user to focus the camera on wider or smaller areas. The camera is Wi-Fi capable and can be operated using a Wi-Fi remote or via the free GoPro App on a smartphone or tablet.


## 4. Aerial Video Calibration

### 4.1. Pinhole Model

The basic principle of camera calibration is the pinhole imaging model. The pinhole model describes the relationship between three-dimensional (3D) coordinate points in the camera and the imaging plane projection. The camera iris, rather than the lenses used to gather light, is described as a point. However, the pinhole model does not consider geometric distortion caused by the lens and the limited aperture or blur caused by lack of focus, nor does it consider discrete pixel coordinates in the real camera. Thus, the pinhole model constitutes a first-order approximate transformation for mapping 3D coordinates to 2D or planar coordinates, with accuracy that depends upon camera quality. Accuracy decreases with increased lens distortion from center to edge.Homogeneous coordinates using the pinhole method of camera projection are(1)sμ′ν′1=Ar1r2r3tXYZ1,where μ′ν′1T and XYZ1T are the image and world coordinates, respectively, corresponding to the homogeneous coordinates; s is a scaling factor; r1r2r3t is the external parameter matrix, converting between real and camera coordinates, where r1r2r3 is the rotation matrix and t is the world coordinate origin in camera centric coordinates; and A is the internal parameter matrix:(2)A=αxγμ00αyν0001,which includes five parameters associated with factors relating to lens focal length, image sensor system, and location of the main points.


### 4.2. Intrinsic Parameter Calibration and Distortion Correction

Intrinsic parameter calibration adopts a camera calibration algorithm based on HALCON software [33]. The calibration plate is a 7 × 7 lattice with 12.5 mm dot pitch. HALCON recommends that the camera should shoot at least eight images in different positions and poses and that the circle diameter in the final images should be >10 pixels. To minimize calibration error, 50 images were taken at various positions and poses. Figure 3 shows example images, and Table 1 shows the final calibration results.Table 1
Calibration results of GoPro HERO3+ internal parameters.
Width of pixel type 8.31 Center-point coordinate (X) 1253.62 S x / μ m C x / p i x e l Height of pixel type 8.30 Center-point coordinate (Y) 976.77 S y / μ m C y / p i x e l Focal length 12.18 Image width 2560 f / m m w / p i x e l Distortion factor −2112.24 Image height 1920 κ / m m h / p i x e lFigure 3
Example calibration pictures at different positions.Nonlinear distortion during camera imaging can arise from several characteristics, including CCD manufacturing error, lens surface errors, axial spacing between each lens, and centralization errors. The LENZ distortion correction model was adopted to meet precision requirements [34]: (3)μd,νdT=21-4κμ2+ν2μ,νT,μ,νT=11+κμd2+νd2μd,νdT,where κ is the magnitude of radial distortion, negative values indicating barrel distortion and positive values indicating pillow distortion; (μ,ν) is the original image coordinate point; and (μd,νd) is the corrected image coordinate point. Knowing the distortion parameters after calibration is crucial to the correction process, as demonstrated in Figure 4.Figure 4
Aerial image comparison before and after calibration.


### 4.3. External Parameter Calibration

#### 4.3.1. External Parameter Calibration Algorithm

Traffic scenes tend to involve planar calibration, such as a road or channel plane. It is assumed thatZ=0 for the world coordinates. Therefore, the pinhole model can be simplified to(4)μ′ν′1=Ar1sr2stsXY1,where μ′ν′1T and XY1T are the image coordinates after distortion correction and world coordinates, respectively. The internal parameter matrix, A, was calculated above. Therefore, solving the 3 × 3 matrix, r1/sr2/st/s, can provide transformation between world and pixel coordinates.There are nine unknown parameters in the matrix, with “1” providing a linear equation in homogeneous coordinates and four sets of coordinates providing eight linear equations. Therefore, equations can be obtained as exact solutions.Becauser1r2t is orthogonal, the constraints (5)r1s∗r2s=0,r1s=r2sare nonlinear equations that can be solved using the iterative method. Selecting reasonable initial values can greatly increase iterative speed. The initial value represents the solution of linear equations obtained by substituting four control points into the projection equation, which is relatively close to the real solution of the equation.Let(6)x1x4x7x2x5x8x3x6x9 signify the elements of r1/sr2/st/s; the constraints become(7)x12+x22+x32-x42-x52-x62=0,x1·x4+x2·x5+x3·x6=0.LetAx=b represent the overdetermined equations after adding constraints (7). Then (8)Sx1,…,x9=Ax-b2.The least squares method was used to convert (8) to statically determinate nonlinear equations:(9)∂S∂x1=0∂S∂x2=0⋮∂S∂x9=0.We may then apply a quadratic approximation of the Taylor expansion and solve the Jacobian matrix for each equation with Newton’s iteration method applied to the results.


#### 4.3.2. Experimental Verification and Analysis

To validate the required number of calibration points for the proposed method and compare accuracy without adding constraints, the proximal and distal points of a known scene were selected as verification points (these two sets of points were not included in the solution of the parameter matrix). It is assumed that the world coordinates from field measurements and the pixel coordinates after distortion correction are the true values, and so the difference in calculated position relative to the true value was used to judge accuracy, as shown in Figure5.Figure 5
Calculated and true value for distal and proximal points.For small number of calibration points, distal point differences are larger than for proximal points. However, the differences tend to stabilize for seven or more calibration points without adding constraints, and only four points are needed when constraints are added. The difference does not approach zero except for certain values with increased measurement points. Given that multiple measurements reduce random error, this nonzero difference is systematic and arises mainly from internal matrix and distortion correction coefficient errors.


#### 4.3.3. Simplified Aerial Shooting Calibration Algorithm

Measuring traffic parameters via UAV usually requires adoption of the horizontal downward viewing angle. However, when the camera imaging surface and road plane are parallel to one another, camera calibration can be simplified. Using the consistent ratio of image and world coordinates, length and speed parameters can be obtained quickly.Transforming between the world coordinate system and camera coordinate system is undertaken through rotational matrix,R, and translational matrix, T.The translational matrix,T, is a 3D column, whereas the rotational matrix, R, is the total product of the rotation angle encompassing the X, Y, and Z axes:(10)Rxψ=1000cos⁡ψsin⁡ψ0-sin⁡ψcos⁡ψ,Ryφ=cos⁡φ0-sin⁡φ010sin⁡φ0cos⁡φ,Rzτ=cos⁡τsin⁡τ0-sin⁡τcos⁡τ0001,so that (11)R=cos⁡φcos⁡τcos⁡ψsin⁡τ+sin⁡ψsin⁡φcos⁡τsin⁡ψsin⁡τ-cos⁡ψsin⁡φcos⁡τ-cos⁡φsin⁡τcos⁡ψcos⁡τ-sin⁡ψsin⁡φsin⁡τsin⁡ψcos⁡τ+cos⁡ψsin⁡φsin⁡τsin⁡φ-sin⁡ψcos⁡φcos⁡ψcos⁡τ.When the camera imaging surface and road plane are parallel to one another,ψ=0 and φ=0, which simplifies (12)R=cos⁡τsin⁡τ0-sin⁡τcos⁡τ000cos⁡τ.Taking the first two columns ofR and T to form the 3 × 3 matrix from the previous section allows adoption of the simplified algorithm when R is equal or close to(13)cos⁡τsin⁡τ–-sin⁡τcos⁡τ–00–.


### 4.4. Error Analysis of Simplified Algorithm

To verify the accuracy of the simplified method under horizontal downward angle conditions, we selected the same calibration object within a road environment from different heights. The calibration object was a crosswalk line 4 m in length. The UAV hovered to shoot for 1 min every 10 m from 0 to 100 m. Example images are shown in Figure6.Figure 6
Images of crosswalk line under horizontal downward angle conditions.The camera mode was 16 × 9 W 1080 p and the parameters werea=1920, b=1080, and α1=118.2. The light sensitive component size of the GoPro HERO3+ is 1/2.5 inches, with the corresponding size being 5.38 mm × 4.39 mm. Fifteen sets of independent experiments were conducted for each height, with outcomes as shown in Figure 7.Figure 7
Simplified algorithm calculations of the true value of crosswalk line images.The Kolmogorov-Smirnov method was used to verify whether the flight elevation data represented a normal distribution and set the significance level atp=0.05. Results indicate that the data represent a significant normal distribution. A two-tailed t-test was applied to verify that the results were equal to the true value at each flight elevation, with the significance level set at p=0.1.H0: Calculation results of simplified algorithm = the true value (4 m)H1: Calculation results of simplified algorithm ≠ the true value (4 m)From Figure7 and Table 2, the error scope can be controlled within 0.3 m at elevations 80–100 m. The simplified algorithm results represent the true value under 100 m with significance level p<0.1. The optical axis was not perpendicular to the road surface due to camera vibration and the length ratio of lower elevation images was larger. Therefore, the appropriate flight elevation is 100 m to obtain the best accuracy from the simplified algorithm.Table 2
One sample two-tailedt-test for each set of flight height data.
Flight elevation (m) Test value = 4.0 m t Df p (two-tailed) Mean difference 90% confidence interval of the difference Lower Upper 10 7.415 14 <0.001 0.820 0.625 1.015 20 10.242 14 <0.001 0.462 0.382 0.541 30 9.611 14 <0.001 0.374 0.305 0.442 40 19.976 14 <0.001 0.302 0.275 0.329 50 21.960 14 <0.001 0.281 0.259 0.304 60 11.252 14 <0.001 0.225 0.189 0.260 70 12.364 14 <0.001 0.195 0.167 0.223 80 3.093 14 0.008 0.063 0.027 0.099 90 3.126 14 0.007 0.058 0.0252 0.090 100 2.241 14 0.042 0.025 0.005 0.044


## 4.1. Pinhole Model

The basic principle of camera calibration is the pinhole imaging model. The pinhole model describes the relationship between three-dimensional (3D) coordinate points in the camera and the imaging plane projection. The camera iris, rather than the lenses used to gather light, is described as a point. However, the pinhole model does not consider geometric distortion caused by the lens and the limited aperture or blur caused by lack of focus, nor does it consider discrete pixel coordinates in the real camera. Thus, the pinhole model constitutes a first-order approximate transformation for mapping 3D coordinates to 2D or planar coordinates, with accuracy that depends upon camera quality. Accuracy decreases with increased lens distortion from center to edge.Homogeneous coordinates using the pinhole method of camera projection are(1)sμ′ν′1=Ar1r2r3tXYZ1,where μ′ν′1T and XYZ1T are the image and world coordinates, respectively, corresponding to the homogeneous coordinates; s is a scaling factor; r1r2r3t is the external parameter matrix, converting between real and camera coordinates, where r1r2r3 is the rotation matrix and t is the world coordinate origin in camera centric coordinates; and A is the internal parameter matrix:(2)A=αxγμ00αyν0001,which includes five parameters associated with factors relating to lens focal length, image sensor system, and location of the main points.


## 4.2. Intrinsic Parameter Calibration and Distortion Correction

Intrinsic parameter calibration adopts a camera calibration algorithm based on HALCON software [33]. The calibration plate is a 7 × 7 lattice with 12.5 mm dot pitch. HALCON recommends that the camera should shoot at least eight images in different positions and poses and that the circle diameter in the final images should be >10 pixels. To minimize calibration error, 50 images were taken at various positions and poses. Figure 3 shows example images, and Table 1 shows the final calibration results.Table 1
Calibration results of GoPro HERO3+ internal parameters.
Width of pixel type 8.31 Center-point coordinate (X) 1253.62 S x / μ m C x / p i x e l Height of pixel type 8.30 Center-point coordinate (Y) 976.77 S y / μ m C y / p i x e l Focal length 12.18 Image width 2560 f / m m w / p i x e l Distortion factor −2112.24 Image height 1920 κ / m m h / p i x e lFigure 3
Example calibration pictures at different positions.Nonlinear distortion during camera imaging can arise from several characteristics, including CCD manufacturing error, lens surface errors, axial spacing between each lens, and centralization errors. The LENZ distortion correction model was adopted to meet precision requirements [34]: (3)μd,νdT=21-4κμ2+ν2μ,νT,μ,νT=11+κμd2+νd2μd,νdT,where κ is the magnitude of radial distortion, negative values indicating barrel distortion and positive values indicating pillow distortion; (μ,ν) is the original image coordinate point; and (μd,νd) is the corrected image coordinate point. Knowing the distortion parameters after calibration is crucial to the correction process, as demonstrated in Figure 4.Figure 4
Aerial image comparison before and after calibration.


## 4.3. External Parameter Calibration

### 4.3.1. External Parameter Calibration Algorithm

Traffic scenes tend to involve planar calibration, such as a road or channel plane. It is assumed thatZ=0 for the world coordinates. Therefore, the pinhole model can be simplified to(4)μ′ν′1=Ar1sr2stsXY1,where μ′ν′1T and XY1T are the image coordinates after distortion correction and world coordinates, respectively. The internal parameter matrix, A, was calculated above. Therefore, solving the 3 × 3 matrix, r1/sr2/st/s, can provide transformation between world and pixel coordinates.There are nine unknown parameters in the matrix, with “1” providing a linear equation in homogeneous coordinates and four sets of coordinates providing eight linear equations. Therefore, equations can be obtained as exact solutions.Becauser1r2t is orthogonal, the constraints (5)r1s∗r2s=0,r1s=r2sare nonlinear equations that can be solved using the iterative method. Selecting reasonable initial values can greatly increase iterative speed. The initial value represents the solution of linear equations obtained by substituting four control points into the projection equation, which is relatively close to the real solution of the equation.Let(6)x1x4x7x2x5x8x3x6x9 signify the elements of r1/sr2/st/s; the constraints become(7)x12+x22+x32-x42-x52-x62=0,x1·x4+x2·x5+x3·x6=0.LetAx=b represent the overdetermined equations after adding constraints (7). Then (8)Sx1,…,x9=Ax-b2.The least squares method was used to convert (8) to statically determinate nonlinear equations:(9)∂S∂x1=0∂S∂x2=0⋮∂S∂x9=0.We may then apply a quadratic approximation of the Taylor expansion and solve the Jacobian matrix for each equation with Newton’s iteration method applied to the results.


### 4.3.2. Experimental Verification and Analysis

To validate the required number of calibration points for the proposed method and compare accuracy without adding constraints, the proximal and distal points of a known scene were selected as verification points (these two sets of points were not included in the solution of the parameter matrix). It is assumed that the world coordinates from field measurements and the pixel coordinates after distortion correction are the true values, and so the difference in calculated position relative to the true value was used to judge accuracy, as shown in Figure5.Figure 5
Calculated and true value for distal and proximal points.For small number of calibration points, distal point differences are larger than for proximal points. However, the differences tend to stabilize for seven or more calibration points without adding constraints, and only four points are needed when constraints are added. The difference does not approach zero except for certain values with increased measurement points. Given that multiple measurements reduce random error, this nonzero difference is systematic and arises mainly from internal matrix and distortion correction coefficient errors.


### 4.3.3. Simplified Aerial Shooting Calibration Algorithm

Measuring traffic parameters via UAV usually requires adoption of the horizontal downward viewing angle. However, when the camera imaging surface and road plane are parallel to one another, camera calibration can be simplified. Using the consistent ratio of image and world coordinates, length and speed parameters can be obtained quickly.Transforming between the world coordinate system and camera coordinate system is undertaken through rotational matrix,R, and translational matrix, T.The translational matrix,T, is a 3D column, whereas the rotational matrix, R, is the total product of the rotation angle encompassing the X, Y, and Z axes:(10)Rxψ=1000cos⁡ψsin⁡ψ0-sin⁡ψcos⁡ψ,Ryφ=cos⁡φ0-sin⁡φ010sin⁡φ0cos⁡φ,Rzτ=cos⁡τsin⁡τ0-sin⁡τcos⁡τ0001,so that (11)R=cos⁡φcos⁡τcos⁡ψsin⁡τ+sin⁡ψsin⁡φcos⁡τsin⁡ψsin⁡τ-cos⁡ψsin⁡φcos⁡τ-cos⁡φsin⁡τcos⁡ψcos⁡τ-sin⁡ψsin⁡φsin⁡τsin⁡ψcos⁡τ+cos⁡ψsin⁡φsin⁡τsin⁡φ-sin⁡ψcos⁡φcos⁡ψcos⁡τ.When the camera imaging surface and road plane are parallel to one another,ψ=0 and φ=0, which simplifies (12)R=cos⁡τsin⁡τ0-sin⁡τcos⁡τ000cos⁡τ.Taking the first two columns ofR and T to form the 3 × 3 matrix from the previous section allows adoption of the simplified algorithm when R is equal or close to(13)cos⁡τsin⁡τ–-sin⁡τcos⁡τ–00–.


## 4.3.1. External Parameter Calibration Algorithm

Traffic scenes tend to involve planar calibration, such as a road or channel plane. It is assumed thatZ=0 for the world coordinates. Therefore, the pinhole model can be simplified to(4)μ′ν′1=Ar1sr2stsXY1,where μ′ν′1T and XY1T are the image coordinates after distortion correction and world coordinates, respectively. The internal parameter matrix, A, was calculated above. Therefore, solving the 3 × 3 matrix, r1/sr2/st/s, can provide transformation between world and pixel coordinates.There are nine unknown parameters in the matrix, with “1” providing a linear equation in homogeneous coordinates and four sets of coordinates providing eight linear equations. Therefore, equations can be obtained as exact solutions.Becauser1r2t is orthogonal, the constraints (5)r1s∗r2s=0,r1s=r2sare nonlinear equations that can be solved using the iterative method. Selecting reasonable initial values can greatly increase iterative speed. The initial value represents the solution of linear equations obtained by substituting four control points into the projection equation, which is relatively close to the real solution of the equation.Let(6)x1x4x7x2x5x8x3x6x9 signify the elements of r1/sr2/st/s; the constraints become(7)x12+x22+x32-x42-x52-x62=0,x1·x4+x2·x5+x3·x6=0.LetAx=b represent the overdetermined equations after adding constraints (7). Then (8)Sx1,…,x9=Ax-b2.The least squares method was used to convert (8) to statically determinate nonlinear equations:(9)∂S∂x1=0∂S∂x2=0⋮∂S∂x9=0.We may then apply a quadratic approximation of the Taylor expansion and solve the Jacobian matrix for each equation with Newton’s iteration method applied to the results.


## 4.3.2. Experimental Verification and Analysis

To validate the required number of calibration points for the proposed method and compare accuracy without adding constraints, the proximal and distal points of a known scene were selected as verification points (these two sets of points were not included in the solution of the parameter matrix). It is assumed that the world coordinates from field measurements and the pixel coordinates after distortion correction are the true values, and so the difference in calculated position relative to the true value was used to judge accuracy, as shown in Figure5.Figure 5
Calculated and true value for distal and proximal points.For small number of calibration points, distal point differences are larger than for proximal points. However, the differences tend to stabilize for seven or more calibration points without adding constraints, and only four points are needed when constraints are added. The difference does not approach zero except for certain values with increased measurement points. Given that multiple measurements reduce random error, this nonzero difference is systematic and arises mainly from internal matrix and distortion correction coefficient errors.


## 4.3.3. Simplified Aerial Shooting Calibration Algorithm

Measuring traffic parameters via UAV usually requires adoption of the horizontal downward viewing angle. However, when the camera imaging surface and road plane are parallel to one another, camera calibration can be simplified. Using the consistent ratio of image and world coordinates, length and speed parameters can be obtained quickly.Transforming between the world coordinate system and camera coordinate system is undertaken through rotational matrix,R, and translational matrix, T.The translational matrix,T, is a 3D column, whereas the rotational matrix, R, is the total product of the rotation angle encompassing the X, Y, and Z axes:(10)Rxψ=1000cos⁡ψsin⁡ψ0-sin⁡ψcos⁡ψ,Ryφ=cos⁡φ0-sin⁡φ010sin⁡φ0cos⁡φ,Rzτ=cos⁡τsin⁡τ0-sin⁡τcos⁡τ0001,so that (11)R=cos⁡φcos⁡τcos⁡ψsin⁡τ+sin⁡ψsin⁡φcos⁡τsin⁡ψsin⁡τ-cos⁡ψsin⁡φcos⁡τ-cos⁡φsin⁡τcos⁡ψcos⁡τ-sin⁡ψsin⁡φsin⁡τsin⁡ψcos⁡τ+cos⁡ψsin⁡φsin⁡τsin⁡φ-sin⁡ψcos⁡φcos⁡ψcos⁡τ.When the camera imaging surface and road plane are parallel to one another,ψ=0 and φ=0, which simplifies (12)R=cos⁡τsin⁡τ0-sin⁡τcos⁡τ000cos⁡τ.Taking the first two columns ofR and T to form the 3 × 3 matrix from the previous section allows adoption of the simplified algorithm when R is equal or close to(13)cos⁡τsin⁡τ–-sin⁡τcos⁡τ–00–.


## 4.4. Error Analysis of Simplified Algorithm

To verify the accuracy of the simplified method under horizontal downward angle conditions, we selected the same calibration object within a road environment from different heights. The calibration object was a crosswalk line 4 m in length. The UAV hovered to shoot for 1 min every 10 m from 0 to 100 m. Example images are shown in Figure6.Figure 6
Images of crosswalk line under horizontal downward angle conditions.The camera mode was 16 × 9 W 1080 p and the parameters werea=1920, b=1080, and α1=118.2. The light sensitive component size of the GoPro HERO3+ is 1/2.5 inches, with the corresponding size being 5.38 mm × 4.39 mm. Fifteen sets of independent experiments were conducted for each height, with outcomes as shown in Figure 7.Figure 7
Simplified algorithm calculations of the true value of crosswalk line images.The Kolmogorov-Smirnov method was used to verify whether the flight elevation data represented a normal distribution and set the significance level atp=0.05. Results indicate that the data represent a significant normal distribution. A two-tailed t-test was applied to verify that the results were equal to the true value at each flight elevation, with the significance level set at p=0.1.H0: Calculation results of simplified algorithm = the true value (4 m)H1: Calculation results of simplified algorithm ≠ the true value (4 m)From Figure7 and Table 2, the error scope can be controlled within 0.3 m at elevations 80–100 m. The simplified algorithm results represent the true value under 100 m with significance level p<0.1. The optical axis was not perpendicular to the road surface due to camera vibration and the length ratio of lower elevation images was larger. Therefore, the appropriate flight elevation is 100 m to obtain the best accuracy from the simplified algorithm.Table 2
One sample two-tailedt-test for each set of flight height data.
Flight elevation (m) Test value = 4.0 m t Df p (two-tailed) Mean difference 90% confidence interval of the difference Lower Upper 10 7.415 14 <0.001 0.820 0.625 1.015 20 10.242 14 <0.001 0.462 0.382 0.541 30 9.611 14 <0.001 0.374 0.305 0.442 40 19.976 14 <0.001 0.302 0.275 0.329 50 21.960 14 <0.001 0.281 0.259 0.304 60 11.252 14 <0.001 0.225 0.189 0.260 70 12.364 14 <0.001 0.195 0.167 0.223 80 3.093 14 0.008 0.063 0.027 0.099 90 3.126 14 0.007 0.058 0.0252 0.090 100 2.241 14 0.042 0.025 0.005 0.044


## 5. Practical Application

The proposed open data platform was applied to measure traffic parameters of the Shanghai inner ring expressway, which is an on-ramp located near Renaissance Park (Figure8). This section of the expressway suffers extreme traffic congestion during peak hours, causing a major bottleneck that frequently causes traffic backups and accidents. Many traffic engineering researchers are interested in studying the unique features and driving behaviors associated with this specific network but lack accurate, large scale data sets. One reason is a lack of convenient tall buildings enabling traffic parameter collection using traditional digital cameras.Figure 8
On-ramp located near Renaissance Park in Shanghai.Approximately 160 minutes of aerial video was collected during peak traffic hours from the UAV flying at 100 m. The extracted images covered 180 m of the road. Vehicle space-time trajectories were extracted after camera calibration using methods described in the previous section (Figure9(a)). Traffic volume, density, and speed were also gathered, as well as traffic parameters using the CA model. The lane (green backgrounds, Figure 9) is zoned into 28 cells (6 m/cell). Acceleration distribution characteristics were subsequently calculated (Figure 9(b)), followed by the proposed open data platform to verify, calibrate, and develop macroscopic, mesoscopic, and microscopic traffic models, which could be used to simulate and evaluate traffic strategies for the specific network.Figure 9
Traffic parameters collected by aerial video.
(a)
Vehicle space-time trajectories and cellular data (b)
Acceleration distribution characteristicsTo verify the quality characteristics of the recorded trajectories, another empirical study has been accomplished. We prepare a car equipped with high-precision GPS system (accuracy less than 0.3 m), which can be used to collect individual trajectory along with UAV video in peak hour condition (8:00–8:15) and free flow condition (10:00–10:15), respectively. Recording frequencies of the two modes are 10 Hz.Vehicle spatial-temporal trajectory, speed, and acceleration can be extracted from UAV video based on the proposed camera calibration method and the existing moving target tracking algorithm. The detailed procedures are as follows.(i)
In the first part, both intrinsic and external parameters of the camera should be calibrated by the proposed method.(ii)
Then the noise caused by the unavoidable motion of the aircraft in all six degrees of freedom during the hovering phase was eliminated (hovering accuracy of the aircraft: vertical: 0.8 m; horizontal: 2.5 m; angle: 0.03°). Stationary and moving features in the frames are detected, matched, and categorized by Scale Invariant Feature Transform (SIFT) [35]. Then the stationary features are used to calibrate model parameters and complete image registration [36].(iii)
Camshift algorithm is used to track moving target and a series of position coordinates are extracted [37].Resulting speed and acceleration profiles are shown in Figure10, respectively. The two curves of GPS data and UAV data are in good agreement under both peak hour condition and free flow condition.Figure 10
Speed (a, c) and acceleration (b, d) profiles of GPS and UAV in peak hour and free flow, respectively.
(a)
Speed profile in peak hour (b)
Acceleration profile in peak hour (c)
Speed profile in free flow (d)
Acceleration profile in free flowThe resulting frequency plot of relative errors under peak hour condition is shown in Figure11. The mean and standard deviation of relative error are 1.7049% and 3.7619%, respectively. And relative errors are far from being normally distributed. This is confirmed by the Normal Probability Plot in Figure 11(b), which reveals that the distribution of relative errors deviates from normality especially under 25%, which are the biggest outliers. The mean of relative errors is significantly different from zero (as confirmed by the t-test at the level of significance of 5%), which is symptom of a systematic error component. This may be caused by the errors of GPS system and a series of vehicle extracting algorithm. However, the collected traffic UAV video spatial-temporal data can satisfy microscopic details of traffic flow theory research under admissible error.Figure 11
Frequency plot of relative errors and Normal Probability Plot under peak hour condition.
(a)
Frequency plot of relative errors (b)
Normal Probability Plot


## 6. Conclusion

An open data platform for traffic parameter collection and traffic model verification and development was proposed incorporating multirotor UAV video, which can provide large scale, comprehensive pictures of 2D traffic situations. UAV video image processing is among the most attractive alternative new technologies, offering opportunities to perform substantially more complex tasks and provide precise, accurate, more extensive traffic parameters than other sensors. The UAV platform used for this study was a DJI PHANTOM 2+ with GoPro HERO3+ Black Edition camera.The camera parameter calibration and image distortion correction algorithms were developed for aerial shooting conditions to offer a reliable and accurate method for collecting spatial-temporal data for traffic model calibration. Using internal camera calibration, the LENZ model was employed to provide aerial video distortion correction. For external calibration, two sets of matrices were added to the constraints based on the orthogonal properties of the rotational and translational matrices. Compared to the traditional Zhang model, the proposed method requires only four fixed points to calculate matrices, which decreases the large workload associated with aerial calibration. A simplified algorithm was proposed to transform between the world and camera coordinate systems when the camera imaging surface and road plane are parallel. Experimental results verified that the simplified algorithm is highly accurate and an appropriate elevation for video collection was 100 m.Approximately 160 minutes of aerial video was collected during peak traffic hours on the Shanghai inner ring expressway using the proposed open data platform. Space-time trajectories of vehicles were extracted after camera calibration, as well as the macroscopic traffic flow parameters volume, density, and speed, and traffic parameters associated with the CA model. The empirical study by high-precision GPS system under peak hour condition and free flow condition can reveal the sufficiency and effectiveness of the data set to the microscopic details of traffic flow theory research.



---

*Source: 8324301-2017-01-29.xml*