---
title: Quaternion-Based Pose Encoding
url: https://www.emergentmind.com/topics/quaternion-based-pose-encoding
type: topic
---

# Quaternion-Based Pose Encoding

Quaternion-based pose encoding denotes a family of representations in which orientation, and in many formulations the full rigid-body configuration, is parameterized by quaternions rather than Euler angles or unconstrained matrices. In its simplest form, a pose is written as translation plus a unit quaternion; in its rigid-motion extension, a unit dual quaternion couples translation and rotation in a single algebraic object so that composition remains multiplicative. Across robotics, vision, animation, uncertainty modeling, and control, the main attraction of this family is its compactness, its avoidance of Euler-angle singularities, and its close fit to the geometry of \(SO(3)\) and \(SE(3)\) [2103.15980, 2203.13653].

## 1. Rotation encoding with unit quaternions

An ordinary quaternion is written as
\[
q = w + xi + yj + zk,
\]
with multiplication rules \(i^2=j^2=k^2=ijk=-1\). Its conjugate is
\[
q^* = w-xi-yj-zk,
\]
and a unit quaternion satisfies
\[
w^2+x^2+y^2+z^2=1.
\]
For rotation encoding, a 3D point is identified with a pure imaginary quaternion, and the rotation is applied by
\[
r \mapsto q r q^*.
\]
The axis-angle form is standard:
\[
q = \left(\cos \frac{\theta}{2},\; \mathbf{n}\sin\frac{\theta}{2}\right),
\]
with \(\mathbf{n}\) a unit axis. In the “3D+Quat” pose parameterization reviewed in the \(\mathbf{SE}(3)\) tutorial, a full pose is stored as
\[
\mathbf{p_7}=[x~y~z~q_r~q_x~q_y~q_z]^\top,
\]
where the quaternion part is always normalized; the same tutorial adopts the convention \(q_r\ge 0\) to choose one representative from the usual sign ambiguity [2103.15980].

The sign ambiguity is structural rather than incidental. Because the quaternion-to-rotation map is quadratic, \(R(q)=R(-q)\), so unit quaternions form a double cover of \(SO(3)\) [2203.04456]. The adjugate-matrix study makes the stronger point that quaternion extraction from a rotation matrix is not globally representable as a single smooth algebraic function of the matrix entries: the inverse must instead be treated as manifold-valued and multi-branch, with different single-valued sectors selected by the adjugate construction [2205.09116]. This is one reason quaternion pipelines routinely include branch selection, sign conventions, or continuity heuristics across time.

## 2. From rotation to full rigid-body pose: dual quaternions

A rigid-body pose consists of a rotation and a translation, often written as \((R,t)\) acting on a point \(r\in\mathbb{R}^3\) by
\[
r \mapsto Rr+t.
\]
Composition is
\[
(R_1,t_1)\circ(R_2,t_2)=(R_1R_2,\;t_1+R_1t_2).
\]
Ordinary quaternions handle the rotational part elegantly, but a pose written simply as \((Q,t)\) has the composition rule
\[
(Q_1,t_1)\circ(Q_2,t_2)=(Q_1Q_2,\;t_1+Q_1t_2Q_1^*),
\]
which is not bilinear in the data. The dual-quaternion construction addresses precisely this issue by introducing
\[
\eta = A+\varepsilon B,\qquad \varepsilon^2=0,
\]
with \(A\) and \(B\) ordinary quaternions. A full rigid-body pose is then encoded as the unit dual quaternion
\[
\eta = Q + \frac{1}{2}\varepsilon\, tQ,
\]
where \(Q\) is the unit rotational quaternion and \(t\) is the translation interpreted as a vector quaternion [2203.13653].

