Skip to main content

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

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:

$${\mathbf{p}}_{i}^{t} = \lambda {\mathbf{Rp}}_{i}^{o} + {\mathbf{t}},$$
(1)

subject to

$${\mathbf{R}}^{T} {\mathbf{R}} = {\mathbf{I}}_{3} ,\;\det ({\mathbf{R}}) = + {1,}$$
(2)

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

$${\mathbf{R}} = \left[ {\begin{array}{*{20}l} {\cos \theta_{z} \cos \theta_{y} } & {\sin \theta_{z} \cos \theta_{x} + \cos \theta_{z} \sin \theta_{y} \sin \theta_{x} } & {\sin \theta_{z} \sin \theta_{x} - \cos \theta_{z} \sin \theta_{y} \cos \theta_{x} } \\ { - \sin \theta_{z} \cos \theta_{y} } & {\cos \theta_{z} \cos \theta_{x} - \sin \theta_{z} \sin \theta_{y} \sin \theta_{x} } & {\cos \theta_{z} \sin \theta_{x} + \sin \theta_{z} \sin \theta_{y} \cos \theta_{x} } \\ {\sin \theta_{y} } & { - \cos \theta_{y} \sin \theta_{x} } & {\cos \theta_{y} \cos \theta_{x} } \\ \end{array} } \right].$$
(3)

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

$${\mathbf{p}}_{i}^{t} = \lambda {\mathbf{Rp}}_{i}^{o} + {\mathbf{t}} + {\mathbf{e}}_{i} ,$$
(4)

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

$$\mathop {\min }\limits_{{{\mathbf{R}},{\mathbf{t}},\lambda }} \left\{ {l = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } {\mathbf{e}}_{i}^{T} {\mathbf{e}}_{i} } \right\},$$
(5)

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

$${\mathbf{P}}^{t} = \lambda {\mathbf{P}}^{o} {\mathbf{R}}^{T} + {\mathbf{1}}_{n} {\mathbf{t}}^{T} + {\mathbf{E}},$$
(6)

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

$$\mathop {\min }\limits_{{{\mathbf{R}},{\mathbf{t}},\lambda }} \left\{ {l = {\text{tr(}}{\mathbf{E}}^{T} \Gamma {\mathbf{E}})} \right\},$$
(7)

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:

$$\frac{\partial l}{{\partial {\mathbf{t}}}} = {0,}$$
(8)
$$\frac{\partial l}{{\partial \lambda }} = {0,}$$
(9)
$$\frac{\partial l}{{\partial {\mathbf{R}}}} = {0}{\text{.}}$$
(10)

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

$${\mathbf{t}} = \left( {{\mathbf{1}}_{n}^{T} \Gamma {\mathbf{1}}_{n} } \right)^{ - 1} \left( {{\mathbf{P}}^{tT} - \lambda {\mathbf{RP}}^{oT} } \right)\Gamma {\mathbf{1}}_{n} .$$
(11)

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

$$\lambda = \frac{{{\text{tr}}({\mathbf{P}}^{tT} {\tilde{\mathbf{C}}}^{T} \Gamma {\tilde{\mathbf{C}}\mathbf{P}}^{o} {\mathbf{R}}^{T} )}}{{{\text{tr}}({\mathbf{P}}^{oT} {\tilde{\mathbf{C}}}^{T} \Gamma {\tilde{\mathbf{C}}\mathbf{P}}^{o} )}},$$
(12)

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

$${\mathbf{R}} = UV^{T} ,$$
(13)

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

$${\mathbf{R}} = U\left[ {\begin{array}{*{20}c} {1} & {0} & {0} \\ {0} & {1} & {0} \\ {0} & {0} & {{\text{det(}}UV^{T} {)}} \\ \end{array} } \right]V^{T} .$$
(14)

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:

$$\sigma = \pm \sqrt {\frac{{{\text{tr(}}{\mathbf{E}}^{T} \Gamma {\mathbf{E}})}}{3n - 7}}.$$
(15)

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

