An Improved Stereo Matching Algorithm for Vehicle Speed Measurement System Based on Spatial and Temporal Image Fusion

This paper proposes an improved stereo matching algorithm for vehicle speed measurement system based on spatial and temporal image fusion (STIF). Firstly, the matching point pairs in the license plate area with obviously abnormal distance to the camera are roughly removed according to the characteristic of license plate specification. Secondly, more mismatching point pairs are finely removed according to local neighborhood consistency constraint (LNCC). Thirdly, the optimum speed measurement point pairs are selected for successive stereo frame pairs by STIF of binocular stereo video, so that the 3D points corresponding to the matching point pairs for speed measurement in the successive stereo frame pairs are in the same position on the real vehicle, which can significantly improve the vehicle speed measurement accuracy. LNCC and STIF can be used not only for license plate, but also for vehicle logo, light, mirror etc. Experimental results demonstrate that the vehicle speed measurement system with the proposed LNCC+STIF stereo matching algorithm can significantly outperform the state-of-the-art system in accuracy.


Introduction
Intelligent traffic surveillance is an important part of the intelligent transportation system. Intelligent traffic surveillance has provided vehicle speed measurement, traffic violation management, autonomous driving assistance, vehicle counting and classification [1][2][3][4]. Vehicle speed measurement plays an important role in intelligent traffic surveillance. Vehicle speed measurement methods can be divided into two groups: traditional speed measurement methods and video-based speed measurement methods [5,6]. Traditional speed measurement methods include induction loop speed measurement [7], ultrasonic sensor speed measurement [8], infrared sensor speed measurement [9], radar speed measurement [10]. For the induction loop method, the average speed is obtained by calculating the time interval the vehicle passes the two sensors with a fixed distance. The sensors need to be embedded beneath the road surface, and the installation and maintenance are complicated. For the other three methods, i.e., ultrasonic sensor, infrared sensor and radar, the speed are all calculated based on certain characteristics of the transmitted and received signals. However, these devices are easy to be detected due to the transmitted signals, which is undesirable for secret measurement. Video-based speed measurement has gained more and more attention because of its low cost, easy concealment and convenient combination of vehicle speed and vehicle information [11][12][13][14][15]. According to the video acquisition way, video-based methods can be further divided into two main categories: two-dimensional (2D) video-based method and three-dimensional (3D) video-based method.
The methods in [11,12] belong to 2D video-based speed measurement method. A vehicle speed measurement method based on pinhole imaging projection model combining frame difference with edge detection is proposed in [11]. The method in [12] is an improved version of the method in [11], which uses the shape-from-template technology to make the projection model more accurate and further improve the speed measurement accuracy. Nevertheless, the methods in [11,12] both utilize the principle of pinhole imaging, which is only suitable for speed measurement scenarios with vehicle traveling in a straight line. Moreover, the vehicle displacement calculated according to the plane projection relation is not accurate enough.
The methods in [13][14][15] belong to 3D video-based speed measurement method. A vehicle speed measurement method based on traditional object detection with image processing is proposed in [13], in which the vehicle target is detected by background subtraction. Speeded-up robust features (SURF) matching is performed on the vehicle target detected in the left and right view images, and the vehicle speed is estimated with the depth map. A vehicle plate speed measurement method based on WaldBoost classifier object detection is proposed in [14]. The vehicle plate is detected according to the local binary pattern (LBP) feature, stereo matching and 3D ranging are performed, hence the vehicle speed is calculated. A vehicle speed measurement method based on modern Convolutional Neural Network (CNN) object detection is proposed in [15]. An improved single shot multibox detector (SSD) network is used to detect the license plate, stereo matching and 3D ranging are performed, and the vehicle speed is calculated. This system cannot only secretly measure the speed of multiple vehicles traveling in multiple directions on multiple lanes, but also measure the speed of a vehicle in a curved or straight motion. Moreover, it can combine the vehicle speed measurement result with the vehicle characteristic. However, in the existing 3D video-based speed measurement methods, the optimization is mainly carried out on the object detection algorithm of the system, and the optimization is rarely carried out on the matching algorithm. The speed measurement accuracy of the system can be further improved.
The vehicle speed measurement method proposed in [15] is composed of three parts: vehicle characteristic detection, stereo matching and speed measurement. In the stereo matching process, a homography matrix is firstly used to remove the mismatching point pairs from the matching point pair set obtained by SURF. Then, a circular area is selected, respectively, as the constraint in the left-view and right-view images, with the center of the license plate as the center and the height of the license plate as the diameter. Only the matching point pairs that exist in both the left-view and the right-view circular areas are retained, and other matching point pairs are removed, by which the size of the matching point pair set is further reduced and the measurement efficiency is improved. Finally, the matching point pair closest to the license plate center is selected from the retained matching point pair set to represent the current vehicle position. In the process of calculating the homography matrix, four matching point pairs are randomly selected to perform the calculation. However, since the matching point pair set contains both correct matching and wrong mismatching point pairs, the error of the matrix would be very large if mismatching point pair exists in the four randomly selected matching point pairs, which will reduce the accuracy of speed measurement. Moreover, in the process of selecting the matching point pair closest to the center of the license plate as the measurement point, the matching point pairs selected in the consecutive frames may not correspond to the same position on the license plate, which will also reduce the accuracy of speed measurement due to the position difference of the measurement point.
In this paper, an improved stereo matching algorithm for the binocular stereovisionbased vehicle speed measurement system in [15] is proposed. Firstly, the characteristic of license plate specification is transformed into a relationship between the pixel ratio of the license plate area in the image and the distance of the license plate to the camera. The matching point pairs with obviously abnormal distance to the camera are roughly removed from the matching point pair set obtained by SURF algorithm in the license plate area according to this relationship. Then, the mismatching point pairs are finely removed from the matching point pair set according to the LNCC, so as to further reduce the size of the matching point pair set. Finally, the best speed measurement point pair is selected by STIF of binocular stereo video. The matching point set obtained by SURF matching and LNCC mismatching removal on two consecutive left-view frames is taken as the temporal consistency constraint (TCC), so that the speed measurement point pairs in the consecutive frames correspond to the same position on the license plate. The two matching point sets, respectively, obtained by SURF matching and LNCC mismatching removal on the two consecutive stereo frame pairs are taken as the spatial consistency constraint (SCC), from which the two consecutive speed measurement point pairs are chosen. If the two points of a TCC matching point pair are, respectively, in the two consecutive SCC matching point sets, the corresponding SCC matching point pair is retained in a STIF matching point set. The STIF matching point pair closest to the center of the license plate is selected as the best speed measurement point. The proposed algorithm can significantly improve the accuracy of the license plate-based vehicle speed measurement system in [15]. In addition, the proposed stereo matching algorithm can be extended to other characteristics of the vehicle, such as logo, light and mirror, thus can also improve the accuracy of the optimized multi-characteristic-based vehicle speed measurement system.
The rest of the paper is organized as follows. In Section 2, we review some related works on matching. In Section 3, we propose an LNCC+STIF stereo matching optimization algorithm. In Section 4, we report the experimental setup and results. In Section 5, we make a conclusion.

