Skip to main content

Camera Motion Correction with PGA

  • Conference paper
  • First Online:
Advances in Computer Graphics (CGI 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14498))

Included in the following conference series:

  • 216 Accesses

Abstract

In this paper we study the geometry and kinematics of stabilizing a moving camera in order to track a stationary scene both in the 2D and 3D setting. This is being done initially in a rather straightforward manner, using the tools of analytic and differential geometry, after which we discuss the advantages of the so-called ‘projective geometric algebra’ (PGA) approach in this context. In the planar case one can easily get equivalent results with complex numbers, but in 3D it is a convenient substitute for Plücker line geometry and the theory of screws. While a lot can be done using quaternions and differential geometry, PGA is quite handy when there are different rotation or screw axes involved. Its basic constructions and properties are briefly summarized in the appendix.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    the cancellation of the two terms is well known from geostationary satellites and other cases of circular orbits (see Fig. 1b).

  2. 2.

    the preferred reference point of the observed object.

  3. 3.

    k-blades in \(\textrm{Cliff}(V)\) are products of k vectors and correspond to k-dimensional linear subspaces; in particular 2-blades represent (projectively) planes and satisfy \(b\wedge b =0\).

References

  1. e Souza, M.R., de Almeida Maia, H., Pedrini, H.: Survey on digital video stabilization: concepts, methods, and challenges. ACM Comput. Surv. 55(3) (2023). Article 47

    Google Scholar 

  2. Wang, Y., Huang, Q., Jiang, C., Liu, J., Shang, M., Miao, Z.: Video stabilization: a comprehensive survey. Neurocomputing 516, 205–230 (2023)

    Article  Google Scholar 

  3. Pueyo, P., Montijano, E., Murillo, A.C., Schwager M.: CineMPC: controlling camera intrinsics and extrinsics for autonomous cinematography. In: 2022 International Conference on Robotics and Automation (ICRA), pp 4058–4064. IEEE Press (2022). https://doi.org/10.1109/ICRA46639.2022.9811827

  4. Wu, X., Wang, H., Katsaggelos, A.K.: The secret of immersion: actor driven camera movement generation for auto-cinematography (preprint, 2023). arXiv:2303.17041 [cs.MM]

  5. Kang, X., Herrera, A., Lema, H., Valencia, E., Vandewalle, P.: Adaptive sampling-based particle filter for visual-inertial gimbal in the wild. In: 2023 IEEE International Conference on Robotics and Automation (ICRA), London, United Kingdom, pp. 2738–2744 (2023). https://doi.org/10.1109/ICRA48891.2023.10160395

  6. Clelland, J.: From Frenet to Cartan: The Method of Moving Frames. American Mathematical Society, Providence (2017)

    Book  Google Scholar 

  7. Brezov, D., Mladenova, C., Mladenov, I.: From the kinematics of precession motion to generalized Rabi cycles. Adv. Math. Phys. (2018). Article ID 9256320

    Google Scholar 

  8. Brezov, D.: Optimization and gimbal lock control via shifted decomposition of rotations. J. Appl. Comput. Math. 7, 410 (2018)

    Google Scholar 

  9. Dorst, L., De Keninck, S.: A guided tour to the plane-based geometric algebra PGA (preprint, 2022). https://bivector.net/PGA4CS.html

  10. Hrdina, J., Návrat, A., Vas̆ik, P., Dorst L.: Projective geometric algebra as a subalgebra of conformal geometric algebra. Adv. Appl. Clifford Algebras 31(18) (2021)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Danail Brezov .

Editor information

Editors and Affiliations

Appendix: PGA in a Nutshell

Appendix: PGA in a Nutshell

Here we provide a brief idea how projective geometric algebra (PGA) works in this setting. The classical Clifford’s geometric algebra is often introduced as a factorization of the tensor algebra or an extension to the Grassmann exterior algebra. However, it is easier to understand starting with a vector space \(V\cong {\mathbb R}^n\) with additional structure, called geometric multiplication, which for vectors is just the sum of the familiar‘dot’ (interior) and‘wedge’ (exterior) products, i.e.,

$$\begin{aligned} {\boldsymbol{\xi }} {\boldsymbol{\eta }} = {\boldsymbol{\xi }} \cdot {\boldsymbol{\eta }} + {\boldsymbol{\xi }} \wedge {\boldsymbol{\eta }},\qquad {\boldsymbol{\xi }}, {\boldsymbol{\eta }}\in V. \end{aligned}$$
(21)