$$\theta_{x} = - \tan^{ - 1} \frac{{{\mathbf{R}}_{32} }}{{{\mathbf{R}}_{33} }},\;\theta_{y} = \sin^{ - 1} ({\mathbf{R}}_{31} ),\;\theta_{z} = - \tan^{ - 1} \frac{{{\mathbf{R}}_{21} }}{{{\mathbf{R}}_{11} }},$$
(16)

where \({\mathbf{R}}\) ij is the element of \({\mathbf{R}}\) in the ith row and jth 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):

$$\mathop {\min }\limits_{{{\mathbf{R}},{\mathbf{t}},\lambda {,}\Lambda }} \left\{ {l = {\text{tr(}}{\mathbf{E}}^{T} \Gamma {\mathbf{E}}) + {\text{tr}}(\Lambda ({\mathbf{R}}^{{\text{T}}} {\mathbf{R}} - {\text{I}}_{3} ))} \right\},$$
(17)

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.

$$\frac{\partial l}{{\partial {\mathbf{t}}}} = {0,}$$
(18)
$$\frac{\partial l}{{\partial \lambda }} = {0,}$$
(19)
$$\frac{\partial l}{{\partial {\mathbf{R}}}} = {0,}$$
(20)
$$\frac{\partial l}{{\partial \Lambda }} = {0}{\text{.}}$$
(21)

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

$${\mathbf{t}} = \left( {{\mathbf{1}}_{n}^{T} \Gamma {\mathbf{1}}_{n} } \right)^{ - 1} \left( {{\mathbf{P}}^{tT} - \lambda {\mathbf{RP}}^{oT} } \right)\Gamma {\mathbf{1}}_{n} ,$$
(22)

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

$$\lambda = \frac{{{\text{tr}}({\mathbf{P}}^{tT} {\tilde{\mathbf{C}}}^{T} \Gamma {\tilde{\mathbf{C}}\mathbf{P}}^{o} {\mathbf{R}}^{T} )}}{{{\text{tr}}({\mathbf{P}}^{oT} {\tilde{\mathbf{C}}}^{{\text{T}}} \Gamma {\tilde{\mathbf{C}}\mathbf{P}}^{o} )}},$$
(23)

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

$${\mathbf{R}} = {\mathbf{D}}({\mathbf{D}}^{T} {\mathbf{D}})^{{ - \frac{{1}}{{2}}}} ,$$
(24)

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.

$$({\mathbf{D}}^{T} {\mathbf{D}})^{{ - \frac{{1}}{{2}}}} = \frac{{v_{1} v_{1}^{T} }}{{\sqrt {d_{1} } }} + \frac{{v_{2} v_{2}^{T} }}{{\sqrt {d_{2} } }} + \frac{{v_{3} v_{3}^{T} }}{{\sqrt {d_{3} } }},$$
(25)

where vi and di, \(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

$${\mathbf{R}} = {\mathbf{D}}\left( {\frac{{v_{1} v_{1}^{T} }}{{\sqrt {d_{1} } }} + \frac{{v_{2} v_{2}^{T} }}{{\sqrt {d_{2} } }} + \frac{{v_{3} v_{3}^{T} }}{{\sqrt {d_{3} } }}} \right).$$
(26)

One should notice that if one or two of di 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:

$$d_{1} \le d_{2} \le d_{3} ,$$
(27)

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.

$${\mathbf{D}}_{{1}} { = }\left( {\frac{{v_{2} v_{2}^{T} }}{{\sqrt {d_{2} } }} + \frac{{v_{3} v_{3}^{T} }}{{\sqrt {d_{3} } }}} \right),$$
(28)
$${\mathbf{D}}_{{2}} { = }\left( {{\mathbf{DD}}_{{1}} ({\mathbf{DD}}_{{1}} )^{T} - {\mathbf{I}}_{{3}} } \right)v_{{1}} v_{{1}}^{T} ,$$
(29)
$${\mathbf{R}} = {\mathbf{DD}}_{{1}} \pm \frac{{{\mathbf{D}}_{{2}} }}{{\sqrt {\left| {{\text{tr}}({\mathbf{D}}_{{2}} )} \right|} }},$$
(30)

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}\).