Related Works
Image matching aims to identify the same or similar structure from two or more images. Image matching is widely used in computer vision [16], pattern recognition [17], medical image analysis [18], etc. It is the basis of image fusion [19,20]. Image matching methods can be divided into two categories: region-based methods and feature-based methods [21,22]. For the region-based methods, such as correlation-like method [23], Fourier method [24], and mutual information method [25], the image saliency information is provided by pixel intensity [26], which is neither suitable for image with few salient details, nor insusceptible to image distortion and illumination change. For the featurebased methods, salient features, such as points, lines and surfaces, are firstly extracted from the images, which are then used to achieve image matching. The extracted features cannot only represent the image structure better, but also reduce the impact of image quality reduction [27].
In the feature-based matching method, image matching can be classified into direct matching and indirect matching [28]. For direct matching, the correspondence between two given feature sets is established by direct utilization of spatial geometric relationship [29,30]. For indirect matching, the matching task is decomposed into two stages: (1) A matching point set is constructed by calculating the similarity between descriptors. Lowe [31] proposes a scale-invariant feature transform (SIFT) descriptor based on distance ratio, but with slow speed and heavy calculation burden. SURF [32] is an accelerated version of SIFT. However, mismatching will inevitably occur when constructing the matching point set by local features [33,34]. (2). Mismatching points are removed from the matching point set by additional constraints. Mismatching removal methods can be divided into three categories: resampling-based, non-parametric model-based and learning-based.
Resampling-based methods are widely used for automatic matching of remote sensing images [35]. Random sample consensus (RANSAC) is a classic resampling-based method, with several variants such as maximum likelihood estimation sample consensus [36] and progressive sample consensus [37]. These methods use a hypothesis-verification strategy. A hypothesis subset is selected to estimate the parametric model and the smallest non-outlier subset is obtained by repeated resampling. The resampling-based method relies on the preselected parametric model. The efficiency of the model is reduced when the image transformation is non-rigid. When the proportion of outliers in the matching set becomes large, the performance of these methods will degrade seriously [38]. Non-parametric model-based methods introduce more prior knowledge, such as motion consistency, and can handle degraded scenes. Different deformation function can be used to establish different models for different transformation. In [39,40], an estimator is used to model the deformation function. In [41,42], a guided locality preservation matching method is proposed to process the matching set with a large proportion of outliers, which only preserves the neighborhood structure of the potential correct matching between two images. Ma et al. converted the mismatching removal problem into a spatial clustering problem with outliers [43]. The initial matching set is divided into several clusters with motion consistency and one cluster with outliers. The matching performance in the case of serious data degradation is improved by iterative clustering strategy.
Learning-based methods are often used to extract and represent features. Learningbased matching can be divided into image-based learning and point-based learning. Imagebased learning can be directly applied without detecting any salient image structures in advance [44]. Point-based learning is inclined to perform matching on the extracted point set [45]. Ma et al. converted the mismatching removal problem into a two-class classification problem. The classifier is trained based on a general match representation associated with each putative match through exploiting the consensus of local neighborhood structures based on a multiple K-nearest neighbors strategy [46].

Proposed Method
An improved stereo matching algorithm for the binocular stereovision-based vehicle speed measurement system in [15] is proposed in this paper. The proposed algorithm consists of two stages: mismatching removal optimization for vehicle characteristics, and best vehicle speed measurement point selection optimization.
The process of stereo matching in [15] can be divided into three steps: SURF matching in the detected local characteristic regions, mismatching removal, and speed measurement point selection. The flowchart is shown in Figure 1.  In the SURF matching process, only feature points in the license plate regions of the left-view and right-view images are matched in [15]. Not only the number of matching calculations is reduced, but also the interference from the feature points outside the license plate regions is avoided. Thus, the SURF matching in the local characteristic regions in [15] is reused in this paper.
In the mismatching removal process, the speed measurement system in [15] uses a homography matrix to eliminate mismatching point pairs from the matching point pair set obtained by the SURF matching. The homography matrix is calculated by randomly selecting four matching point pairs. However, the matching point pair set contains both correct matching and wrong mismatching point pairs. If mismatching point pair exists in the four selected matching point pairs, the error of the calculated matrix will be large, which will affect the accuracy of speed measurement. In this paper, the relationship between the pixel ratio of the license plate region in the image and the distance of the license plate to camera is fitted according to the characteristic of license plate specification. With this relationship, the matching point pairs with obviously abnormal distance to the camera are roughly removed from the matching point pair set obtained by SURF matching in the license plate regions. LNCC aims to preserve the potential local neighborhood structure of the correct matching. Therefore, more mismatching point pairs are finely removed from the matching point pair set in the license plate regions by LNCC. LNCC can also be used to remove mismatching point pairs from the matching point pair sets in the logo, light, and mirror regions, respectively.
In the speed measurement point selection process, the matching point pair closest to the center of the license plate is selected to represent the current vehicle position [15]. Nevertheless, there is no guarantee that the matching point pairs selected in the consecutive frames are at the same spatial location on the license plate. The spatial location difference between the speed measurement points will also reduce the speed measurement accuracy. In this paper, the best speed measurement points in the stereo video are selected by STIF. SURF matching is performed on two consecutive left-view frames and LNCC is used to remove the mismatching point pairs. The matching point pair set obtained on two consecutive left-view frames is taken as TCC, so that the speed measurement points selected from the consecutive frames are at the same spatial location on the license plate. SURF matching is performed on the left-view and right-view stereo images and LNCC is used to remove the mismatching point pairs. The matching point pair set obtained on the stereo images is taken as SCC. If the two points of a TCC matching point pair are, respectively, in the two consecutive SCC matching point sets, the corresponding SCC matching point pair is retained in a STIF matching point set. The STIF matching point pair closest to the center of the license plate is selected as the optimum speed measurement point.