This yields a scalar and a bivector component, referred to as grade zero and grade two elements, respectively. Using grade projectors we may write \(\langle {\boldsymbol{\xi }} {\boldsymbol{\eta }}\rangle _0 = {\boldsymbol{\xi }}\cdot {\boldsymbol{\eta }}\) and \(\langle {\boldsymbol{\xi }} {\boldsymbol{\eta }}\rangle _2 = {\boldsymbol{\xi }}\wedge {\boldsymbol{\eta }}\). The maximal possible grade equals n and is one-dimensional, spanned by the so-called pseudo-scalar I. It yields the Hodge operator \(\star \) switching from k to \(n-k\) grades by sending each element to its orthogonal complement. This convenient duality is extensively used in all of geometry, and PGA in particular. Allowing hyperbolic or parabolic signatures we model different isometry groups, e.g. Lorenz transformations via the space-time algebra \(\textrm{Cliff}({\mathbb R^{3,1}})\) or 3D Euclidean motions via PGA: \(\textrm{Cliff}({\mathbb R^{3,0,1}})\). They are contained in the subalgebra of even grade elements, justified by the \({\mathbb Z}_2\)-grading of \(\textrm{Cliff}(V)\), and generated by bivectors. One simple example is the algebra of complex numbers \(\mathbb {C}\cong \textrm{Cliff}_\circ ({\mathbb R^{2}})\)

$$\begin{aligned} \textbf{e}_1^2 = \textbf{e}_2^2 = 1,\qquad \textbf{e}_1\cdot \textbf{e}_2 =0,\qquad \textbf{e}_1\wedge \textbf{e}_2 = \textbf{e}_1 \textbf{e}_2 = I \end{aligned}$$

spanned by mutually commuting scalars and bivectors, where we also have

$$\begin{aligned} I^2 = (\textbf{e}_1 \textbf{e}_2)^2 = -\textbf{e}_1^2 \textbf{e}_2^2 = -1\;\Rightarrow \;\textrm{Cliff}_\circ ({\mathbb R^{2}})\cong {\mathbb R}[i]\cong \mathbb {C}. \end{aligned}$$

Restriction to elements of unit norm yields the orthogonal group in the plane \({\mathrm O}(2)\cong {\mathrm U}(1)\). Similarly, the even part of \(\textrm{Cliff}({\mathbb R^{3}})\) gives rise to the quaternion algebra \(\mathbb {H}\) spanned by the scalars in \(\mathbb {R}\) and the three basic bi-vectors

$$\begin{aligned} \textbf{i} = \textbf{e}_2 \textbf{e}_3,\qquad \textbf{j} = \textbf{e}_3 \textbf{e}_1,\qquad \textbf{k} = \textbf{e}_1 \textbf{e}_2 \end{aligned}$$

carved on that famous Dublin bridge by Hamilton, while \(\textrm{Cliff}({\mathbb R^{3}})\cong \textrm{Cliff}_\circ ({\mathbb R^{3,1}})\) includes also reflections, interpreted as boosts from the relativistic perspective. In order to extend to the Galilean group of rigid transformations in \(\mathbb {E}^n\), however, one needs to add one more dimension spanned by \(\textbf{e}_\circ \) with \(\textbf{e}_\circ ^2 = 0\). Then, it is convenient to use the \(\star \)-duality and represent points as n-vectors, lines as \((n-1)-\)vectors etc., with actual vectors corresponding to their orthogonal hyper-planes.

In the 3D setting for instance, points are given by their homogeneous coordinates \(\{p_i\}\) in the basis of three-vectors as

$$\begin{aligned} P = p_\circ I_3 - \textbf{e}_\circ ( p_1 \textbf{i} + p_2 \textbf{j} + p_3 \textbf{k}),\quad I_3 = \textbf{e}_1 \textbf{e}_2\textbf{e}_3 \end{aligned}$$

and the Euclidean projection is in the plane \(p_\circ = 1\), i.e., \(\textbf{r}_p\) has coordinates \(p_i/p_\circ \), while \(p_\circ = 0\) corresponds to a ‘point at infinity’ and cannot be normalized in this way. Similarly, lines are presented by their Plücker coordinates

$$\begin{aligned} \ell = u_1 \textbf{i} + u_2 \textbf{j} + u_3 \textbf{k} - \textbf{e}_\circ (m_1\textbf{e}_1 + m_2 \textbf{e}_2 + m_3\textbf{e}_3) \end{aligned}$$