$${\mathbf{R}} = \frac{{v_{3} v_{3}^{T} }}{{\sqrt {d_{3} } }}.$$
(31)

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):

$${\varvec{r}} = r_{{1}} i + r_{{2}} j + r_{{3}} k + r_{{4}} ,$$
(32)
$${\varvec{s}} = s_{{1}} i + s_{{2}} j + s_{{3}} k + s_{{4}} ,$$
(33)

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:

$$\begin{aligned} \overline{\varvec{q}} = & {\varvec{r}} + {\upvarepsilon }{\varvec{s}} \\ =& (r_{{1}} + \varepsilon s_{{1}} )i + (r_{{2}} + \varepsilon s_{{2}} )j + (r_{{3}} + \varepsilon s_{{3}} )k + (r_{{4}} + \varepsilon s_{{4}} ), \\ = & q_{{d{1}}} i + q_{{d{2}}} j + q_{{d{3}}} k + q_{{d{4}}} \\ \end{aligned}$$
(34)

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

$$\overline{\varvec{q}}^{ * } = {\varvec{r}}^{ * } + {\upvarepsilon }{\varvec{s}}^{ * } ,$$
(35)

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

$${\varvec{r}}^{ * } = - ir_{1} - jr_{2} - kr_{3} + r_{4} ,$$
(36)
$${\varvec{s}}^{ * } = - s_{{1}} i - s_{{2}} j - s_{{3}} k + s_{{4}} .$$
(37)

\(\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

$$\varvec{\overline{p}\overline{q}} = {\varvec{ur}} + {\varepsilon (}\varvec{us + vr}{)}{\text{.}}$$
(38)

The norm of a dual quaternion is defined as

$$\left\| {\overline{\varvec{q}}} \right\| = \sqrt {\overline{\varvec{q}}^{ * } \overline{\varvec{q}}} = \sqrt {q_{d1}^{2} + q_{d2}^{2} + q_{d3}^{2} + q_{d4}^{2} } .$$
(39)

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

$${\varvec{r}}{}^{T}\varvec{r = }{1,}$$
(40)
$${\varvec{r}}{}^{T}\varvec{s = }0.$$
(41)

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).

$$\left[ {\begin{array}{*{20}c} {\mathbf{R}} & {\mathbf{0}} \\ {{\mathbf{0}}^{T} } & 1 \\ \end{array} } \right] = {\mathbf{W}}({\varvec{r}})^{T} Q({\varvec{r}}),$$
(42)

where

$$Q({\varvec{r}}) = \left[ {\begin{array}{*{20}c} {r_{4} {\mathbf{I}} + {\mathbf{C}}({\mathbf{r}})} & {\mathbf{r}} \\ { - {\mathbf{r}}^{T} } & {r_{4} } \\ \end{array} } \right],$$
(43)
$${\mathbf{W}}({\varvec{r}}) = \left[ {\begin{array}{*{20}c} {r_{4} {\mathbf{I}} - {\mathbf{C}}({\mathbf{r}})} & {\mathbf{r}} \\ { - {\mathbf{r}}^{T} } & {r_{4} } \\ \end{array} } \right],$$
(44)
$${\mathbf{r}} = \left[ {\begin{array}{*{20}c} {r_{{1}} } & {r_{{2}} } & {r_{{3}} } \\ \end{array} } \right]^{T} ,$$
(45)
$${\mathbf{C}}({\mathbf{r}}) = \left[ {\begin{array}{*{20}c} 0 & { - r_{3} } & {r_{2} } \\ {r_{3} } & 0 & { - r_{1} } \\ { - r_{2} } & {r_{1} } & 0 \\ \end{array} } \right].$$
(46)

Expanding Eq. (42), one obtains

$${\mathbf{R}} = \left( {r_{{4}}^{{2}} - {\mathbf{r}}^{T} {\mathbf{r}}} \right){\mathbf{I}} + {2}\left( {{\mathbf{rr}}^{T} + r_{{4}} {\mathbf{C}}({\mathbf{r}})} \right).$$
(47)

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

$${\varvec{t}} = \frac{1}{2}\left[ {\begin{array}{*{20}c} {t_{x} } \\ {t_{y} } \\ {t_{z} } \\ 0 \\ \end{array} } \right] = \frac{1}{2}\left[ {\begin{array}{*{20}c} {\mathbf{t}} \\ 0 \\ \end{array} } \right],$$
(48)

according to Walker et al. (1991),

$$\varvec{t = }W({\varvec{r}})^{T} {\varvec{s}}\varvec{.}$$
(49)

Derivation and implementation of analytical dual quaternion algorithm


Introducing coordinate vector quaternions

$${\varvec{p}}_{i}^{o} = \left[ {\begin{array}{*{20}c} {{\mathbf{p}}_{i}^{o} } \\ 0 \\ \end{array} } \right],\;\;{\varvec{p}}_{i}^{t} = \left[ {\begin{array}{*{20}c} {{\mathbf{p}}_{i}^{t} } \\ 0 \\ \end{array} } \right],$$
(50)

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

$${\varvec{p}}_{i}^{t} = \lambda {\mathbf{W}}({\varvec{r}})^{T} Q({\varvec{r}}){\varvec{p}}_{i}^{o} + 2W({\varvec{r}})^{T} \varvec{s + e}_{i} ,$$
(51)

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

$$\mathop {\min }\limits_{{{\varvec{r}},{\varvec{s}},\lambda ,\beta_{{1}} ,\beta_{{2}} }} \left\{ {\tilde{e} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } {\varvec{e}}_{i}^{T} {\varvec{e}}_{i} + \beta_{{1}} \left( {{\varvec{r}}^{T} {\varvec{r}} - {1}} \right) + \beta_{{2}} {\varvec{s}}^{T} {\varvec{r}}} \right\},$$
(52)

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

$$\widetilde{e} = a + b\lambda^{{2}} + {4}c{\varvec{s}}^{T} {\varvec{s}} - {2}\lambda {\varvec{r}}^{T} {\mathbf{A}}{\varvec{r}} - {4}{\varvec{s}}^{T} {\mathbf{B}}\varvec{r + }{4}\lambda {\varvec{s}}^{T} {\mathbf{C}}\varvec{r + }\beta_{{1}} \left( {{\varvec{r}}^{T} {\varvec{r}} - {1}} \right) + \beta_{{2}} {\varvec{s}}^{T} {\varvec{r}},$$
(53)

where

$$a = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } {\varvec{p}}_{i}^{tT} {\varvec{p}}_{i}^{t} ,$$
(54)
$$b = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } {\varvec{p}}_{i}^{oT} {\varvec{p}}_{i}^{o} ,$$
(55)
$$c = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } ,$$
(56)
$${\mathbf{A}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } W({\varvec{p}}_{i}^{o} )^{T} Q({\varvec{p}}_{i}^{t} ),$$
(57)
$${\mathbf{B}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } Q({\varvec{p}}_{i}^{t} ),$$
(58)
$${\mathbf{C}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } W({\varvec{p}}_{i}^{o} ),$$
(59)

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