Mismatching Removal Based on License Plate Specification Constraint (LPSC)
The license plate specification is settled by the vehicle management department, including the strict regulations on the size, color and content of license plates [47]. For the car used in the experiments of this paper, the size of the license plate is fixed, i.e., 440 mm × 140 mm. The closer the vehicle is to the camera, the larger the pixel ratio of the license plate region in the image.
A matching point pair set S = {(p li , p ri )} N i=1 is obtained by SURF matching on stereo image pair, wherein, p li represents the left-view matching point and p ri represents the right-view matching point. Mismatching point pairs exist in the set S and need to be removed. Since the license plate size is fixed, the relationship between the pixel ratio of the license plate region in the image and the distance of the license plate to camera is fitted. The matching point pairs with obviously abnormal distance to the camera are roughly removed from the set S according to this relationship.
The speed measurement range, that is, the distance between the vehicle and the camera is set to 1-15 m. The pixel ratio of the license plate in the image is calculated every 0.5 m, as shown in Table 1. When the distance is 15 m, the smallest ratio is 0.0416%. When the distance is 1m, the largest ratio is 8.1130%. To find the relationship between the pixel ratio of the license plate region in the image and the distance of the license plate to camera, two types of fitting function can be used: polynomial and power. The fitting effect can be evaluated with four parameters: RMSE, SSE, R-square, and Adj R-sq. RMSE represents the difference between the predicted value and the true value. The smaller the RMSE, the better the fitting effect [48]. The performance comparison of four fitting functions is shown in Table 2: Polynomial-7, Polynomial-8, Power-1, and Power-2. The fitting curves of the four fitting functions are shown in Figure 2.  In Figure 2, the hollow circle represents the actual measured data. The blue dotted line represents the fitting curve by Polynomial-7. The black dotted line represents the fitting curve by Polynomial-8. The red solid line represents the fitting curve by Power-1. The green dot-dash line represents the fitting curve by Power-2. The fitting curves by Polynomial-7 and Polynomial-8 is over-fitting, and thus are discarded. The fitting curves by Power-1 and Power-2 are similar, of good fitting effect. The R-square and Adj R-sq parameters of Power-1 and Power-2 are the same, while the SSE and RMSE parameters of Power-2 are smaller than that of Power-1. Therefore, the Power-2 function with better fitting performance is chosen to fit the relationship between the pixel ratio of the license plate region in the image and the distance of the license plate to camera, as shown in Equation (1): wherein, r represents the pixel ratio of the license plate region in the image, and d represents the distance between the license plate and the camera. When the measurement range is no more than 15 m, the ranging error is no more than 3% [49], which can be used as a mismatching removal condition. If Equation (2) is not met, the matching point pair is removed: wherein, d match represents the distance from the matching point to the camera calculated by Zhengyou Zhang's camera calibration method [50], and d represents the distance from the license plate to the camera calculated by the fitting function in Equation (1). Table 3 shows the comparison of matching point pair number with and without LPSC-based mismatching removal. With LPSC, the number of matching point pairs is significantly reduced. However, mismatching point pairs still exist in the reserved matching point pair set with LPSC, as shown in Figure 3. The green solid line represents the correct matching point pair. The red dashed line represents the wrong mismatching point pair. Several mismatching point pairs still exist and need to be further removed.

Mismatching Removal Based on LNCC
For license plate, mismatching point pairs still exist after SURF with LPSC. For logo, light and mirror, mismatching point pairs also exist after SURF. LNCC is used to further remove more mismatching point pairs, which aims to preserve the potential local neighborhood structure of the correct matching point pairs.
For the matching point pair (p li , p ri ), other n pairs of matching point (n = 3) located in both the neighborhood N p li of p li and the neighborhood N p ri of p ri are selected. Neighborhood N p li and N p ri are, respectively, composed of 5 neighbors with the nearest Euclidean distance in the corresponding point sets of p li and p ri . As shown in Figure 4, the matching point pair (p li , p ri ) is converted into a displacement vector m i , with the starting point and ending point of m i corresponding to the right-view and left-view matching point p li and p ri , i.e., m i = p ri − p li . The difference between m i and other m j in its neighborhood is calculated to judge the neighborhood consistency, i = j. Figure 4a shows an exemplary neighborhood consistency diagram of a correct matching point pair (p li , p ri ), wherein m i and m j are in the same direction and of the same length. Figure 4b shows an exemplary neighborhood inconsistency diagram of a wrong matching point pair (p li , p ri ), wherein m i and m j are in different directions and of different lengths.
The neighborhood consistency index between m i and m j is defined by Equation (3): wherein (·, ·) represents the inner product operation of two vectors, | · | represents the modulus operation of a vector, max{·, ·} represents the maximization operation, and min{·, ·} represents the minimization operation. C m i , m j ∈ [−1, 1], and C m i , m j = 1 correspond to the highest the neighborhood consistency. The number of matching point pairs whose C m i , m j is close to 1 is defined as n C , n C ≤ n. If n C = 3, m i is consistent with three m j in its neighborhood, then m i is judged to be a correct matching point and retained. If n C = 2, m i is consistent with two m j in its neighborhood and inconsistent with the other one m j in its neighborhood, then m i is also judged to be a correct matching point and retained. If n C = 1, m i is consistent with one m j in its neighborhood and inconsistent with the other two m j in its neighborhood, then m i is temporarily retained and judged again in the second iteration. If n C = 0, m i is inconsistent with three m j in its neighborhood, then m i is judged to be a wrong mismatching point and removed. Table 4 shows the comparison of matching point pair number with and without LNCCbased mismatching removal for license plate, logo, light and mirror, respectively. With LNCC, the number of matching point pairs for each vehicle characteristic is significantly reduced. Exemplary matching results with LNCC-based mismatching removal for license plate, logo, light and mirror are, respectively, shown in Figure 5. The solid green line represents the correct matching point pair.