with \(\textbf{u}\) and \(\textbf{m}\) denoting the so-called displacement and moment vector, respectively. Finally, planes are given by vectors in \(\textrm{Cliff}({\mathbb R^{3,0,1}})\), namely as:

$$\begin{aligned} {\alpha } = n_1\textbf{e}_1 + n_2 \textbf{e}_2 + n_3\textbf{e}_3 - \delta \textbf{e}_\circ \end{aligned}$$

and the incidence relation \(P\in \alpha \) is now written as \(P\cdot \alpha = 0\) instead of the usual \(\textbf{n}\cdot \textbf{r}_p = \delta \). If we denote bivectors with \(\hat{\textbf{v}} = \textbf{v}I_3\), the so-called ‘flats’ are given as

$$\begin{aligned} P = p_\circ I_3 - \textbf{e}_\circ \hat{\textbf{p}},\qquad \ell = \hat{\textbf{u}} - \textbf{e}_\circ \textbf{m},\qquad \alpha = \textbf{n}-\delta \textbf{e}_\circ \end{aligned}$$
(22)

and we can use the wedge product as a ‘meet’ operator to find intersections, e.g.

$$\begin{aligned} \ell \wedge \alpha = (\hat{\textbf{u}} - \textbf{e}_\circ \textbf{m})\wedge (\textbf{n}-\delta \textbf{e}_\circ ) = \textbf{u}\cdot \textbf{n}I_3 - \textbf{e}_\circ (\delta \hat{\textbf{u}} - \textbf{n}\wedge \textbf{m}) \end{aligned}$$

which seems more handy that resolving linear algebraic systems. Note that if \(\textbf{u}\perp \textbf{n}\), the two flats are parallel and we end up with a point at infinity (\(p_\circ = 0\)). Likewise, two parallel lines meet at infinity unless their moments are equal. We interpret \(\textbf{e}_\circ \) as the normal vector to the plane at infinity (and to all \(\mathbb {E}^3\)) but should resist the temptation to replace it with the hypercomplex unit \(\varepsilon \) used in dual numbers \(\mathbb {D} \cong \mathbb {R}[\varepsilon ]\) as it does not commute with all elements of our algebra.

The interior product on the other hand, is used for projections, e.g. \((\ell \cdot \alpha )\alpha ^{-1}\) yields the \(\alpha \)-‘shadow’ of \(\ell \). Using the Hodge duality, we define the ‘join’ operator

$$\begin{aligned} A \vee B = \star ^{-1}(\star A \wedge \star B),\quad \star A = A I_3^{-1} = - AI_3 \end{aligned}$$
(23)

via the famous De Morgan’s law and due to its symmetry, we also have

$$A \wedge B = \star ^{-1}(\star A \vee \star B).$$

In particular, one may use \(\vee \) to represent the line \(\ell = P\vee Q\) through points P and Q, or the plane \(\alpha = \ell \vee P\) determined by the line \(\ell \) and a point \(P\notin \ell \), i.e. \(\ell \wedge R = 0\), etc.

Finally, let us see how these geometric objects produce transformations. We begin with plane reflections as they generate all isometries in 3D due to the famous Catrtan-Dieudonne theorem, and in PGA they act as

$$\begin{aligned} \alpha :\; P \;\rightarrow \; \tilde{P} = \mathcal {M}_\alpha (P) = -\alpha P \alpha ^{-1}. \end{aligned}$$
(24)

They are interpreted as Lie elements generation motion via the exponential map

$$\begin{aligned} \mathcal {T}_\ell :\; P \;\rightarrow \; \tilde{P} = e^{-\ell } P e^\ell \end{aligned}$$
(25)

which corresponds to either a rotation (\(\ell ^2<0\)), translation (\(\ell ^2 = 0\)) or a screw displacement if \(\ell \) is not a bladeFootnote 3. The magnitude of \(\ell \) is proportional to the rotation angle, as we know from the examples of quaternions and complex numbers. For a more elaborate introduction to PGA we refer the reader to [9] and [10].

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Brezov, D., Werman, M. (2024). Camera Motion Correction with PGA. In: Sheng, B., Bi, L., Kim, J., Magnenat-Thalmann, N., Thalmann, D. (eds) Advances in Computer Graphics. CGI 2023. Lecture Notes in Computer Science, vol 14498. Springer, Cham. https://doi.org/10.1007/978-3-031-50078-7_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-50078-7_28

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-50077-0

  • Online ISBN: 978-3-031-50078-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics