# A Method for Efficient Quality Control and Enhancement of Mobile Laser Scanning Data
## 3 Methodology
### Optimization  
After profile extraction, we can identify \(M\) and \(R\) as a set of matrices, i.e., \(R=\{\mathbf{R_{1}},\mathbf{R_{2}},\dots,\mathbf{R_{n_{profiles}}}\}\), where each \(\mathbf{R_{p}}\in\mathbb{R}^{3}\) contains profile points. Because we established direct correspondences, the number of profiles \(n_{profiles}\) and the number of points within a profile \(n_{p}\) are the same for both clouds \(R\), \(M\). Since each profile is optimized separately, we will omit the indices \(p\) from now on. Using the computed normals \(\mathbf{n}\) of the reference point cloud \(\mathbf{R}\), we parametrize planes at each profile point using the Hessian normal form and calculate the offset with  
\[d_{i}=\left\langle\mathbf{n_{i}}\,,\,\mathbf{r_{i}}\right\rangle\qquad\quad \text{with }i=1\dots\left|\mathbf{R}\right|\,. \tag{2}\]  
After finding the plane parameters, we seek a 3D transformation that best aligns the query point cloud \(\mathbf{M}\) with our reference planes \((\mathbf{n},d)\). In contrast to the ICP algorithm, we minimize the orthogonal distances of \(\mathbf{M}\) to \(\mathbf{R}\), accounting for the laser scanner's higher sensitivity in line-of-sight. The desired parameters are three translation and three rotation parameters. The direction and magnitude of a spatial rotation can be described by the Euler-axis \(\mathbf{e}\) and the Euler angle \(\theta\). We adopt the axis-angle representation in \(\mathbb{R}^{4}\) using unit quaternions \(q\)  
\[ \begin{split} q&=q_{0}+\mathbf{q}=q_{0}+q_{1}\, \hat{\mathbf{i}}+q_{2}\,\hat{\mathbf{j}}+q_{3}\,\hat{\mathbf{k}}\\ q&=q_{0}+\mathbf{q}=\cos\frac{\theta}{2}+\mathbf{e }\sin\frac{\theta}{2}\qquad\quad\text{with }|q|=1\;.\end{split}  \tag{3}\]  
Figure 5: Elevation data of the first \(1/f\) seconds classified into road (yellow) and non road points (dark purple) (**left)**; calculated distance function \(d\) and localized profile end points (red) (**middle**) with detail view (**right**). Following [39], we define an operator \(L_{q}(\mathbf{m})\) that rotates a vector \(\mathbf{m}\in\mathbb{R}^{3}\) with a unit quaternion \(q\) using  
\[ \begin{split} L_{q}(\mathbf{m})=& q\,\mathbf{m}\,q^{*} \\ =&\left(q_{0}^{2}-||\mathbf{q}||^{2}\right)\mathbf{m}+2 \left(\left\langle\mathbf{q}\,,\,\mathbf{m}\right\rangle\right)\mathbf{q}+2\,q_ {0}(\mathbf{q}\times\mathbf{m})\.\end{split}  \tag{4}\]  
Quaternions thus provide a concise notation for spatial rotations. They simplify the differentiation with respect to the desired rotation parameters since no trigonometric functions occur. Additional information on quaternion algebra is given in Appendix A.1. We can finally formulate our optimization function as  
\[f=\left\langle\mathbf{n_{i}}\,,\,\left(L_{q}(\mathbf{m_{i}})+\mathbf{t}\right) \right\rangle-d_{i}=0. \tag{5}\]  
The profile points \(\mathbf{m_{i}}\) and the derived plane parameters \(\mathbf{n_{i}},d_{i}\) represent our observations. The vector of unknowns contains seven parameters \(\mathbf{x}=\left[q_{0},q_{1},q_{2},q_{3},t_{x},t_{y},z_{z}\right]^{T}\). Remember that three rotation parameters exist while \(q\in\mathbb{R}^{4}\). To account for the singularity, it is therefore necessary to introduce a unity constraint when estimating \(q_{0},q_{1},q_{2},q_{3}\)  
\[c=\sqrt{q\,q^{*}}=\sqrt{q_{0}^{2}+q_{1}^{2}+q_{2}^{2}+q_{3}^{2}}:=1. \tag{6}\]  
We estimate the parameters in a least-squares sense by applying a constraint Gauss-Helmert Model (GHM). Although its theory is well-established in the literature [40; 41], some remarks are valuable for solving the specific problem. Note that the number of profile points \(n\) determines the number of rows of the Jacobian matrix \(\mathbf{A}\), while Jacobian \(\mathbf{B}\) increases quadratically with the number of points (cf. Equation (7)). As a result, memory can become scarce when we deal with large sets of \(\mathbf{R}\) and \(\mathbf{M}\). Fortunately, most elements of \(\mathbf{B}\) are zero, so we can apply sparse matrix operations.