- Full paper
- Open access
- Published:

# Analytical dual quaternion algorithm of the weighted three-dimensional coordinate transformation

*Earth, Planets and Space*
**volume 74**, Article number: 170 (2022)

## Abstract

Considering that a unit dual quaternion can describe elegantly the rigid transformation including rotation and translation, the point-wise weighted 3D coordinate transformation using a unit dual quaternion is formulated. The constructed transformation model by a unit dual quaternion does not need differential process to eliminate the three translation parameters, while traditional models do. Based on the Lagrangian extremum law, the analytical dual quaternion algorithm (ADQA) of the point-wise weighted 3D coordinate transformation is proved existed and derived in detail. Four numerical cases, including geodetic datum transformation, the registration of LIDAR point clouds, and two simulated cases, are studied. This study shows that ADQA is valid as well as the modified procrustes algorithm (MPA) and the orthonormal matrix algorithm (OMA). ADQA is suitable for the 3D coordinate transformation with point-wise weight and no matter rotation angles are small or big. In addition, the results also indicate that if the distribution of common points degrades from 3D or 2D space to 1D space, the solvable correct transformation parameters decrease. In other words, all common points should not be located on a line. From the perspective of improving the transformation accuracy, high accurate control points (with small errors in the coordinates) should be chosen, and it is preferred to decrease the rotation angles as much as possible.

### Graphical Abstract

## Introduction

Three-dimensional coordinate transformation is widely used in geodesy, engineering surveying, terrestrial laser scanning, LIDAR, photogrammetry, robotics and machine vision, etc. (cf. Arun et al. 1987; Besl and McKay 1992; Chang 2016; Chen et al. 2004; Crosilla and Beinat 2002; Fan et al. 2015; Fang 2015; Felus and Burtch 2009; Horn 1987; Horn et al. 1988; Ioannidou and Pantazis 2020; Li et al. 2022; Odziemczyk 2020; Ruffhead 2021; Qin et al. 2020; Závoti and Kalmár 2016). The three-dimensional coordinate transformation usually adopts seven-parameter similarity transformation model. And the key process of three dimensional coordinate transformation is to compute the transformation parameters utilizing at least three common points with coordinates both in the original system and in the target system.

So far, a large number of algorithms of three-dimensional coordinate transformation have been presented (cf., e.g., Aydin et al. 2018; Grafarend and Awange 2003; Kanatani and Niitsuma 2012; Kurt 2018; Ligas and Prochniewicz 2019; Mahboub 2016; Marx 2017; Mercan et al. 2018; Mihajlović and Cvijetinović 2017; Păun et al. 2017; Shen et al. 2006; Uygur et al. 2020; Walker et al. 1991; Wang et al. 2014; Zeng 2015; Zeng and Yi 2010, 2011; Zeng et al. 2016, 2018, 2019). They can be classified into iterative algorithm or analytical algorithm. As far as the iterative algorithms are concerned, there are lots of transformation models. The transformation model differs as the representation of rotation matrix differs. The rotation matrix may be represented by rotation angles (Wang et al. 2018; Yang et al. 2022; Zeng and Yi 2011), direction cosine matrix (Chen et al. 2004; Wang et al. 2018), unit quaternion (Mercan et al. 2018; Uygur et al. 2020; Zeng and Yi 2011), dual quaternion (Zeng et al. 2018, 2019), and Rodrigues matrix or Gibbs vector (Kurt, 2018; Yang et al. 2022; Závoti and Kalmár 2016; Zeng et al. 2018). Iterative algorithms usually need initial values of transformation parameters, linearization based on Taylor formula, and iterative computation (e.g., Zeng and Yi 2011; Kanatani and Niitsuma 2012). If bad initial values of parameters are provided, the algorithms probably diverge or spend lots of iterative computations (e.g., Zeng and Yi 2011). In some situations, e.g., registration of terrestrial laser scanning point clouds, it is not easy to obtain a good initial values due to the arbitrary size of rotation angles. Iterative algorithms can provide the accuracy estimation of transformation parameters and computed coordinates of non-control points, while the analytical algorithms cannot (Zeng et al. 2020, 2022).

In contrast to iterative, analytical algorithms are limited. Analytical algorithms do not need initial values of transformation parameters, linearization, or iterative computations. They use exact analytical formulae to compute transformation parameters, so are straightforward and fast. At present, analytical algorithms involve Procrustes algorithms (Arun et al. 1987; Crosilla and Beinat 2002; Grafarend and Awange 2003; Păun et al. 2017), Gibbs vector-based algorithm (Zeng and Yi 2010), unit quaternion-based algorithms (Horn 1987; Shen et al. 2006), dual quaternion-based algorithm (Walker et al. 1991; Wang et al. 2014), and orthonormal matrix-based algorithm (Horn et al. 1988; Zeng 2015). However, only the Procrustes algorithms and orthonormal matrix-based algorithm can deal with point-wise weight of observation (Grafarend and Awange 2003; Zeng 2015). As mentioned above, analytical algorithms cannot implement accuracy estimation of transformation parameters or the computed coordinates of non-control points.

Regarding that a unit dual quaternion can represent elegantly the rigid transformation including rotation and translation, the constructed transformation model utilizing a unit dual quaternion does not need differential process to eliminate the three translation parameters, while traditional models do. Zeng et al. (2018) thought wrongly that the analytical dual quaternion solution of weighted three-dimensional coordinate transformation did not exist and then presented an iterative algorithm. This paper will prove that the analytical solution exists and present an analytical algorithm. Moreover, the presented algorithm should be suitable for point-wise weight and no matter how big rotation angles are. This paper will investigate the stability, i.e., the ability of obtaining the correct parameters of the algorithm when the distribution of common points deteriorates from 3D or 2D space to 1D space, and the reliability of the algorithm in terms of accuracy of transformed parameter under different noises and different rotation angles. This paper will propose some suggestions in improving the transformation accuracy.

The rest of the paper is organized as follows. In the next section, the point-wise weighted 3D coordinate transformation is formulated, and then the related works on the analytical algorithms of the coordinate transformation are reviewed. After introducing the basic concepts of dual quaternion, the Analytical Dual Quaternion Algorithm is derived and presented in “Analytical dual quaternion algorithm” section. Four numerical experiments, including two real world cases (geodetic datum transformation and LIDAR point cloud registration) and two simulative cases, are studied and discussed in “Experiments and discussions” section. Lastly conclusions are drawn in the last section, i.e., “Conclusions”.

## Formulation of the question and related works

This section firstly introduces the formulation of the point-wise weighted 3D coordinate transformation and then reviews related works about the analytical algorithms of the point-wise weighted 3D coordinate transformation, namely, the Procrustes algorithm based on Grafarend and Awange (2003) and its modification, and the orthonormal matrix-based algorithm based on Zeng (2015), respectively.

### Formulation of weighted 3D coordinate transformation

Assume there are a set of control points, i.e., known points whose coordinates in both the original system and target coordinate system are known. The essential work to fulfill 3D coordinate transformation is to compute the transformation parameters with the set of control points. The similarity 3D coordinate transformation model is as follows:

subject to

where \({\mathbf{p}}_{i}^{t} = \left[ {\begin{array}{*{20}c} {x_{i}^{t} } & {y_{i}^{t} } & {z_{i}^{t} } \\ \end{array} } \right]^{T}\) and \({\mathbf{p}}_{i}^{o} = \left[ {\begin{array}{*{20}c} {x_{i}^{o} } & {y_{i}^{o} } & {z_{i}^{o} } \\ \end{array} } \right]^{T}\) are the target 3D coordinate vector and original 3D coordinate vector of control point \(i\), respectively (superscripts \(t\) and \(o\) denote target coordinate and original coordinate; subscript \(i = 1,2, \cdots ,n\) denotes the number of control point). \({\mathbf{I}}_{3}\) is a 3-by-3 identity matrix, superscript \(T\) represents matrix transpose, and \(\det\) denotes determinant computation of matrix. \({\mathbf{t}} = \left[ {\begin{array}{*{20}c} {t_{x} } & {t_{y} } & {t_{z} } \\ \end{array} } \right]^{T}\) is a vector of three translation parameters. \(\lambda\) is a scale factor from original coordinate system to target coordinate system, that is very close to 1 for most cases, like geodetic datum transformation or LiDAR point cloud registration. \({\mathbf{R}}\) stands for a 3-by-3 rotation matrix, which is an orthonormal matrix with the property in Eq. (2). Conventionally \({\mathbf{R}}\) is represented by three rotation angles about the three coordinate axes. Assume \({\mathbf{R}}\) is produced by rotating angels \(\theta_{x}\), \(\theta_{y}\), and \(\theta_{z}\) counterclockwise about the X, Y, and Z axes, respectively (\(\theta_{x}\) firstly, \(\theta_{y}\) secondly, and \(\theta_{z}\) lastly). Thus, \({\mathbf{R}}\) is expressed by rotation angles as

There are seven transformation parameters in the similarity 3D coordinate transformation model, i.e., Equation (1) including one scale factor, three translations, and three rotation angles. Thus, at least three control points (\(n \ge 3\)) should be given to compute the transformation parameters. In practice, different control points probably have different accuracies; therefore, it is more rational to take into account point-wise weight \(\alpha_{i}\) (\(i = 1,2, \cdots ,n\)) than to consider all points an identity weight, cf Grafarend and Awange (2003), Závoti and Kalmár (2016), Zeng (2015), Zeng et al. 2020, etc.

Taking into account the transformation error, Eq. (1) can be re-expressed as

where \({\mathbf{e}}_{i}\) is the transformation error vector of control point \(i\). Then the transformation parameter solution in the least squares sense is essentially to find the argument of Lagrangian minimum problem

subject to Eq. (2).

### Procrustes algorithm and its modification