Speed Measurement Point Selection Based on STIF of Binocular Stereo Video
For the vehicle speed measurement, not all the correct matching point pairs are needed, and only one optimum matching point pair needs to be selected from the matching point pair set obtained by SURF with LPSC and LNCC. In [15], the matching point pair closest to the license plate center is selected to represent the vehicle position in the current frame. However, this selection method cannot guarantee that the matching point pairs selected in two consecutive frames are at the same spatial position on the license plate. The spatial position difference between the speed measurement points will also cause speed measurement accuracy reduction. In this paper, a STIF-based speed measurement point selection method is proposed, which constructs a smaller matching point pair set with SCC and TCC, from which the speed measurement point is selected. Figure 6 shows an exemplary result of speed measurement point selection by the method in [15]. In Figure 6, O pre, − l is the center of the bounding box in the previous left-view frame, O cur − l is the center of the bounding box in the current left-view frame, A l and A r are the selected speed measurement point pair in the previous stereo frames, B l and B r are the selected speed measurement point pair in the current stereo frames. The corresponding 3D speed measurement points A and B are obviously not on the same position of the vehicle, hence the displacement between A and B is not accurate for speed measurement.   [51]. Each column is a stereo image pair, with spatial correlation. Thus, stereo video sequence contains both spatial and temporal information, which should be fused to achieve more accurate speed measurement [52][53][54].

left-view right-view
The matching point pair set S spa of the previous stereo frame pair is denoted as . The matching point pair set obtained by SURF matching with LNCC-based mismatching removal on the previous and current left-view frames . If p l − cur − k in the temporal matching point pair p l − cur − k , p l − pre − k is equal to p cur − l − i in the current spatial matching point pair is equal to p pre − l − j in the previous spatial matching point pair p pre − l − j , p pre − r − j , that is, then it can be judged that (p cur_l_i , p cur_r_i ) and p pre_l_j , p pre_r_j satisfy both SCC and TCC. All current (p cur_l_i , p cur_r_i ) satisfying both SCC and TCC are placed in a new smaller matching point set S spa_temp = {(p cur_l_m , p cur_r_m )} M 3 m=1 , S spa_temp ⊂ S cur_spa . According to Equation (4), the distance d m between the left-view matching point p cur_l_m (x cur_l_m , y cur_l_m ) and the left-view bounding box center O cur_l (x cur_l , y cur_l ) for each matching point pair in the set S spa_temp is calculated: The matching point pair with the minimum d m is selected as the optimum speed measurement point p cur_l_m opt , p cur_r_m opt for the current stereo frame pair: Algorithm 1 describes the optimum speed measurement point selection process based on STIF. Figure 8 shows an exemplary result of speed measurement point selection by the proposed STIF-based method. The corresponding 3D speed measurement points p pre and p cur are on the same position of the vehicle, hence the displacement between p pre and p cur is more accurate for speed measurement.

Algorithm 1 Optimum speed measurement point selection based on STIF.
O cur_l (x cur_l , y cur_l ) Output: p cur_l_m opt , p cur_r_m opt 1: function Optimum speed measurement point selection 2: for k = 1 to T do 3: take p l_cur_k , p l_pre_k ∈S temp  Table 5 shows the comparison of information entropy (IE) and normalized mutual information (NMI) with different constraints for license plate, logo, light and mirror, respectively. IE is used to measure the uncertainty of the matching point sets. The smaller the IE, the less the uncertainty. NMI is used to measure the similarity between the left-view and right-view matching point sets. The closer the NMI is to 1, the higher the similarity is, and the more accurate the matching point pair is. With LPSC, the IE of the left-view and right-view matching point sets is reduced, while the NMI thereof is increased. With LNCC, the IE of the left-view and right-view matching point sets is further reduced, while the NMI thereof is further increased. With STIF, the IE of the left-view and right-view matching point sets is even more reduced, while the NMI thereof is even more increased. The IE decreases and the NMI increases gradually with the increase of constraints, which indicates that the matching point pairs in the sets are becoming more accurate from the perspective of information entropy.