$$\frac{{\delta \widetilde{e}}}{{\delta {\varvec{r}}}} = - {4}\lambda {\varvec{r}}^{T} {\mathbf{A}} - {4}{\varvec{s}}^{T} {\mathbf{B}} + {4}\lambda {\varvec{s}}^{T} {\mathbf{C}} + {2}\beta_{{1}} {\varvec{r}}^{T} + \beta_{{2}} {\varvec{s}}^{T} = 0,$$
(60)
$$\frac{{\delta \widetilde{e}}}{{\delta {\varvec{s}}}} = {8}c{\varvec{s}}^{T} - {4}{\varvec{r}}^{T} {\mathbf{B}}^{T} \varvec{ + }{4}\lambda {\varvec{r}}^{T} {\mathbf{C}}^{T} + \beta_{{2}} {\varvec{r}}^{T} = 0,$$
(61)
$$\frac{{\delta \tilde{e}}}{\delta \lambda } = {2}b\lambda - {2}{\varvec{r}}^{T} {\mathbf{A}}\varvec{r + }{4}{\varvec{s}}^{T} {\mathbf{C}}\varvec{r = }{0,}$$
(62)
$$\frac{{\delta \tilde{e}}}{{\delta \beta_{{1}} }} = {\varvec{r}}^{T} {\varvec{r}} - {1} = {0,}$$
(63)
$$\frac{{\delta \tilde{e}}}{{\delta \beta_{{2}} }} = {\varvec{s}}^{T} {\varvec{r}} = {0}{\text{.}}$$
(64)

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).

$${\varvec{r}}^{T} {\mathbf{B}}{\varvec{r}} = {0},\;\;{\varvec{r}}^{T} {\mathbf{C}}\varvec{r = }{0}{\text{.}}$$
(65)

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

$$\beta_{{2}} \varvec{ = }{0}{\text{.}}$$
(66)

By Eq. (61), one obtains

$$\varvec{s = }\frac{{1}}{{{2}c}}\left( {{\mathbf{B}} - \lambda {\mathbf{C}}} \right){\varvec{r}}{.}$$
(67)

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

$$\lambda \varvec{ = }\frac{{{\varvec{r}}^{T} {\mathbf{A}}{\varvec{r}} - c^{{ - 1}} {\varvec{r}}^{T} {\mathbf{B}}^{T} {\mathbf{C}}{\varvec{r}}}}{{b - c^{{ - 1}} {\varvec{r}}^{T} {\mathbf{C}}^{T} {\mathbf{C}}{\varvec{r}}}}.$$
(68)

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

$$\left[ {{2}\lambda {\mathbf{A}} + \frac{{1}}{c}\left( {{\mathbf{B}} - \lambda {\mathbf{C}}} \right)^{T} \left( {{\mathbf{B}} - \lambda {\mathbf{C}}} \right)} \right]\varvec{r = }\beta_{{1}} {\varvec{r}}{.}$$
(69)

Introducing

$${\mathbf{F}}\varvec{ = }{2}\lambda {\mathbf{A}} + \frac{{1}}{c}\left( {{\mathbf{B}} - \lambda {\mathbf{C}}} \right)^{T} \left( {{\mathbf{B}} - \lambda {\mathbf{C}}} \right),$$
(70)

Equation (69) is re-expressed as

$${\mathbf{F}}\varvec{r = }\beta_{{1}} {\varvec{r}}{.}$$
(71)

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

$$e = a + b\lambda^{{2}} - \beta_{{1}} ,$$
(72)

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{F}}\varvec{ = }{2}\lambda {\mathbf{A}} + \frac{{1}}{c}\left( {{\mathbf{B}}^{T} {\mathbf{B}} - \lambda {\mathbf{B}}^{T} {\mathbf{C}} - \lambda {\mathbf{C}}^{T} {\mathbf{B}} + \lambda^{2} {\mathbf{C}}^{T} {\mathbf{C}}} \right).$$
(73)

\({\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:

$${\mathbf{B}}^{T} {\mathbf{B}} = \left[ {\left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} x_{i}^{t} } } \right)^{{2}} + \left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} y_{i}^{t} } } \right)^{{2}} + \left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} z_{i}^{t} } } \right)^{{2}} } \right]{\mathbf{I}}_{{4}} ,$$
(74)
$${\mathbf{C}}^{T} {\mathbf{C}} = \left[ {\left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} x_{i}^{o} } } \right)^{{2}} + \left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} y_{i}^{o} } } \right)^{{2}} + \left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} z_{i}^{o} } } \right)^{{2}} } \right]{\mathbf{I}}_{{4}} .$$
(75)

Further, Eq. (70) is rewritten as