Introducing coordinate matrices \({\mathbf{P}}^{o} = \left[ {\begin{array}{*{20}c} {{\mathbf{p}}_{1}^{o} } & {{\mathbf{p}}_{2}^{o} } & \cdots & {{\mathbf{p}}_{n}^{o} } \\ \end{array} } \right]^{T}\), \({\mathbf{P}}^{t} = \left[ {\begin{array}{*{20}c} {{\mathbf{p}}_{1}^{t} } & {{\mathbf{p}}_{2}^{t} } & \cdots & {{\mathbf{p}}_{n}^{t} } \\ \end{array} } \right]^{T}\), and coordinate transformation error matrix \({\mathbf{E}} = \left[ {\begin{array}{*{20}c} {{\mathbf{e}}_{1} } & {{\mathbf{e}}_{2} } & \cdots & {{\mathbf{e}}_{n} } \\ \end{array} } \right]^{T}\), the transformation model in Eq. (4) is rewritten as

where \({\mathbf{1}}_{n} = \underbrace {{\left[ {\begin{array}{*{20}c} {1} & {1} & \cdots & {1} \\ \end{array} } \right]}}_{n}^{T}\). The Lagrangian minimum problem in Eq. (5) can be rewritten as matrix form as

where \(\Gamma = Diag(\alpha_{1} ,\alpha_{2} , \cdots ,\alpha_{n} )\) is a diagonal weight matrix and \({\text{tr}}\) denotes trace computation of matrix. The Lagrangian minimum exists if and only if the partial differentials with respect to \(\lambda\), \({\mathbf{t}}\), \({\mathbf{R}}\) as follows are equal to zero:

Grafarend and Awange (2003) derived the solution of transformation step by step. Firstly by Eq. (8), the solution of \({\mathbf{t}}\) is obtained as

Secondly substituting the solution of \({\mathbf{t}}\) to Eq. (9), \(\lambda\) is obtained as

where \({\tilde{\mathbf{C}}} = {\mathbf{I}}_{n} - \left( {{\mathbf{1}}_{n}^{T} \Gamma {\mathbf{1}}_{n} } \right)^{ - 1} {\mathbf{1}}_{n} {\mathbf{1}}_{n}^{T} \Gamma\), \({\mathbf{I}}_{n}\) is a n-by-n identity matrix. Finally substituting the solutions of \({\mathbf{t}}\) and \(\lambda\) to Eq. (10), \({\mathbf{R}}\) is obtained using the singular value decomposition as

where \({\mathbf{P}}^{tT} {\tilde{\mathbf{C}}}^{T} \Gamma {\tilde{\mathbf{C}}\mathbf{P}}^{o} = U\Sigma V^{T}\) is a singular value decomposition of \({\mathbf{P}}^{tT} {\tilde{\mathbf{C}}}^{T} \Gamma {\tilde{\mathbf{C}}\mathbf{P}}^{o}\). \(U\), \(V\), and \(\Sigma\) are left orthonormal matrix, right orthonormal matrix, and diagonal matrix of singular values, respectively. Eq. (13) ensures that \({\mathbf{R}}^{T} {\mathbf{R}} = {\mathbf{I}}_{3}\) is satisfied. However, it is worthy of notice that \(\det ({\mathbf{R}}) = - {1}\) rather than \(\det ({\mathbf{R}}) = + {1}\) usually occurs when the common points are located in a rigid or approximate plane. In other words, for the case that \(\det ({\mathbf{R}}) = - {1}\) the computed \({\mathbf{R}}\) is a reflection instead of rotation. In order to obtain the correct rotation matrix, Eq. (13), i.e., Equation (22) in Grafarend and Awange (2003), should be modified as

After \({\mathbf{R}}\), \(\lambda\), and \({\mathbf{t}}\) are computed, \({\mathbf{E}}\) is compute by Eq. (6), and the variance factor of unit weight \(\sigma\) is computed as follows:

If the rotation angles are needed, they are computed by the formulae as follows:

where \({\mathbf{R}}\) _{ij} is the element of \({\mathbf{R}}\) in the *i*th row and *j*th column.

### Orthonormal matrix algorithm

The orthonormal matrix algorithm constructs the Lagrangian minimum problem with the constraint \({\mathbf{R}}^{T} {\mathbf{R}} = {\mathbf{I}}_{3}\) as follows (Zeng 2015):

where \(\Lambda\) is a symmetric Lagrangian multiplier matrix. The Lagrangian minimum exists if and only if the partial differentials with respect to \(\lambda\), \({\mathbf{t}}\), \({\mathbf{R}}\), and \(\Lambda\) as follows are equal to zero.

Zeng (2015) derived the solution of transformation step by step. By Eq. (18), the solution of \({\mathbf{t}}\) is obtained as

which is identical to Eq. (11). Substituting the solution of \({\mathbf{t}}\) to Eq. (19), \(\lambda\) is obtained as

which is identical to Eq. (12). By Eqs. (20) and (21), the solution of \({\mathbf{R}}\) is obtained as

where \({\mathbf{D}} = {\mathbf{P}}^{tT} {\tilde{\mathbf{C}}}^{T} \Gamma {\tilde{\mathbf{C}}\mathbf{P}}^{o}\). Since \({\mathbf{D}}^{T} {\mathbf{D}}\) is symmetric, non-negative definitive, it has non-negative real eigenvalues. Therefore, the inverse of the square root of \({\mathbf{D}}^{T} {\mathbf{D}}\) can be calculated by eigenvalue–eigenvector decomposition.

where *v*_{i} and *d*_{i}, \(i = {1,2,3}\), are the eigenvectors and corresponding eigenvalues of the matrix \({\mathbf{D}}^{T} {\mathbf{D}}\). Thus, Eq. (24) can be re-expressed as

One should notice that if one or two of *d*_{i} for \(i = {1,2,3}\) equals to 0, the construction of Eq. (25) makes no sense. Suppose that the eigenvalues of the matrix \({\mathbf{D}}^{{\text{T}}} {\mathbf{D}}\) meet the condition as follows:

Zeng (2015) presented the formulae to compute rotation matrix as follows for the cases that the common points are distributed in a rigid or approximate plane, i.e., \(d_{1}\) equals 0 or approaches very close to 0.

where the sign ± is chosen so that \(\det ({\mathbf{R}}) = + {1}\) is satisfied.

Zeng (2015) presented the formulae to compute rotation matrix as follows for the cases that the common points are distributed in a rigid or approximate line, i.e., \(d_{2} = d_{1} = {0},\;\;d_{3} > {0}\) or \(d_{3} > d_{2} > d_{1} = {0}\).

After \({\mathbf{R}}\), \(\lambda\), and \({\mathbf{t}}\) are computed, the variance factor of unit weight \(\sigma\) is computed as same as in Eq. (15). The rotation angles can be computed from \({\mathbf{R}}\) by Eq. (16). However, for this cases that the common points are distributed in a rigid or approximate line, the solvable rotation angles are 0–2 (Zeng 2015).

## Analytical dual quaternion algorithm

### Basic concept of dual quaternion

Quaternions \({\varvec{r}}\) and \({\varvec{s}}\) are written as follows (Walker et al. 1991):

where \(r_{{1}}\), \(r_{{2}}\), \(r_{{3}}\), \(r_{{4}}\), \(s_{{1}}\), \(s_{{2}}\), \(s_{{3}}\), and \(s_{{4}}\) are real numbers; \(i\), \(j\), and \(k\) are basic quaternion units. And then a dual quaternion is expressed as follows:

where \({\upvarepsilon }\) is a dual unit with the property \({\upvarepsilon }^{{2}} = {0}\) and \({\upvarepsilon }\) commutes with quaternion units. \(\left( {\begin{array}{*{20}c} {q_{{{\text{d1}}}} } & {q_{{d{2}}} } & {q_{{{\text{d3}}}} } \\ \end{array} } \right)^{T}\) is the vector part; \(q_{{{\text{d4}}}}\) is the scalar part.

The conjugate of \(\overline{\varvec{q}}\) is defined as

where \({\varvec{r}}^{ * }\) and \({\varvec{s}}^{ * }\) are conjugates of \({\varvec{r}}\) and \({\varvec{s}}\) as follows:

\(\overline{\varvec{p}} = {\varvec{u}} + {\upvarepsilon }{\varvec{v}}\) denotes a dual quaternion, and then the product of \(\overline{\varvec{q}}\) and \(\overline{\varvec{p}}\) is defined as

The norm of a dual quaternion is defined as

If \(\left\| {\overline{\varvec{q}}} \right\| = 1\), \(\overline{\varvec{q}}\) is named a unit dual quaternion. At this time, these conditions as follows exist:

The rigid transformation, including rotation and translation, can be represented by unit dual quaternion (Walker et al. 1991). The rotation matrix is represented by the unit quaternion \({\varvec{r}}\) (e.g., Walker et al. 1991; Zeng and Yi 2011).

where

Expanding Eq. (42), one obtains

Assume \({\varvec{t}}\) is the pure imaginary quaternion composed of translation \({\mathbf{t}}\), i.e.,

according to Walker et al. (1991),

### Derivation and implementation of analytical dual quaternion algorithm

Introducing coordinate vector quaternions

the similarity 3D coordinate transformation model considering the error, i.e., Equation (4), is rewritten by dual quaternion as

subject to Eqs. (40) and (41). In Eq. (51), \({\varvec{e}}_{i} = [{\mathbf{e}}_{i}^{T} 0]^{T}\) is the transformation error quaternion. A Lagrangian extremum problem without constrains is constructed as

where \(\beta_{{1}}\) and \(\beta_{{2}}\) are two Lagrangian multipliers. Replacing the expression of \({\varvec{e}}_{i}\) from Eq. (51) into error function \(\tilde{e}\) and expanding the error function \(\tilde{e}\), according to Zeng et al. (2018), one gets

where

The Lagrangian minimum in Eq. (52) exists if and only if the following conditions are satisfied:

The derivation of Eq. (60) makes use of the property that \({\mathbf{A}}\) is a symmetric matrix. The property is proved in Zeng et al. (2018).

For skew symmetric matrixes \({\mathbf{B}}\) and \({\mathbf{C}}\), the following property is proved in Zeng et al. (2018).

Right multiplying Eq. (61) by \({\varvec{r}}\), and considering Eq. (63), Eq. (64) and Eq. (65), one obtains

By Eq. (61), one obtains

Substituting Eq. (67) into Eq. (62) and making arrangements, one gets

Substituting Eq. (67) into Eq. (60) and considering Eq. (66), and making arrangements one gets

Introducing

Equation (69) is re-expressed as

It is obviously seen that \(\beta_{{1}}\) and \({\varvec{r}}\) are the eigenvalue and eigenvector of \({\mathbf{F}}\). Because \({\mathbf{A}}\) is symmetric and real, \({\mathbf{F}}\) is symmetric and real. Thus, \({\mathbf{F}}\) has four real eigenvalues and four orthogonal real eigenvectors. The next work is to find the solution of \({\varvec{r}}\) and \(\beta_{{1}}\) from the eigenvectors and eigenvalues. The expression of error function \(e\) was derived in Zeng et al. (2018) as

It is shown that \(e\) gets its minimum if \(\beta_{{1}}\) is the largest eigenvalue of \({\mathbf{F}}\). So solution of \({\varvec{r}}\) is the eigenvector of \({\mathbf{F}}\) corresponding to its largest eigenvalue.

This paper will prove that the analytical solution exists and present an analytical algorithm as follows.

Expanding the formula of \({\mathbf{F}}\) in Eq. (70), one gets

\({\mathbf{B}}^{T} {\mathbf{C}}\) is a symmetric matrix, referring to the Appendix for the proof. \({\mathbf{B}}^{T} {\mathbf{B}}\) and \({\mathbf{C}}^{T} {\mathbf{C}}\) are constant matrixes as follows:

Further, Eq. (70) is rewritten as

Suppose that the eigenvalue and eigenvector decomposition of \({\mathbf{F}}\) is written as

where \(\kappa\), \(\mu\) are the eigenvalue and eigenvector decomposition of \({\mathbf{F}}\). Substituting Eq. (76) into Eq. (77), one gets

Substituting Eqs. (74) and (75) into Eq. (78) and making arrangements, one obtains

where

Introducing

Equation (76) is rewritten as

Therefore, it is obviously seen that \(\gamma\) and \(\mu\) are the eigenvalue and eigenvector of \({\mathbf{G}}\). \({\mathbf{G}}\) is symmetric and real as \({\mathbf{F}}\); thus, \({\mathbf{G}}\) also has four couples of real eigenvalues and orthogonal real eigenvectors as \({\mathbf{F}}\). Further, \(\mu\) is the eigenvector of both \({\mathbf{G}}\) and \({\mathbf{F}}\), and \(\gamma\) and \(\kappa\) are related linearly. When \(\kappa\) increases, \(\gamma\) increases. Although it is not possible to obtain the largest eigenvalue based on eigenvalue and eigenvector decomposition of \({\mathbf{F}}\) directly because of the ambiguity of \(\lambda\) in \({\mathbf{F}}\), it is feasible to compute the largest eigenvalue and corresponding eigenvector based on eigenvalue and eigenvector decomposition of \({\mathbf{G}}\). Then the largest eigenvalue of \({\mathbf{F}}\) is computed from Eq. (83) as

where \(\gamma_{\max }\) is the largest eigenvalue of \({\mathbf{G}}\). And corresponding eigenvector of \({\mathbf{F}}\), i.e., \({\varvec{r}}\), is the eigenvector corresponding to largest eigenvalue of \({\mathbf{G}}\).

At last, after \({\varvec{r}}\), \({\varvec{s}}\), \(\lambda\), and \({\varvec{t}}\) are computed, the standard deviation of unit weight is estimated by

or

The analytical dual quaternion algorithm is summarized in Table 1.

## Experiments and discussion

Four numerical cases, including geodetic datum transformation, the registration of LIDAR point clouds, and two simulated cases, are studied. The former two cases are actual and chosen to investigate whether the presented algorithm is valid to transformation with point-wise weight and with small or big rotation angles. The latter two cases, i.e., simulated cases, are designed to test the performance of the presented algorithm on the aspects of stability with different distributions of control points (case I) and reliability with different noises and with different rotation angles (case II).

### Geodetic datum transformation case

Usually the rotation angles in geodetic datum transformation are small (less than 1°). The data in this case are from Grafarend and Awange (2003), and the rotation angles are all less than 1″. The 3D coordinates of control points in both original system and target system are listed in Table 2. The point-wise weights of control points are listed in Table 3. The Analytical Dual Quaternion Algorithm (ADQA), Modified Procrustes Algorithm (MPA), and Orthonormal Matrix Algorithm (OMA) are employed to compute the transformation parameters. The computed unit dual quaternion by ADQA is listed in Table 4, and the computed transformation parameters and standard deviation of unit weight by the three algorithms are identical (the rounding errors are small enough to ignore, for instance, less than 0.000001″ for the rotation angle) and listed in Table 5. Thus, the presented algorithm ADQA is valid for the case with small rotation angles and point-wise weights.

### LiDAR point cloud registration case

Usually the rotation angles in LiDAR Point Cloud Registration are big. The data in this case are chosen from Wang et al. (2014). 18 common points are extracted from two neighboring LIDAR point clouds and listed in Table 6. The point-wise weights of all points are set to 1 in this case. In other words, the weights of all points are not taken into account. The computed unit dual quaternion by ADQA is given in Table 7, and the computed transformation parameters and standard deviation of unit weight by ADQA, MPA, and OMA are identical (the rounding errors are small enough to ignore) and listed in Table 8. Therefore, the presented algorithm ADQA is valid for the case with big rotation angles.

### Simulated case I

This case is designed to test the stability of the presented algorithm, ADQA, and compare with MPA and OMA. The data are from Zeng (2015). The data are simulated as follows. Six sets of common points in the original system are given in Table 9 firstly. For Set 1, common points are distributed in 3D space. For Sets 2 to 4, common points are distributed in 2D space. For Sets 5 and 6, common points are distributed in 1D space. Then true transformation parameters are disigned to suit big rotation angle and listed in Table 10. At last, the simulative true coordiantes of control points in the target system are computed by Eq. (1) and listed in Table 11. ADQA, MPA, and OMA are employed to compute the transformation parameters. The results of Set 1 to Set 4 by ADQA, MPA, and OMA are identical and listed in Table 12. For Set 5 and Set 6, the results by ADQA, MPA, and OMA are different and listed in Table 13. It is obviously seen that for Set 1 to Set 4, i.e., 3D or 2D space, the three algorithms are valid to compute the correct transformation parameters. And for Set 5 and Set 6, i.e., 1D space, the three algorithms are valid to compute all correct translation and scale parameters, however, only 0–2 correct rotation angles. Thus, ADQA is stable when all common points (at least three) are located in 2D or 3D space, however, become unstable when all common points are located in 1D space (i.e., on a line). In order to compute 7 parameters correctly all common points (at least three) should be distributed in 2D or 3D space. In other words, all common points should not be distributed on a line; otherwise only 4–6 of the 7 parameters can be computed correctly.

### Simulated case II

In this case two schemes are designed to test the reliability of ADQA with different noises (Scheme 1) and with different rotation angles (Scheme 2). The settings of two schemes are listed in Table 14.

For Scheme 1, the coordinates of control points in the target system are computed by the given coordinates of control points in the original system and fixed transformation parameters. In order to simulate the errors of control points in the original system and in the target system, normal distributed noises N(0, σ_{0}^{2}) are produced and added into the coordinates. The standard deviation σ_{0} is varied in the zone [0.0001 m, 0.01 m] with a constant interval 0.0001 m, so there are 100 different values of σ_{0}. For each value of σ_{0}, the noises are produced and added 100 times, and the transfomation parameters are computed 100 times. The average computed transfomation parameters of 100 times and the error regarding to true transformation parameters are computed based on Monte Carlo simulation method. The results by ADQA, MPA, and OMA are the same and depicted in Fig. 1. It is seen from Fig. 1 that the errors of transformaiton parameters and standard deviation of unit weight σ all keep a trend of overall increase with the increase of σ_{0}. From the view point of improving the transformation accuracy, high accurate control points (with small errors in the coordinates) should be chosen.

For Scheme 2, the coordinates of control points in the target system are computed by the given coordinates of control points in the original system, fixed scale and translations, and varied rotation angles *θ*_{0}. *θ*_{0} is varied in the zone [1°, 85°] with a constant interval 1°, so there are 85 different values of *θ*_{0}. In order to simulate the errors of control points in the original system and in the target system, normal distributed noises N(0, 0.001^{2}) are produced and added into the coordinates. For each value of *θ*_{0}, the noises are produced and added 100 times, and the transfomation parameters are computed 100 times. The average computed transfomation parameters of 100 times and the error regarding to true transformation parameters are computed based on Monte Carlo simulation method. The results by ADQA, MPA, and OMA are the same and depicted in Fig. 2. Figure 2 indicates that the errors of transformaiton parameters and standard deviation of unit weight *σ* all keep a trend of overall increase with the increase of *θ*_{0}. From the view point of improving the transformation accuracy, it is preferred to decrease the rotation angles as much as possible.

## Conclusions

The rigid transformation, including rotation and translation, can be described by a unit dual quaternion. Based on this good property of unit dual quaternion the point-wise weighted 3D coordinate transformation is formulated. The model constructed, i.e., Equation (48), is not differential as traditional ones, like MPA and OMA, utilize \({\tilde{\mathbf{C}}}\) to centralize the model and eliminate the three translations. The Analytical Dual Quaternion Algorithm (ADQA) of the point-wise weighted 3D coordinate transformation is derived step by step and summed up.

Four numerical experiments involving two real world cases, namely, geodetic datum transformation and LIDAR point cloud registration, and two simulative cases are demonstrated. The results show that the presented algorithm, i.e., ADQA, as well as MPA and OMA, is valid for the transformation with point-wise and no matter how big the rotation angles are. Meanwhile, the results also indicate that in order to recover all parameters the distribution of common points should be in 3D or 2D space. In other words, all common points should not on a line. From the perspective of improving the transformation accuracy, high accurate control points (with small errors in the coordinates) should be chosen, and it is preferred to decrease the rotation angles as much as possible.

## References

Arun KS, Huang TS, Blostein SD (1987) Least-squares fitting of two 3-D point sets. IEEE Trans Pattern Anal Mach Intell 9:698–700

Aydin C, Mercan H, Uygur SO (2018) Increasing numerical efficiency of iterative solution for total least-squares in datum transformations. Stud Geophys Geod 62:223–242

Besl PJ, McKay ND (1992) A method for registration of 3-D shapes. IEEE Trans Pattern Anal Mach Intell 14(2):239–256

Chang G (2016) Closed form least-squares solution to 3D symmetric Helmert transformation with rotational invariant covariance structure. Acta Geod Geophys 51(2):237–244

Chen Y, Shen YZ, Liu DJ (2004) A simplified model of three dimensional-datum transformation adapted to big rotation angle. Geomat Inf Sci Wuhan Univ 29:1101–1104

Crosilla F, Beinat A (2002) Use of generalised Procrustes analysis for the photogrammetric block adjustment by independent models. ISPRS J Photogramm Remote Sens 56(3):195–209

Fan L, Smethurst JA, Atkinson PM, Powrie W (2015) Error in target-based georeferencing and registration in terrestrial laser scanning. Comput Geosci 83:54–64

Fang X (2015) Weighted total least-squares with constraints: a universal formula for geodetic symmetrical transformations. J Geod 89:459–469

Felus YA, Burtch RC (2009) On symmetrical three-dimensional datum conversion. GPS Solut 13:65–74

Grafarend EW, Awange JL (2003) Nonlinear analysis of the three-dimensional datum transformation [conformal group C7(3)]. J Geod 77:66–76

Horn BKP (1987) Closed-form solution of absolute orientation using unit quaternions. J Opt Soc Am Ser A 4:629–642

Horn BKP, Hilden HM, Negahdaripour S (1988) Closed-form solution of absolute orientation using orthonormal matrices. J Opt Soc Am Ser A 5:1127–1135

Ioannidou S, Pantazis G (2020) Helmert transformation problem. From Euler angles method to quaternion algebra. ISPRS Int J Geo-Inf. 9:494. https://doi.org/10.3390/ijgi9090494

Kanatani K, Niitsuma H (2012) Optimal computation of 3-D similarity: Gauss-Newton vs Gauss-Helmert. Comput Stat Data Anal 56:4470–4483

Kurt O (2018) An integrated solution for reducing ill-conditioning and testing the results in non-linear 3D similarity transformations. Inverse Probl Sci Eng 26(5):708–727

Li RB, Yuan XP, Gan S, Bi R, Guo Y, Gao S (2022) A point cloud registration method based on dual quaternion description with point-linear feature constraints. Int J Remote Sens 43:2538–2558

Ligas M, Prochniewicz D (2019) Procrustes based closed-form solution to the point-wise weighted rigid-body transformation in asymmetric and symmetric cases. J Spat Sci. https://doi.org/10.1080/14498596.2019.1684394

Mahboub V (2016) A weighted least-squares solution to a 3-D symmetrical similarity transformation without linearization. Stud Geophys Geod 60:195–209

Marx C (2017) A weighted adjustment of a similarity transformation between two point sets containing errors. J Geod Sci 7(1):105–112. https://doi.org/10.1515/jogs-2017-0012

Mercan H, Akyilmaz O, Aydin C (2018) Solution of the weighted symmetric similarity transformations based on quaternions. J Geod 92:1113–1130

Mihajlović D, Cvijetinović Ž (2017) Weighted coordinate transformation formulated by standard least-squares theory. Surv Rev 49(356):328–345. https://doi.org/10.1080/00396265.2016.1173329

Odziemczyk W (2020) Application of simulated annealing algorithm for 3D coordinate transformation problem solution. Open Geosci 12:491–502

Păun C, Oniga E, Dragomir P (2017) Three-dimensional transformation of coordinate systems using nonlinear analysis—Procrustes algorithm. Int J Eng Sci Res Technol 6(2):355–363

Qin Y, Fang X, Zeng W, Wang B (2020) General total least squares theory for geodetic coordinate transformations. Appl Sci 10:2598. https://doi.org/10.3390/app10072598

Ruffhead AC (2021) Derivation of rigorously-conformal 7-parameter 3D geodetic datum transformations. Surv Rev 53(376):8–15. https://doi.org/10.1080/00396265.2019.1665614

Shen YZ, Chen Y, Zheng DH (2006) A quaternion-based geodetic datum transformation algorithm. J Geod 80:233–239

Uygur SO, Aydin C, Akyilmaz O (2020) Retrieval of Euler rotation angles from 3D similarity transformation based on quaternions. J Spat Sci. https://doi.org/10.1080/14498596.2020.1776170

Walker MW, Shao L, Volz RA (1991) Estimating 3-D location parameters using dual number quaternions. CVGIP Image Understand 54:358–367

Wang YB, Wang YJ, Wu K, Yang HC, Zhang H (2014) A dual quaternion-based, closed-form pairwise registration algorithm for point clouds. ISPRS J Photogramm Remote Sens 94:63–69

Wang Q, Chang G, Xu T, Zou Y (2018) Representation of the rotation parameter estimation errors in the Helmert transformation model. Surv Rev 50:69–81

Yang R, Deng C, Yu K, Li Z, Pan L (2022) A new way for Cartesian coordinate transformation and its precision evaluation. Remote Sens 14:64. https://doi.org/10.3390/rs14040864

Závoti J, Kalmár J (2016) A comparison of different solutions of the Bursa-Wolf model and of the 3D, 7-parameter datum transformation. Acta Geod Geophys 51:245–256

Zeng HE (2015) Analytical algorithm of weighted 3D datum transformation using the constraint of orthonormal matrix. Earth Planets Space 67:105. https://doi.org/10.1186/s40623-015-0263-6

Zeng HE, Yi QL (2010) A new analytical solution of nonlinear geodetic datum transformation. In: Proceedings of the 18th International Conference on Geoinformatics

Zeng HE, Yi QL (2011) Quaternion-based iterative solution of three-dimensional coordinate transformation problem. J Comput 6(7):1361–1368

Zeng HE, Yi QL, Wu Y (2016) Iterative approach of 3D datum transformation with a non-isotropic weight. Acta Geod Geophys 51:557–570

Zeng HE, Fang X, Chang G, Yang R (2018) A dual quaternion algorithm of the Helmert transformation problem. Earth Planets Space 70:26. https://doi.org/10.1186/s40623-018-0792-x

Zeng HE, Chang G, He H, Tu Y, Sun S, Wu Y (2019) Iterative solution of Helmert transformation based on a unit dual quaternion. Acta Geod Geophys 54:123–141

Zeng HE, Chang G, He H, Li K (2020) WTLS iterative algorithm of 3D similarity coordinate transformation based on Gibbs vectors. Earth Planets Space 72:53. https://doi.org/10.1186/s40623-020-01179-1

Zeng HE, He HW, Chen LG, Chang GB, He HQ (2022) Extended WTLS iterative algorithm of 3D similarity transformation based on Gibbs vector. Acta Geod Geophys 57:43–61

## Acknowledgements

The first author thanks his research team for valuable suggestions.

## Funding

This study is supported jointly by National Natural Science Foundation of China (Grant Nos. 42074005, 42074001, 41861062), the 2021 Science and Technology Project of Hubei Geological Bureau (Grant No. KJ2021-16), and the Open Foundation of National Field Observation and Research Station of Landslides in the Three Gorges Reservoir Area of Yangtze River, China Three Gorges University (Grant No. 2018KTL14).

## Author information

### Authors and Affiliations

### Contributions

HZ was the coordinator of the research group and responsible for the derivation of relevant theories in the paper; HZ and GC conceived the original ideas; JW, SL, and HH participated in deriving formulae; HZ, ZW, and RY implemented case study; HZ and HH worked on preparing the original draft; HZ and RY reviewed and edited the manuscript; HZ supervised the research work. All the authors read and approved the final manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Appendix Proof of symmetric property of matrix \({\mathbf{B}}^{T} {\mathbf{C}}\)

### Appendix Proof of symmetric property of matrix \({\mathbf{B}}^{T} {\mathbf{C}}\)

Equations (58) and (59) are rewritten, respectively, as

thus,

where \({\mathbf{N}}_{{{\text{ij}}}}\) \(\left( {i,\;j = {1,}\;{2,}\;{3,}\;{4}} \right)\) is the element of \({\mathbf{N}}\) in the *i*th row and *j*th column listed as

Therefore, \({\mathbf{B}}^{T} {\mathbf{C}}\) is a symmetric matrix.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Zeng, H., Wang, J., Wang, Z. *et al.* Analytical dual quaternion algorithm of the weighted three-dimensional coordinate transformation.
*Earth Planets Space* **74**, 170 (2022). https://doi.org/10.1186/s40623-022-01731-1

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s40623-022-01731-1