5.2. Discussion of Influencing Factors and Countermeasures
Let us give a discussion of the influencing factors from the aspects of the characteristics mentioned in
Table 8: road category, number of lanes, weather and shooting angle, and the countermeasures of the proposed method.
Road category is a relatively important factor that has a certain influence on both vehicle detection and vehicle counting. Specifically, its influence on the results is mainly reflected in the complexity of the traffic environment and road environment. Compared with videos taken from the highways (
Figure 15,
Figure 16 and
Figure 17), the traffic environment and road environment of videos taken from urban roads (
Figure 18) and expressways (
Figure 19 and
Figure 20) are more complex, such as the higher proportion of large vehicles and more trees on both sides of the road. In the same way, videos taken from urban roads may contain more disadvantages than videos taken from expressways.
Therefore, it is not enough to carry out the experiment only on the highway. We also added three groups of experiments on urban roads and expressways. The influence of the road category could also be reflected in the experiment. As shown in
Table 15, the three benchmarks (Video I, Video II, and Video III), which were all taken from highways, achieved the highest accuracy. Although the accuracy of urban roads (Video IV) and expressways (Video V and Video VI) is not as good as that of the highway, it is not bad either.
The influence of lane number is mainly reflected in the vehicle count. To be specific, it basically shows the trend that the less lanes, the higher the accuracy of the results. This is mainly because vehicle counting is easily affected by vehicles driving side by side in different lanes. At the same time, as the number of lanes increases, drivers have more choices of roads to take, which makes it easier for drivers to engage in driving behaviors that do not strictly follow the designated lane lines. Therefore, the ability of a traditional ROI completely matching the lane is a little inadequate to deal with this situation. Additionally, this is one of the reasons that multiple loops were set on the road.
As shown in
Figure 21a, this is a vehicle driving right on the middle of
and
. If only four traditional primary loops were set, the counting for this vehicle may be problematic. To be specific, with stricter thresholds,
and
are not activated and this vehicle is missed. If looser thresholds are set, the
and
are activated at the same time and this vehicle is counted repeatedly. However, with the multiple loops and counting strategy designed in this study, this vehicle is only counted once on
, regardless of the strict threshold or the loose threshold, as shown in
Table 19.
The influence of lane number could be also reflected in the experimental results. As shown in
Table 15, Video III, with only two lanes, achieved the highest accuracy. However, for Video V and Video VI, they only contain three lanes but the experimental results are not as good as Video I and Video II, which contain four lanes. One of the reasons is that Video I and Video II were shot on the highway with a simpler environment, but the setting of multiple loops also helped to greatly improve the accuracy of the experimental results.
Moreover, in terms of where the lane is on the road, errors are more likely to occur in the median lane and its adjacent lanes. For example, errors all occurred in the two median lanes (
and
) in Video I (
Table 9), while errors all occurred in its median lane (
) in Video VI (
Table 14). Of course, this also has to do with the general tendency of drivers to drive in the median lane, which further increases the chance of errors. While in Video II, Video IV, and Video V, errors not only occurred in the median lane but also occurred in its adjacent lane. This is especially evident in Video V. As shown in
Table 13, two errors occurred in
and three errors occurred in
. This is mainly due to the phenomenon of vehicles driving side by side on different lanes affecting the vehicle count. At the same time, vehicles not only tend to drive in
but also tend to drive in
, which is also a factor. This could be seen in the number of vehicles. As shown in
Table 13, the number of vehicles that should be counted (
) in
is 123, while the
number in
is 116, which is also a reflection of the propensity of the driving behavior for drivers. Therefore, compared with the lanes on both sides of the road, the counting strategies proposed in
Section 3.2.4 set for the middle lane are also more complex.
Weather mainly affects vehicle detection. A video shot in sunny weather is brighter in color. Therefore, the detection algorithm in RGB mode proposed in this study has better ability to repair vehicle holes. In addition, compared with a sunny day, a cloudy day contains more undesirable factors, such as changes in the lighting environment caused by the influence of clouds. As shown in
Table 15, the three videos taken on sunny days (Video I, Video III, and Video V) have better performance overall than those taken on cloudy days (Video II, Video IV, and Video VI).
As for the shooting angle, it mainly affects vehicle counting, and it is due to the distortion of the image caused by perspective. The imaging principle of the camera is pinhole imaging. As a result, the view of the camera on the road and the vehicle usually produce a certain distortion. In general, the more oblique the shooting angle, the more severe the distortion. As shown in
Figure 16, the projection of vehicle driving on
was tilted to the left, while the projection of vehicle driving on
was tilted to the right. This phenomenon is most obvious when the vehicles were shot from the side. As shown in
Figure 19 and
Figure 20, the projection of vehicle was tilted to the right by very much.
If only the primary loops were set, there may be some errors in counting. However, with the help of the secondary loops, the counting was not greatly affected by the shooting angle. The experimental results also prove that the multi-loop setup works well against this adverse effect, as shown in
Table 15.
5.3. Analysis of Limitations of the Proposed Method
Benefiting from vehicle detection under two color modes and the setting with multiple loops, the counting accuracy of vehicles greatly improved, but there are still some false results. There are two types of counting errors, namely missed counting () and redundant counting (). We start from these two aspects to analyze the causes of the errors and the limitations of the proposed method.
Incomplete vehicle detection and unreasonable ROI settings could both lead to the generation of missed counting, while redundant counting is mainly caused by unreasonable ROI settings. Therefore, in previous studies, a reduction in counting accuracy was mainly due to errors missing counts. Benefiting from vehicle detection under two color modes and the setting with multiple loops proposed in this paper, the number of errors due to missing counts was greatly reduced and the counting accuracy significantly improved. However, as shown in
Table 15, there are still a small number of missing counts (
) in the experiments, which is mainly affected by incomplete detection of the vehicle and has little to do with the setting with multiple loops. Here is an example. As shown in
Figure 22a, the color of the incomplete part is very similar to the color of the road background. Therefore, it is difficult to separate them no matter whether under gray mode or RGB mode, resulting in incomplete vehicle detection. As a result, no matter using the primary loops or the secondary loops, this vehicle does not meet the activation conditions, leading to a missed count.
The error of redundant counting mainly occurs for large vehicles, that is, counting are carried out simultaneously in two adjacent lanes. As shown in
Figure 23a, this large vehicle spanned two lanes, so it was counted both in
and
, resulting in redundant counting. This phenomenon could also be proven by the experimental results. As shown in
Table 15, the error of redundant counting (
) is more likely to occur in Video IV, Video V, and Video VI, mainly because the proportion of large vehicles on urban roads and expressways is higher than on highways.