$${\mathbf{F}}\varvec{ = }{2}\lambda \left( {{\mathbf{A}} - \frac{{1}}{c}{\mathbf{B}}^{T} {\mathbf{C}}} \right) + \frac{{1}}{c}\left( {{\mathbf{B}}^{T} {\mathbf{B}} + \lambda^{2} {\mathbf{C}}^{T} {\mathbf{C}}} \right).$$
(76)

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

$${\mathbf{F}}\mu \varvec{ = }\kappa \mu ,$$
(77)

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

$${2}\lambda \left( {{\mathbf{A}} - \frac{{1}}{c}{\mathbf{B}}^{T} {\mathbf{C}}} \right)\mu + \frac{{1}}{c}\left( {{\mathbf{B}}^{T} {\mathbf{B}} + \lambda^{2} {\mathbf{C}}^{T} {\mathbf{C}}} \right)\mu \varvec{ = }\kappa \mu .$$
(78)

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

$$\left( {{\mathbf{A}} - \frac{{1}}{c}{\mathbf{B}}^{T} {\mathbf{C}}} \right)\mu \varvec{ = }\frac{{1}}{{{2}\lambda }}\left[ {\kappa - \frac{{1}}{c}\left( {\tau^{{\text{t}}} + \lambda^{2} \tau^{o} } \right)} \right]\mu ,$$
(79)

where

$$\tau^{{\text{t}}} = \left[ {\left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} x_{i}^{t} } } \right)^{{2}} + \left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} y_{i}^{t} } } \right)^{{2}} + \left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} z_{i}^{t} } } \right)^{{2}} } \right],$$
(80)
$$\tau^{o} = \left[ {\left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} x_{i}^{o} } } \right)^{{2}} + \left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} y_{i}^{o} } } \right)^{{2}} + \left( {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} z_{i}^{o} } } \right)^{{2}} } \right].$$
(81)

Introducing

$${\mathbf{G}} = \left( {{\mathbf{A}} - \frac{{1}}{c}{\mathbf{B}}^{T} {\mathbf{C}}} \right),$$
(82)
$$\gamma = \frac{{1}}{{{2}\lambda }}\left[ {\kappa - \frac{{1}}{c}\left( {\tau^{{\text{t}}} + \lambda^{2} \tau^{o} } \right)} \right],$$
(83)

Equation (76) is rewritten as

$${\mathbf{G}}\mu \varvec{ = }\gamma \mu .$$
(84)

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

$$\beta_{{1}} = {2}\lambda \gamma_{\max } + \frac{{1}}{c}\left( {\tau^{{\text{t}}} + \lambda^{2} \tau^{o} } \right),$$
(85)

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

$$\sigma = \pm \sqrt {\frac{{\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } {\varvec{e}}_{i}^{T} {\varvec{e}}_{i} }}{3n - 7}} ,$$
(86)

or

$$\sigma = \pm \sqrt {\frac{{a + b\lambda^{{2}} - \beta_{{1}} }}{3n - 7}} .$$
(87)

The analytical dual quaternion algorithm is summarized in Table 1.

Table 1 The analytical dual quaternion algorithm of the weighted 3D coordinate transformation

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.

Table 2 3D coordinates of control points
Table 3 Point-wise weights
Table 4 Computed dual quaternion by ADQA
Table 5 Calculated transformation parameters by ADQA, MPA, and OMA

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.

Table 6 Common points extracted from two neighboring LIDAR point clouds
Table 7 Computed dual quaternion by ADQA
Table 8 Calculated transformation parameters by ADQA, MPA, and OMA

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.

Table 9 Simulative true coordinates of control points in the original system
Table 10 Simulative true values of transformation parameters
Table 11 Simulative true coordinates of control points in the target system
Table 12 Computed transformation parameters for Set 1 to Set 4 by ADQA, MPA, and OMA
Table 13 Computed transformation parameters for Set 5 to Set 6 by ADQA, MPA, and OMA

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.

Table 14 The settings of two test schemes

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, σ02) 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.

Fig. 1
figure 1