Experiments
In a practical vehicle speed measurement test, a fixed binocular stereo camera is set to capture images at a frame rate of 30 fps, and the vehicle speed is measured ten times per second. The speed data measured by GPS satellite speedometer is used as the ground truth for comparison. The vehicle drives towards the camera in a straight line at a constant speed. Six groups of experiments are conducted with different vehicle speed, i.e., 32 km/h, 36 km/h, 38 km/h, 43 km/h, 45 km/h and 46 km/h. For the captured stereo video of each experiment, the stereo matching algorithm in [15], the proposed LNCC stereo matching algorithm and the proposed LNCC+STIF stereo matching algorithm are, respectively, used to measure the vehicle speed, and the measured speed, error, root-meansquare error (RMSE), maximum absolute error (MAE) and maximum absolute error rate (MAER) of the three algorithms compared together. The algorithms are verified from three aspects: speed measurement results based on license plate, speed measurement results based on other separate vehicle characteristic, and speed measurement result based on multi-characteristic combination. Finally, the vehicle multi-characteristic combinationbased speed measurement result by LNCC+STIF algorithm is compared with other speed measurement algorithms.

Speed Measurement Results Based on License Plate
First, the vehicle speed is measured using the license plate. Figure 9 shows the speed measurement result curve based on a license plate at a vehicle speed of 32 km/h. The black solid line represents the ground truth of vehicle speed measured by the satellite, the green dotted line with hollow circle represents the vehicle speed measurement results measured by the stereo matching algorithm in [15], the blue dotted line with cross represents the vehicle speed measurement results measured by the proposed LNCC stereo matching algorithm, and the red dotted line with solid circle represents the vehicle speed measurement results measured by the proposed LNCC+STIF stereo matching algorithm. As it can be seen from Figure 9, the vehicle speed measurement results based on license plate measured by the proposed LNCC+STIF stereo matching algorithm are closer to the ground truth speeds, with smaller fluctuations.  Table 6 shows the detailed speed measurement results based on license plate by the three algorithms at a vehicle speed of 32 km/h. The RMSE of the speeds measured by the stereo matching algorithm in [15], the LNCC stereo matching algorithm, the LNCC+STIF stereo matching algorithm is 0.87 km/h, 0.70 km/h and 0.62 km/h, respectively. The MAE of the speeds measured by the three algorithms is 1.47 km/h, 1.18 km/h and 0.89 km/h, respectively. The MAER of the speeds measured by the three algorithms is 4.53%, 3.63% and 2.75%, respectively. More experiments are carried out for the speed measurement by license plate. Table 7 shows the experimental error results at a vehicle speed of 36 km/h, 38 km/h, 43 km/h, 45 km/h and 46 km/h. As can be seen from Tables 6 and 7, the speed measurement error results based on license plate by the three algorithms do not exceed the 6% error rate limit specified by the China national standard GB/T21255-2007 [55]. However, the speed measurement results based on license plate by the LNCC+STIF stereo matching algorithm have the least RMSE, MAE and MAER of the three. Therefore, the LNCC+STIF stereo matching algorithm effectively reduces the speed measurement error by license plate and enhances the measurement accuracy thereof. Figure 10a-c show the RMSE curve, the MAE curve and the MAER curve of the three algorithms, respectively. The curves uniformly show a descending trend.

Speed Measurement Results Based on Other Separate Vehicle Characteristic
Then, the vehicle speed is measured using other separate vehicle characteristics, i.e., logo, light and mirror. Table 8 shows the speed measurement error results based on logo, light and mirror by the three algorithms at a vehicle speed of 32 km/h. The RMSE of the logo-based speeds measured by the stereo matching algorithm in [15] More experiments are carried out for the speed measurement by logo, light and mirror. Table 9 shows the experimental results at a vehicle speed of 36 km/h, 38 km/h, 43 km/h, 45 km/h and 46 km/h. As can be seen from Tables 8 and 9, the speed measurement results based on logo and light by the three algorithms do not exceed the 6% error rate limit specified by the China national standard GB/T21255-2007 [55], but the speed measurement results based on mirror by the three algorithms are quite different. The mirror-based error rate by the stereo matching algorithm in [15] is much higher than the 6% error rate limit. The mirror-based error rate by the LNCC stereo matching algorithm also exceeds the 6% error rate limit. Only the mirror-based error rate by the LNCC+STIF stereo matching algorithm with the least RMSE, MAE and MAER satisfies the 6% error rate limit. Therefore, the LNCC+STIF stereo matching algorithm effectively reduces the speed measurement error by logo, light and mirror, and enhances the measurement accuracy thereof.