This encoding turns rigid-motion composition into dual-quaternion multiplication. If \(\eta_1\) and \(\eta_2\) encode two poses, then the composed pose is represented by \(\eta_1\eta_2\). For a unit dual quaternion \(\eta=Q+\varepsilon B\), the transformed point is
\[
s = QrQ^* + 2BQ^*,
\]
which reduces to \(s=QrQ^*+t\) when \(B=\tfrac12 tQ\). Unit dual quaternions also admit especially simple inversion,
\[
\eta^{-1}=\eta^*,
\]
and simple normalization back onto the rigid-motion manifold, which is computationally easier than projecting an arbitrary matrix onto a valid rigid transform [2203.13653]. Closely related formulations appear in distributed camera-network localization, where a pose is written as
\[
\mathbf{d}=\mathbf{q}_r+\frac{\varepsilon}{2}\,\mathbf{q}_t\circ \mathbf{q}_r,
\]
with \(\|\mathbf{q}_r\|^2=1\) and \(\mathbf{q}_r^\top \mathbf{q}_d=0\), making rotation and translation one optimization variable rather than two interlaced estimators [2203.06278].

The same algebra extends naturally to differential kinematics. In dual-quaternion form, a twist is encoded as
\[
\phi=\frac12 w + \frac12 \varepsilon v,
\]
and the pose kinematics retain the familiar multiplicative form
\[
\dot{\eta}=\eta\phi.
\]
This pairing of unit dual quaternions for pose and vector dual quaternions for twist is one of the main reasons the representation is attractive in robotics and mechanics [2203.13653].

## 3. Ambiguity, continuity, and probabilistic pose models

Quaternion-based pose encoding is inseparable from antipodal symmetry. Any probabilistic model that operates directly on quaternions must respect \(q\sim -q\). The Bingham-distribution formulation for rotation estimation does exactly this by defining a density on \(S^3\) whose quadratic exponent is unchanged under \(q\mapsto -q\). In that framework, the mode quaternion gives the most likely rotation, while the eigenstructure and concentration parameters encode uncertainty shape and magnitude. On YCB-Video, the best-performing parameterization in the paper is the 10D symmetric-matrix representation \(P_{10}\), which slightly outperforms conventional quaternion regression in the reported average AUC: \(55.1\) versus \(52.9\) on ADD and \(75.1\) versus \(74.1\) on ADD-S [2203.04456].

For 6-DoF uncertainty, the MPG framework uses dual quaternions as the pose parameterization and constructs a local Gaussian in a tangent space to the unit-quaternion sphere, combined with Euclidean translation. A rigid pose is encoded as
\[
dq = q_r + \varepsilon \frac{1}{2} q_t q_r,
\]
with \(q_r\) a unit quaternion and \(q_t=[0,x,y,z]\) a purely imaginary translation quaternion. Projecting a 6D Gaussian from the tangent space back to \(S^3\times\mathbb{R}^3\) induces a “Projected Gaussian,” and mixtures of such components are used to represent broad or multimodal pose uncertainty while preserving quaternion geometry [1707.01941].

The continuity problem also reappears in deterministic extraction and learning. The adjugate approach argues that the correct algebraic object for inversion is not a single quaternion-valued function \(q=f(R)\), but the rank-1 matrix \(A(q)=qq^\top\), from which one normalizes a valid branch. This suggests that some apparently ad hoc quaternion sign-handling rules are consequences of the topology of \(S^3\) and its double cover of \(SO(3)\), not merely implementation detail [2205.09116].

## 4. Articulated motion, sequence models, and learned pose spaces

In articulated human motion, quaternion-based pose encoding is often used not just to store rotations, but to restructure the learning problem. For deep skeletal animation, one dual-quaternion formulation represents each frame by a separate global root translation plus, for each non-root joint, a dual quaternion encoding that joint’s rotation and displacement relative to the root. The representation is explicitly root-centered and hierarchy-aware: local BVH transforms are converted into current/root-relative transforms, then into dual quaternions. Because positions are directly recoverable from the dual part through
\[
q_t = 2 q_d q_r^*,
\]
the model can apply positional supervision without an external forward-kinematics layer. In the reported experiments, dual quaternions with all losses achieve the best acRNN scores overall—lowest NPSS, lowest Euclidean error, and lowest acceleration error—and on QuaterNet long horizons they reduce error at \(4000\) ms from \(13.1485\) to \(4.7124\), roughly the reported \(65\%\) improvement [2111.13907].

Recent work in sign language production uses a different articulated formulation: each bone is represented by a quaternion relative to a reference T-pose bone direction,
\[
q_i=\left(\cos(\theta_i/2),\,\sin(\theta_i/2)u^{(i)}\right),
\]
and training uses the geodesic loss
\[
\mathcal{L}_{\text{Geo}}=\frac{1}{(T+1)N_{\text{bones}}}\sum_{t,i}\arccos\!\left(2(q'_i[t]\cdot q_i[t])^2-1\right).
\]
The model then reconstructs joint positions by recursively applying bone rotations from the root. In that study, quaternion encoding alone reduces mean bone angle error from \(36.93\) to \(35.66\), and when combined with gloss-supervised contrastive learning the model reaches \(34.69\), corresponding to the reported \(6\%\) reduction in Mean Bone Angle Error relative to the Progressive Transformers baseline [2508.14574].

Quaternion-aware dynamics also appear in trajectory models. Riemannian ProMPs treat orientation trajectories as points on \(\mathcal{S}^3\), replacing the Euclidean mean \(\Psi_t w\) by \(\mathrm{Exp}_{p}(\Psi_t w)\) and performing conditioning and blending through log, exp, and parallel transport. In the reported re-orient skill, Riemannian orientation ProMPs achieve jerkiness \(21.1\), versus \(338.8\) for Euler-angle ProMPs and \(278.7\) for unit-normalized Euclidean quaternion ProMPs, with substantially better tracking accuracy under via-point adaptation [2110.15036]. QuaMo pushes the dynamical viewpoint further by treating each joint rotation as a quaternion state evolved by a quaternion differential equation on the unit sphere. Its exact update
\[
q_{t+\Delta t}=\exp\!\left(\frac{\Delta t}{2}\Omega(\omega_{t+\Delta t})\right)q_t = q_\omega \otimes q_t
\]
preserves the quaternion unit-sphere constraint and, in the paper’s ablations, quaternion PD outperforms Euler and axis-angle variants, with MPJPE \(53.8\) and Accel \(5.7\) versus \(74.4/13.7\) for Euler XYZ PD [2601.19580].

A related but distinct dual-quaternion learning strategy appears in rigid-motion forecasting: one model encodes center-of-mass coordinates in the real part and joint locations relative to the center of mass in the dual part,
\[
\widehat{\mathbf{q}} = x_c \mathbf{i} + y_c \mathbf{j} + z_c \mathbf{k} + \varepsilon\left((x-x_c)\mathbf{i} + (y-y_c)\mathbf{j} + (z-z_c)\mathbf{k}\right),
\]
arguing that this yields both rotation and translation equivariance. On 3DPW, the reported Dual Quaternion CoRPoF reaches VIM \(15.23\) and FDE \(0.266\), compared with \(16.76/0.317\) for the real-valued CoRPoF baseline [2310.07623].

## 5. Vision, estimation, control, and planning

In vision, quaternion-based pose encoding appears in both full-pose and rotation-only forms. QuEst uses a unit quaternion to encode relative camera rotation between two views, solves quartic polynomial constraints in \(w,x,y,z\), and then estimates translation and point depths in a separate linear null-space stage. Its 6-point variant is explicitly designed to remain valid for both general 3D and coplanar point configurations, unlike essential-matrix methods on critical surfaces [1704.02672]. At the opposite end of the spectrum, the monocular shoulder-based “quaternion extraction” method is not a full articulated pose code at all; it constructs a local frame from the left and right shoulders, converts the resulting \(3\times 3\) rotation matrix to a quaternion, and uses it as a cheap body-orientation descriptor. The paper itself emphasizes that this is a task-specific global torso/facing estimate, not a full-body kinematic encoding [2303.08657].

In estimation and feedback control, dual quaternions are used precisely because they keep translation and rotation coupled. Distributed visual-sensor-network localization represents each camera pose as a unit dual quaternion and reports a more balanced estimation error distribution between orientation and position, together with improved robustness to initial conditions, relative to a split \(\mathbb{SO}(3)\times\mathbb{R}^3\) estimator [2203.06278]. Dual-quaternion visual servoing for grasping moving objects uses the pose error
\[
\dq{e}=\dq{x}_c^* \dq{x}_d
\]
and the logarithmic control law
\[
\dq{\omega}_c^B=\log(\dq{e}),
\]
combining it with a damped pseudoinverse and null-space term for joint-limit avoidance [2107.08149]. Pose-following control likewise writes the desired pose as
\[
\hat{q}_d(\theta)=q_d(\theta)+\frac{\epsilon}{2}p_d(\theta)\circ q_d(\theta),
\]
defines the error \(\hat q_e=\hat q \circ \hat q_d^*\), and proves an almost globally asymptotically stable control law; the qualifier “almost” is tied directly to the inherited quaternion double cover and the two equivalent equilibria \(\pm \hat I\) [2308.09507].

The same geometric backbone is carried into filtering and planning. A distributed dual-quaternion multiplicative EKF for spacecraft pose estimation keeps the nominal pose as a unit dual quaternion, uses reduced tangent-space error coordinates in the filter state, and applies multiplicative corrections so that unit constraints are preserved after each update [2411.19033]. In motion planning, dual quaternion RRT* uses the state
\[
\hat q = q_r + \varepsilon \frac12 [0,\vec t]\,q_r
\]
and steers with screw linear interpolation,
\[
\hat q(s)=\hat q_1(\hat q_1^{-1}\hat q_2)^s,
\]
rather than separate linear translation and SLERP; the reported comparison emphasizes enhanced pose continuity and smoother 6-DoF evolution [2512.17680]. A closely related orientation-control line encodes quaternion trajectories in the tangent space at the attractor,
\[
\mathfrak q_{att}=\log_{q_{att}}(q),
\]
and learns a stable LPV dynamical system there; the resulting Quaternion-DS is then coupled with Euclidean position through shared SE(3) gating so that position and orientation transition coherently under perturbations [2403.16366].

## 6. Advantages, limits, and competing representations

The advantages claimed for quaternion-based pose encoding are consistent across subfields. Unit quaternions are compact, singularity-free for rotation, and easy to normalize; dual quaternions extend these benefits to full rigid-body motion while preserving multiplicative composition, simple inversion, and differential kinematics [2203.13653]. In deep learning, quaternion-specific inductive bias can also be parameter-efficient: Quaternion Capsule Networks represent capsule pose as pure quaternions and child-to-parent transformations as learned unit rotor quaternions, reporting improved viewpoint generalization on smallNORB with roughly half the parameters of Matrix Capsules; on azimuth-novel viewpoints, the reported error is \(7.5\%\) for QCN versus \(13.5\%\) for Matrix Capsules EM [2007.04389].

The limits are equally structural. Ordinary quaternions encode rotation only; whenever translation matters, it must be handled separately or absorbed into a dual-quaternion extension [2203.13653]. Both quaternions and dual quaternions retain sign ambiguity, and practical systems often require antipodal correction, branch selection, or continuity heuristics across time [2111.13907, 2205.09116]. Quaternion-only learning can also leave positional correctness to a separate forward-kinematics mechanism, which is precisely why several animation papers prefer dual quaternions or root-centered rigid transforms [2111.13907]. Probabilistic Bingham models remain unimodal on \(S^3\) up to antipodal symmetry, so they cannot represent strongly multimodal discrete rotational ambiguity well [2203.04456]. In articulated human motion, dual-quaternion rigid-motion ideas often need to be adapted into global/local decompositions because a full skeleton is not a single rigid body [2310.07623].

Competing representations address some of these issues differently. Euler angles are simple but suffer from discontinuity and gimbal lock [2111.13907, 2601.19580]. Rotation matrices are overparameterized and require orthogonality constraints [2103.15980, 2508.14574]. Continuous 6D rotation encodings avoid some quaternion continuity problems, but in the skeletal-animation comparison they still encode only rotation, not translation, and require conversion to transform matrices for forward kinematics [2111.13907]. This suggests a practical partition of use cases rather than a universal winner: unit quaternions are well suited to rotation-only state variables, dual quaternions to full \(SE(3)\) pose and twist, and manifold-aware probabilistic or tangent-space variants to uncertainty, conditioning, and stable learning on non-Euclidean pose domains.

Source: https://www.emergentmind.com/topics/quaternion-based-pose-encoding