The errors of computed transformation parameters and standard deviation of unit weight caused by different normal distributed random nosies N(0, \(\sigma_{0}^{2}\)). Each x axis value represents the different \(\sigma_{0}\) in meters. Each y axis value represents different accuracy index values: (a) error of rotation angle, in degrees. (b) Error of translation, in meters. (c) error of scale, in no unit. (d) \(\sigma\) in meters

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.0012) 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.

Fig. 2
figure 2

The errors of computed transformation parameters and standard deviation of unit weight with different rotation angle \(\theta_{0}\). Each x axis value represents the different \(\theta_{0}\) in degrees. Each y axis value represents different accuracy index: (a) error of rotation angle, in degrees. (b) Error of translation, in meters. (c) Error of scale, in no unit. (d) \(\sigma\) in meters

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.

Availability of data and materials

The case data were collected from Grafarend and Awange (2003), Wang et al. (2014), and Zeng (2015).

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

Download references

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

Authors

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

Correspondence to Huaien Zeng.

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

$${\mathbf{B}} = \left[ {\begin{array}{*{20}c} {0} & { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} } & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} } & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} } \\ {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} } & {0} & { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} } & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} } \\ { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} } & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} } & {0} & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} } \\ { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} } & { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} } & { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} } & {0} \\ \end{array} } \right],$$
(88)
$${\mathbf{C}} = \left[ {\begin{array}{*{20}c} {0} & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} } & { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} } & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} } \\ { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} } & {0} & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} } & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} } \\ {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} } & { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} } & {0} & {\sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} } \\ { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} } & { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} } & { - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} } & {0} \\ \end{array} } \right];$$
(89)

thus,

$${\mathbf{B}}^{T} {\mathbf{C}} = - {\mathbf{BC}} = {\mathbf{N}} = \left[ {\begin{array}{*{20}c} {{\mathbf{N}}_{{{11}}} } & {{\mathbf{N}}_{{{12}}} } & {{\mathbf{N}}_{{{13}}} } & {{\mathbf{N}}_{{{14}}} } \\ {{\mathbf{N}}_{{{21}}} } & {{\mathbf{N}}_{{{22}}} } & {{\mathbf{N}}_{{{23}}} } & {{\mathbf{N}}_{{{24}}} } \\ {{\mathbf{N}}_{{{31}}} } & {{\mathbf{N}}_{{{32}}} } & {{\mathbf{N}}_{{{33}}} } & {{\mathbf{N}}_{{{34}}} } \\ {{\mathbf{N}}_{{{41}}} } & {{\mathbf{N}}_{{{42}}} } & {{\mathbf{N}}_{{{43}}} } & {{\mathbf{N}}_{{{44}}} } \\ \end{array} } \right],$$
(90)

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

$${\mathbf{N}}_{{{11}}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} ,$$
(91)
$${\mathbf{N}}_{{{22}}} = - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} + \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} ,$$
(92)
$${\mathbf{N}}_{{{33}}} = - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} + \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} ,$$
(93)
$${\mathbf{N}}_{{{44}}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} + \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} + \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} ,$$
(94)
$${\mathbf{N}}_{{{12}}} = {\mathbf{N}}_{{{21}}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} + \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} ,$$
(95)
$${\mathbf{N}}_{{{13}}} = {\mathbf{N}}_{{{31}}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} + \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} ,$$
(96)
$${\mathbf{N}}_{{{14}}} = {\mathbf{N}}_{{{41}}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} ,$$
(97)
$${\mathbf{N}}_{{{23}}} = {\mathbf{N}}_{{{32}}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} + \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} ,$$
(98)
$${\mathbf{N}}_{{{24}}} = {\mathbf{N}}_{{{42}}} = - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} + \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } z_{i}^{o} ,$$
(99)
$${\mathbf{N}}_{{{34}}} = {\mathbf{N}}_{{{43}}} = \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{o} - \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } x_{i}^{t} \sum\limits_{{i = {1}}}^{n} {\alpha_{i} } y_{i}^{o} .$$
(100)

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/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

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

Keywords