Speed Measurement Results Based on Multi-Characteristic Combination
Finally, to further reduce the error based on single-characteristic, the speed measurement results of license plate, logo, light and mirror by the proposed LNCC+STIF stereo matching algorithm are averaged as the final speed measurement results based on multi-characteristic combination. Figure 11 shows the speed measurement result curve by the proposed LNCC+STIF stereo matching algorithm at a vehicle speed of 32 km/h and 36 km/h, respectively. The black solid line with square represents the ground truth of vehicle speed measured by the satellite, the red solid line with circle represents the average speed results, the green dotted line with a hollow circle represents the speed results based on license plate, the blue dotted line with cross represents the speed results based on logo, the green dotted line with triangle represents the speed results based on light, and the purple dotted line with diamond represents the speed results based on mirror. As it can be seen from Figure 11a,b, the vehicle speed measurement results based on multi-characteristic combination measured by the proposed LNCC+STIF stereo matching algorithm are closer to the ground truth speeds, with smaller fluctuations.   Tables 10 and 11, the speed measurement error results based on license plate, logo, light, mirror and average by the proposed LNCC+STIF algorithm do not exceed the 6% error rate limit. However, the speed measurement results based on average have the least RMSE, MAE and MAER of the five. Therefore, the LNCC+STIF stereo matching algorithm based on average effectively reduces the speed measurement error and enhances the measurement accuracy, which is chosen as the optimum stereo matching algorithm for the vehicle speed measurement system. Meanwhile, the speed measurement performances are compared between the system with the proposed optimum stereo matching algorithm and the various existing speed measurement systems. Table 12 shows a comparison of the speed measurement error results between the proposed system and the other four systems. The systems in [11,56] are 2D video-based speed measurement which are only suitable for measuring the speed of vehicle traveling in a straight line and are not accurate enough. The systems in [13,15] are 3D video-based speed measurement, which are suitable for measuring the speed of vehicle traveling in a straight or curved line. However, the stereo matching in [13,15] is simple and rough, which may lead to inaccurate speed measurement as well. The proposed system improves the stereo matching with LNCC and STIF, which results in more accurate speed measurement. It can be seen that the RMSE of the proposed system is smaller than that of the other four systems, and the maximum error is also smaller than that of the other four systems. Therefore, the speed measurement accuracy of the proposed system is superior to that of the other four systems, that is, the speed measurement accuracy of the system is improved.

Conclusions
In this study, we improved the stereo matching algorithm for vehicle speed measurement system based on binocular stereovision. We first proposed a mismatching removal algorithm based on LPSC for the license plate. We then proposed a mismatching removal algorithm based on LNCC for multiple characteristics of the vehicle. We finally proposed a speed measurement point selection algorithm based on STIF. We combined LNCC with STIF to further improve the stereo matching algorithm. Vehicle speed measurement experiments were carried out by three stereo matching algorithms and the results were compared, based on license plate and other separate vehicle characteristic, respectively. Experimental results demonstrate that the proposed LNCC+STIF stereo matching algorithm can efficiently enhance the speed measurement accuracy. Vehicle speed measurement experiments based on license plate, logo, light, mirror and average were also carried out by the proposed LNCC+STIF stereo matching algorithm. Experimental results demonstrate that the proposed LNCC+STIF stereo matching algorithm based on average can further improve the speed measurement accuracy. Performance comparisons were made between the system with the proposed optimum stereo matching algorithm and the various existing speed measurement systems, which demonstrates that the vehicle speed measurement system with the proposed optimum stereo matching algorithm can significantly outperform the state-of-the-art system in accuracy.