# An Intelligent Measurement Method and System for Vehicle Passing Angles
## 3 Measurement Method
### Laser Odometry  
In this paper, laser odometry is calculated based on the 3D point cloud data obtained from the LIDAR, while visual odometry is calculated using feature points extracted from the 2D image. The odometry, which exhibits smoothness, is obtained from both of them.  
Laser odometry is computed by extracting and aligning feature points from each point cloud frame, following a similar approach as described in [21,22], where corner points and plane points are differentiated based on the point curvature for alignment. In this study, the feature point extraction has been improved to cater to the measurement task in this part.  
Outliers refer to sparse points located at a certain distance from the main structure of the point cloud. Outliers are typically caused by insufficient scanning coverage or noise, etc. During the extraction of corner points, outlier points can easily be detected as corner points by the computer. However, these outlier points do not accurately represent the structure of the scanned object and can introduce negative interference, affecting both the accuracy and precision of the alignment process. Therefore, it is necessary to remove outlier points in each frame during the feature extraction in our measurement task.  
Since the laser point cloud in a single frame is distributed along 16 laser lines, all points can be processed along these laser lines. In this section, for point cloud feature extraction and outlier points determination, a sliding window \(W\) is employed in each laser line. Each point is considered as the center point within the sliding window, and \(N\) adjacent points are selected for calculation.  
The constraint on the length of sliding window \(W\) is calculated as:  
\[r_{w}=\left|\arcsin(\frac{y_{N}}{\sqrt{x_{N}^{2}+y_{N}^{2}}}-\frac{y_{-N}}{ \sqrt{x_{-N}^{2}+y_{-N}^{2}}})\right| \tag{2}\]  
where \(r_{w}\) represents the length constraint of \(W\), which is the angle between the first and last points in the window in the LIDAR coordinate system \(L\).  
The width of \(W\) is limited to \(r_{w}<1/16\pi\), and any point that exceeds this limit will not be counted or processed.  
Figure 4: Schematic of the distortion of scanning point cloud: (**a**) motion distortion, (**b**) motion compensation.  
The average distance from the center point to the other points in \(W\) is calculated as:  
\[l_{a}=\frac{1}{2N}\sum\limits_{j=-N}^{N}l_{j} \tag{3}\]  
where  
\[l_{j}=\sqrt{\left(x_{0}^{W}-x_{j}^{W}\right)^{2}+\left(y_{0}^{W}-y_{j}^{W} \right)^{2}+\left(z_{0}^{W}-z_{j}^{W}\right)^{2}},j\in[-N,N] \tag{4}\]  
where \((x_{0}^{W},y_{0}^{W},z_{0}^{W})\) is the center point. Then, the StatisticalOutlierRemoval filter [31] is applied to remove outliers.  
The smoothness score for fast feature point extraction is also considered here. Different from the method in [21], the smoothness score is calculated simultaneously with the outlier points in the window to improve efficiency and eliminate outliers and unstable feature points that may cause interference. The smoothness score is defined as:  
\[c=\frac{\left\|\sum\limits_{j=-N}^{N}[(x_{j}^{W},y_{j}^{W},z_{j}^{W})-(x_{0}^{ W},y_{0}^{W},z_{0}^{W})]\right\|}{\left|W\right|\cdot\left\|(x_{0}^{W},y_{0}^{W},z_{0} ^{W})\right\|} \tag{5}\]  
The points for which \(c>\lambda_{c1}\) are considered corner feature points, and the points for which \(c<\lambda_{c2}\) are considered plane feature points, where \(\lambda_{c1}\) and \(\lambda_{c2}\) are the corner feature threshold and the plane feature threshold, respectively.  
The window used for outlier removal and feature extraction is constrained in such a way that allows the algorithm to avoid extracting points at the edge of structural fractures and outliers to some extent, as shown in Figure 5.  
Finally, the two-step alignment method by Levenberg-Marquardt [21] is used in our method to obtain the laser odometry.