Skip to main content
Log in

ToTem NRSfM: Object-Wise Non-rigid Structure-from-Motion with a Topological Template

  • Published:
International Journal of Computer Vision Aims and scope Submit manuscript

Abstract

We present a Non-Rigid Structure-from-Motion (NRSfM) method to reconstruct an object whose topology is known. We represent the topology by a 3D shape that weakly resembles the object, which we call a Topological Template (ToTem). The ToTem has two main differences with the template used in Shape-from-Template (SfT). First, the shape in the ToTem is not necessarily feasible for the object, whereas it must be in the SfT template. Second, the ToTem only models shape, excluding the classical texture-map representing colour in the SfT template. These two differences greatly alleviate the practical difficulty of constructing a template. However, they make the reconstruction problem challenging, as they preclude the use of strong deformation constraints between the template shape and the reconstruction and the possibility of directly establishing correspondences between the template and the images. Our method uses an isometric deformation prior and proceeds in four steps. First, it reconstructs point-clouds from the images. Second, it aligns the ToTem to the point-clouds. Third, it creates a coherent surface parameterisation. Fourth, it performs a global refinement, posed as Bundle Adjustment (BA). We show experimentally that our method outperforms the existing methods for its isolated steps and NRSfM methods overall, in terms of 3D accuracy, ability to reconstruct the object’s visible surface and ability to approximate the object’s invisible surface.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Algorithm 1
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20

Similar content being viewed by others

Data availability

Code and data available at https://github.com/agnivsen/ToTem-NRSfM

References

  • Azagra, P., Sostres, C., Ferrandez, Á., Riazuelo, L., Tomasini, C., Barbed, O. L., Morlana, J., Recasens, D., Batlle, V. M., Gómez-Rodríguez, J. J., et al. (2022). Endomapper dataset of complete calibrated endoscopy procedures. arXiv preprint arXiv:2204.14240

  • Bai, F., & Bartoli, A. (2022). Procrustes analysis with deformations: A closed-form solution by eigenvalue decomposition. International Journal of Computer Vision, 547, 1–27.

    Google Scholar 

  • Barron, J. T., & Malik, J. (2014). Shape, illumination, and reflectance from shading. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(8), 1670–1687.

    Article  Google Scholar 

  • Bartoli, A., Gérard, Y., Chadebecq, F., Collins, T., & Pizarro, D. (2015). Shape-from-template. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(10), 2099–2118.

    Article  Google Scholar 

  • Bartoli, A., Perriollat, M., & Chambon, S. (2010). Generalized thin-plate spline warps. International Journal of Computer Vision, 88(1), 85–110.

    Article  Google Scholar 

  • Bellekens, B., Spruyt, V., Berkvens, R., & Weyn, M. (2014). A survey of rigid 3D pointcloud registration algorithms. In AMBIENT 2014: The fourth international conference on ambient computing, applications, services and technologies, August 24–28, 2014 (pp. 8–13). Rome, Italy.

  • Berger, M., Tagliasacchi, A., Seversky, L. M., Alliez, P., Guennebaud, G., Levine, J. A., Sharf, A., & Silva, C. T. (2017). A survey of surface reconstruction from point clouds. In Computer graphics forum (Vol. 36, pp. 301–329). Wiley.

  • Bernard, F., Schmidt, F. R., Thunberg, J., & Cremers, D. (2017). A combinatorial solution to non-rigid 3D shape-to-image matching. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 1000–1009).

  • Bernardini, F., Mittleman, J., Rushmeier, H., Silva, C., & Taubin, G. (1999). The ball-pivoting algorithm for surface reconstruction. IEEE Transactions on Visualization and Computer Graphics, 5(4), 349–359.

    Article  Google Scholar 

  • Besl, P. J. & McKay, N. D. (1992). Method for registration of 3-D shapes. In Sensor fusion IV: Control paradigms and data structures (Vol. 1611, pp. 586–606). International Society for Optics and Photonics.

  • Bezdek, J. C., & Hathaway, R. J. (2002). Some notes on alternating optimization. In AFSS international conference on fuzzy systems (pp. 288–300). Springer.

  • Bhatia, R., & Kittaneh, F. (2000). Notes on matrix arithmetic-geometric mean inequalities. Linear Algebra and Its Applications, 308(1–3), 203–211.

    Article  MathSciNet  Google Scholar 

  • Bhoi, A. (2019). Monocular depth estimation: A survey. arXiv preprint arXiv:1901.09402

  • Biswas, P., Toh, K.-C., & Ye, Y. (2008). A distributed SDP approach for large-scale noisy anchor-free graph realization with applications to molecular conformation. SIAM Journal on Scientific Computing, 30(3), 1251–1277.

    Article  MathSciNet  Google Scholar 

  • Bookstein, F. L. (1989). Principal warps: Thin-plate splines and the decomposition of deformations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 11(6), 567–585.

    Article  Google Scholar 

  • Bregler, C., Hertzmann, A., & Biermann, H. (2000). Recovering non-rigid 3D shape from image streams. In Proceedings IEEE Conference on Computer Vision and Pattern Recognition. CVPR 2000 (Cat. No. PR00662) (Vol. 2, pp. 690–696). IEEE.

  • Calla, L. A. R., Perez, L. J. F., & Montenegro, A. A. (2019). A minimalistic approach for fast computation of geodesic distances on triangular meshes. Computers and Graphics, 84, 77–92.

    Article  Google Scholar 

  • Cao, Y., Wu, Z., & Shen, C. (2017). Estimating depth from monocular images as classification using deep fully convolutional residual networks. IEEE Transactions on Circuits and Systems for Video Technology, 28(11), 3174–3182.

    Article  Google Scholar 

  • Carlson, D., Haynsworth, E., & Markham, T. (1974). A generalization of the Schur complement by means of the Moore–Penrose inverse. SIAM Journal on Applied Mathematics, 26(1), 169–175.

    Article  MathSciNet  Google Scholar 

  • Casillas-Perez, D., Pizarro, D., Fuentes-Jimenez, D., Mazo, M., & Bartoli, A. (2019). Equiareal shape-from-template. Journal of Mathematical Imaging and Vision, 61, 607–626.

    Article  MathSciNet  Google Scholar 

  • Castellani, U., & Bartoli, A. (2020). 3D shape registration. 3D Imaging Analysis and Applications, 256, 353–411.

    Article  Google Scholar 

  • Chhatkuli, A., Pizarro, D., & Bartoli, A. (2014). Non-rigid shape-from-motion for isometric surfaces using infinitesimal planarity. In British machine vision conference.

  • Chhatkuli, A., Pizarro, D., Bartoli, A., & Collins, T. (2016). A stable analytical framework for isometric shape-from-template by surface integration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(5), 833–850.

    Article  Google Scholar 

  • Chhatkuli, A., Pizarro, D., Collins, T., & Bartoli, A. (2017). Inextensible non-rigid structure-from-motion by second-order cone programming. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(10), 2428–2441.

    Article  Google Scholar 

  • Dai, Y., Li, H., & He, M. (2014). A simple prior-free method for non-rigid structure-from-motion factorization. International Journal of Computer Vision, 107, 101–122.

    Article  MathSciNet  Google Scholar 

  • d’Aspremont, A., & Boyd, S. (2003). Relaxations and randomized methods for nonconvex QCQPs. EE392o Class Notes Stanford University, 1, 1–16.

    Google Scholar 

  • Dubrovina, A., & Kimmel, R. (2011). Approximately isometric shape correspondence by matching pointwise spectral features and global geodesic structures. Advances in Adaptive Data Analysis, 3(01n02), 203–228.

    Article  MathSciNet  Google Scholar 

  • Faugeras, O., & Luong, Q.-T. (2001). The geometry of multiple images: The laws that govern the formation of multiple images of a scene and some of their applications. MIT Press.

  • Golyanik, V., Jonas, A., Stricker, D., & Theobalt, C. (2020). Intrinsic dynamic shape prior for dense non-rigid structure from motion. In 2020 international conference on 3D vision (3DV) (pp. 692–701). IEEE.

  • Gotardo, P. F., & Martinez, A. M. (2011). Kernel non-rigid structure from motion. In 2011 international conference on computer vision (pp. 802–809). IEEE.

  • Granshaw, S. (1980). Bundle adjustment methods in engineering photogrammetry. The Photogrammetric Record, 10(56), 181–207.

    Article  Google Scholar 

  • Hamsici, O. C., Gotardo, P. F., & Martinez, A. M. (2012). Learning spatially-smooth mappings in non-rigid structure from motion. In European conference on computer vision (pp. 260–273). Springer.

  • Hartley, R. I., & Zisserman, A. (2004). Multiple view geometry in computer vision (2nd ed.). Cambridge University Press.

    Book  Google Scholar 

  • Hilbert, D., & Cohn-Vossen, S. (2021). Geometry and the imagination (Vol. 87). American Mathematical Society.

    Google Scholar 

  • Hong, M., Razaviyayn, M., Luo, Z.-Q., & Pang, J.-S. (2015). A unified algorithmic framework for block-structured optimization involving big data: With applications in machine learning and signal processing. IEEE Signal Processing Magazine, 33(1), 57–77.

    Article  Google Scholar 

  • Horn, B. (1975). Determining shape from shading. The Psychology of Computer Vision.

  • Horn, B. K., & Weldon, E. (1986). Filtering closed curves. IEEE Transactions on Pattern Analysis and Machine Intelligence, 5, 665–668.

    Article  Google Scholar 

  • Hu, Y., Zhou, M., & Wu, Z. (2009). A dense point-to-point alignment method for realistic 3D face morphing and animation. International Journal of Computer Games Technology, 2009.

  • Iske, A. (2004). Multiresolution methods in scattered data modelling (Vol. 37). Springer.

    Google Scholar 

  • Ji, P., Li, H., Dai, Y., & Reid, I. (2017). Maximizing rigidity "revisited: A convex programming approach for generic 3d shape reconstruction from multiple perspective views. In Proceedings of the IEEE international conference on computer vision (pp. 929–937).

  • Joshi, P., Meyer, M., DeRose, T., Green, B., & Sanocki, T. (2007). Harmonic coordinates for character articulation. ACM Transactions on Graphics (TOG), 26(3), 71.

    Article  Google Scholar 

  • Kahl, F., & Henrion, D. (2007). Globally optimal estimates for geometric reconstruction problems. International Journal of Computer Vision, 74, 3–15.

    Article  Google Scholar 

  • Kazhdan, M., Bolitho, M., & Hoppe, H. (2006). Poisson surface reconstruction. In Proceedings of the fourth Eurographics symposium on geometry processing (Vol. 7).

  • Kazhdan, M., & Hoppe, H. (2013). Screened Poisson surface reconstruction. ACM Transactions on Graphics (ToG), 32(3), 1–13.

    Article  Google Scholar 

  • Kelley, C. T. (1999). Iterative methods for optimization. SIAM.

    Book  Google Scholar 

  • Khan, F., Salahuddin, S., & Javidnia, H. (2020). Deep learning-based monocular depth estimation methods—a state-of-the-art review. Sensors, 20(8), 2272.

    Article  Google Scholar 

  • Kong, C., & Lucey, S. (2019). Deep interpretable non-rigid structure from motion. arXiv preprint arXiv:1902.10840

  • Kreyszig, E. (2013). Differential geometry. Courier Corporation.

    Google Scholar 

  • Kumar, S., & Van Gool, L. (2022). Organic priors in non-rigid structure from motion. In Computer vision—ECCV 2022: 17th European conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part II (pp. 71–88). Springer.

  • Kurosh, A. G. (2014). Lectures in general algebra. Elsevier.

    Google Scholar 

  • Li, B., Shen, C., Dai, Y., Van Den Hengel, A., & He, M. (2015a). Depth and surface normal estimation from monocular images using regression on deep features and hierarchical CRFs. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 1119–1127).

  • Li, L., et al. (2015). Selected applications of convex optimization (Vol. 103). Springer.

    Google Scholar 

  • Liu, Y., Pears, N., Rosin, P. L., & Huber, P. (2020). 3D imaging, analysis and applications. Springer.

    Book  Google Scholar 

  • Liu, F., Shen, C., Lin, G., & Reid, I. (2015). Learning depth from single monocular images using deep convolutional neural fields. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(10), 2024–2039.

    Article  Google Scholar 

  • Low, K.-L. (2004). Linear least-squares optimization for point-to-plane ICP surface registration. Chapel Hill, University of North Carolina, 4(10), 1–3.

    Google Scholar 

  • Novotny, D., Ravi, N., Graham, B., Neverova, N., & Vedaldi, A. (2019). C3DPO: Canonical 3D pose networks for non-rigid structure from motion. In Proceedings of the IEEE/CVF international conference on computer vision (pp. 7688–7697).

  • Ortega, J. M., & Rheinboldt, W. C. (2000). Iterative solution of nonlinear equations in several variables. SIAM.

    Book  Google Scholar 

  • Östlund, J., Varol, A., Ngo, D. T., & Fua, P. (2012). Laplacian meshes for monocular 3D shape recovery. In ECCV, 3, 412–425.

    Google Scholar 

  • Parashar, S., Pizarro, D., Bartoli, A., & Collins, T. (2015). As-rigid-as-possible volumetric shape-from-template. In Proceedings of the IEEE international conference on computer vision (pp. 891–899).

  • Parashar, S., Pizarro, D., & Bartoli, A. (2017). Isometric non-rigid shape-from-motion with Riemannian geometry solved in linear time. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(10), 2442–2454.

    Article  Google Scholar 

  • Parashar, S., Pizarro, D., & Bartoli, A. (2019). Local deformable 3d reconstruction with Cartan’s connections. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42(12), 3011–3026.

    Article  Google Scholar 

  • Perriollat, M., & Bartoli, A. (2013). A computational model of bounded developable surfaces with application to image-based three-dimensional reconstruction. Computer Animation and Virtual Worlds, 24(5), 459–476.

    Article  Google Scholar 

  • Perriollat, M., Hartley, R., & Bartoli, A. (2011). Monocular template-based reconstruction of inextensible surfaces. International Journal of Computer Vision, 95(2), 124–137.

    Article  MathSciNet  Google Scholar 

  • Pressley, A. N. (2010). Elementary differential geometry. Springer.

    Book  Google Scholar 

  • Probst, T., Paudel, D. P., Chhatkuli, A., & Gool, L. V. (2019). Convex relaxations for consensus and non-minimal problems in 3D vision. In Proceedings of the IEEE/CVF international conference on computer vision (pp. 10233–10242).

  • Rabbani, N., Calvet, L., Espinel, Y., Le Roy, B., Ribeiro, M., Buc, E., & Bartoli, A. (2022). A methodology and clinical dataset with ground-truth to evaluate registration accuracy quantitatively in computer-assisted laparoscopic liver resection. Computer Methods in Biomechanics and Biomedical Engineering: Imaging and Visualization, 10(4), 441–450.

    Google Scholar 

  • Russell, C., Fayad, J., & Agapito, L. (2011). Energy based multiple model fitting for non-rigid structure from motion. In CVPR 2011 (pp. 3009–3016). IEEE.

  • Sabzevari, R., Del Bue, A., & Murino, V. (2012). Multi-view photometric stereo using semi-isometric mappings. In 2012 second international conference on 3D imaging, modeling, processing, visualization & transmission (pp. 547–554). IEEE.

  • Salzmann, M., & Urtasun, R. (2012). Beyond feature points: Structured prediction for monocular non-rigid 3D reconstruction. In Computer vision—ECCV 2012: 12th European conference on computer vision, Florence, Italy, October 7–13, 2012, Proceedings, Part IV (Vol. 12, pp. 245–259). Springer.

  • Salzmann, M., & Fua, P. (2010). Linear local models for monocular reconstruction of deformable surfaces. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(5), 931–944.

    Article  Google Scholar 

  • Sengupta, A., & Bartoli, A. (2021). Colonoscopic 3D reconstruction by tubular non-rigid structure-from-motion. International Journal of Computer Assisted Radiology and Surgery, 16(7), 1237–1241.

    Article  Google Scholar 

  • Sheffer, A., Lévy, B., Mogilnitsky, M., & Bogomyakov, A. (2005). ABF++: Fast and robust angle based flattening. ACM Transactions on Graphics (TOG), 24(2), 311–330.

    Article  Google Scholar 

  • Sheffer, A., & de Sturler, E. (2001). Parameterization of faceted surfaces for meshing using angle-based flattening. Engineering with Computers, 17(3), 326–337.

    Article  Google Scholar 

  • Takmaz, A., Paudel, D. P., Probst, T., Chhatkuli, A., Oswald, M. R., & Van Gool, L. (2020). Unsupervised monocular depth reconstruction of non-rigid scenes. arXiv preprint arXiv:2012.15680

  • Torresani, L., & Bregler, C. (2002). Space-time tracking. In European conference on computer vision (pp. 801–812). Springer.

  • Torresani, L., Yang, D. B., Alexander, E. J., & Bregler, C. (2001). Tracking and modeling non-rigid objects with rank constraints. In Proceedings of the IEEE conference on computer vision and pattern recognition (Vol. 1, p. I). IEEE.

  • Torresani, L., Hertzmann, A., & Bregler, C. (2008). Nonrigid structure-from-motion: Estimating shape and motion with hierarchical priors. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(5), 878–892.

  • Torr, P. H., & Zisserman, A. (2000). MLESAC: A new robust estimator with application to estimating image geometry. Computer Vision and Image Understanding, 78(1), 138–156.

    Article  Google Scholar 

  • Triggs, B., McLauchlan, P. F., Hartley, R. I., & Fitzgibbon, A. W. (1999). Bundle adjustment: A modern synthesis. In International workshop on vision algorithms (pp. 298–372). Springer.

  • Varol, A., Salzmann, M., Tola, E., & Fua, P. (2009). Template-free monocular reconstruction of deformable surfaces. In 2009 IEEE 12th international conference on computer vision (pp. 1811–1818). IEEE.

  • Yang, J., Li, H., Campbell, D., & Jia, Y. (2015). Go-ICP: A globally optimal solution to 3D ICP point-set registration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(11), 2241–2254.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Agniva Sengupta.

Additional information

Communicated by Matteo Poggi.

Publisher's Note

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

Appendices

Appendices

Geometry of the Topological Templates

We describe some basic geometric properties of the parametric shapes in the following paragraphs.

1.1 Planar

We denote the 2D template with \({\textbf{p}} = (x,y) \in \mathbb {R}^2\). Therefore the map \(\Delta :\mathbb {R}^2 \mapsto \mathbb {R}^3\) is trivial and given in table 2. The next warp \(\psi \) is defined as:

$$\begin{aligned} \psi _{i}(\textbf{P}) = \begin{pmatrix} {X}&{Y}&{Z}&1\end{pmatrix} \underset{4 \times 3}{{\textbf{a}}} + \underset{1 \times {l}}{\rho (\textbf{P}, {\textbf{D}})} \underset{{l} \times 3}{{\textbf{w}}}, \end{aligned}$$
(48)

and the combined warp is:

$$\begin{aligned} \varphi _i(x, y) = \psi _{i} \circ \Delta = \Delta (x,y) {\textbf{a}} + \rho \Big (\Delta (x,y), {\textbf{D}}\Big ){\textbf{w}}. \end{aligned}$$
(49)

Therefore, the derivatives of the warps are:

$$\begin{aligned} \begin{aligned} \varphi _x(x, y) = \begin{pmatrix} 1&0&0&1\end{pmatrix}{\textbf{a}} + \frac{\partial }{\partial x}\Big (\rho \big (\Delta (x,y), {\textbf{D}}\big )\Big ){\textbf{w}} \\ \varphi _y(x, y) = \begin{pmatrix} 0&1&0&1\end{pmatrix}{\textbf{a}} + \frac{\partial }{\partial y}\Big (\rho \big (\Delta (x,y), {\textbf{D}}\big )\Big ){\textbf{w}}, \end{aligned} \end{aligned}$$
(50)

where for the l-th element of \(\rho \) we have:

$$\begin{aligned} \frac{\partial }{\partial x}\Big (\rho ^l\big (\Delta (x,y), {\textbf{D}}\big )\Big ) = \frac{X - D_l^X}{\rho ^l\big (\Delta (x,y), {\textbf{D}}\big )} \end{aligned}$$

and

$$\begin{aligned} \frac{\partial }{\partial y}\Big (\rho ^l\big (\Delta (x,y), {\textbf{D}}\big )\Big ) = \frac{Y - D_l^Y}{\rho ^l\big (\Delta (x,y), {\textbf{D}}\big )}. \end{aligned}$$
(51)

Proceeding similarly, the second derivatives of the warps are given by:

$$\begin{aligned} \varphi ^l_{xx}(x, y) =&\frac{\Big ( \rho ^l\big (\Delta (x,y), {\textbf{D}}\big ) \Big )^2 - \big ( X - D_l^X \big )^2}{\Big ( \rho ^l\big (\Delta (x,y), {\textbf{D}}\big ) \Big )^2} {\textbf{w}}\\ \varphi ^l_{yy}(x, y) =&\frac{\Big ( \rho ^l\big (\Delta (x,y), {\textbf{D}}\big ) \Big )^2 - \big ( Y - D_l^Y \big )^2}{\Big ( \rho ^l\big (\Delta (x,y), {\textbf{D}}\big ) \Big )^2}{\textbf{w}} \end{aligned}$$
$$\begin{aligned} \begin{aligned}&\varphi ^l_{xy}(x, y) = \varphi ^l_{yx}(x, y) \\&\quad = \frac{\Big ( \rho ^l\big (\Delta (x,y), {\textbf{D}}\big ) \Big )^2 - \Big ( \big ( X - D_l^X \big ) + \big ( Y - D_l^Y \big ) \Big )^2}{\Big ( \rho ^l\big (\Delta (x,y), {\textbf{D}}\big ) \Big )^2}{\textbf{w}}. \end{aligned} \end{aligned}$$
(52)

1.2 Cylindrical

Following the definition of \(\Delta \) from table 2, we obtain \(\psi \) as:

$$\begin{aligned}{} & {} \psi _{i}(\textbf{P}) = \begin{pmatrix} {X}&{Y}&{Z}&1\end{pmatrix} \underset{4 \times 3}{{\textbf{a}}} + \underset{1 \times {l}}{\rho (\textbf{P}, {\textbf{D}})} \underset{{l} \times 3}{{\textbf{w}}}. \end{aligned}$$
(53)
$$\begin{aligned}{} & {} \varphi (r,\theta ) = \begin{pmatrix} \sin {\theta }&r&\cos {\theta }&1\end{pmatrix} {\textbf{a}} + \rho \Big (\Delta (r,\theta ), {\textbf{D}}\Big ){\textbf{w}} \end{aligned}$$
(54)

For the case of cylindrical surfaces, we elaborate the computation of the tangent vectors and surface normal of \(\psi _{i}\) with some verbosity. Assuming:

(55)

we can compute:

(56)

and ignoring \(\upalpha _{14}\) from Eq. (56), we obtain:

$$\begin{aligned} \varphi _r^{\top } = \begin{pmatrix} \upalpha _2&\upalpha _6&\upalpha _{10} \end{pmatrix} +\begin{pmatrix} \lambda ^{r}_{1}&\lambda ^{r}_{2}&\lambda ^{r}_{3} \end{pmatrix}, \end{aligned}$$
(57)

where the assumption that the fourth column of \(\check{{\textbf{a}}}\) and \(\check{{\textbf{w}}}\) are all zeros gives us \({\textbf{a}}\) and \({\textbf{w}}\) respectively. Similarly:

$$\begin{aligned} \varphi _{\theta }^{\top }= & {} \begin{pmatrix} (\upalpha _1 \cos {\theta } - \upalpha _3\sin {\theta })&(\upalpha _5\cos {\theta } - \upalpha _7\sin {\theta })&(\upalpha _9 \cos {\theta } - \upalpha _{11} \sin {\theta }) \end{pmatrix}\nonumber \\{} & {} + \begin{pmatrix} \lambda ^{\theta }_{1}&\lambda ^{\theta }_{2}&\lambda ^{\theta }_{3} \end{pmatrix}, \end{aligned}$$
(58)

where:

(59)

since \(\upalpha _{13}\) and \(\upalpha _{15}\) are zeros. Given that \(\textbf{N} = \begin{pmatrix} N^{{X}}&N^{{Y}}&N^{{Z}}\end{pmatrix} = \varphi _r \times \varphi _{\theta } \), we have:

$$\begin{aligned} N^{{X}}= & {} (\upalpha _{6} + \lambda ^{r}_{2})(\upalpha _{9}\cos {\theta } - \upalpha _{11}\sin {\theta } + \lambda ^{\theta }_{3}) \nonumber \\{} & {} - (\upalpha _{10} + \lambda ^{r}_{3})(\upalpha _{5}\cos {\theta } - \upalpha _7\sin {\theta } + \lambda ^{\theta }_{2}) \end{aligned}$$
(60)
$$\begin{aligned} N^{{Y}}= & {} - (\upalpha _{2} + \lambda ^{r}_{1})(\upalpha _{9}\cos {\theta } - \upalpha _{11}\sin {\theta } + \lambda ^{\theta }_{3}) \nonumber \\{} & {} + (\upalpha _{10} + \lambda ^{r}_{3})(\upalpha _{1}\cos {\theta } - \upalpha _{3}\sin {\theta } + \lambda ^{\theta }_{1}) \end{aligned}$$
(61)
$$\begin{aligned} N^{{Z}}= & {} (\upalpha _{2} + \lambda ^{r}_{1})(\upalpha _{5}\cos {\theta } - \upalpha _{7}\sin {\theta } + \lambda ^{\theta }_{2})\nonumber \\{} & {} - (\upalpha _{6} + \lambda ^{r}_{2})(\upalpha _{1}\cos {\theta } - \upalpha _{3}\sin {\theta } + \lambda ^{\theta }_{1}), \end{aligned}$$
(62)

where \(\textbf{N}\) is the un-normalized vector along the direction of the surface normal, evaluated at \((r,\theta )\). Consequently, the unit normal is expressed as \(\hat{\textbf{N}} = \frac{ \varphi _r \times \varphi _{\theta }}{\Vert \varphi _r \times \varphi _{\theta } \Vert }\). We denote the function for unit normal computation as \(\mathcal {N}_i(\cdot )\), which takes the j-th coordinate from the flattened template \((r_j,\theta _j)\) and computes the unit normal, given by \(\mathcal {N}_i(r_j,\theta _j) = \begin{pmatrix} \hat{N}^{{X}}_{i,j}&\hat{N}^{{Y}}_{i,j}&\hat{N}^{{Z}}_{i,j}&1 \end{pmatrix}\) for the i-th image frame.

1.3 Spherical

For spherical objects, beginning from the initial mapping \(\Delta \) described in table 2, the maps \(\psi \) and \(\varphi \) are obtained following the same form as Eqs. (1) and (54) respectively. The normals to the spherical surface, which are the equivalent of Eqs. (56) to (62), are summarised below. The derivatives of \(\varphi \) are given as:

$$\begin{aligned} \tilde{\varphi }_{\theta _1}{} & {} = \begin{pmatrix} \sin {\theta _1}\cos {\theta _2}&-\cos {\theta _1}&\sin {\theta _1}\sin {\theta _2} \end{pmatrix} {\textbf{a}}\nonumber \\{} & {} \quad + \frac{\partial \rho \big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _1}{\textbf{w}} \end{aligned}$$
(63)
$$\begin{aligned} \tilde{\varphi }_{\theta _2}{} & {} = \begin{pmatrix} \cos {\theta _1}\sin {\theta _2}&0&-\cos {\theta _1}\cos {\theta _2} \end{pmatrix} {\textbf{a}} \nonumber \\{} & {} \quad + \frac{\partial \rho \big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _2}{\textbf{w}}, \end{aligned}$$
(64)

where the l-th element of \(\frac{\partial \rho \big (\Delta (r,\theta ), {\textbf{D}}\big )}{\partial \theta _1}\) and \(\frac{\partial \rho \big (\Delta (r,\theta ), {\textbf{D}}\big )}{\partial \theta _2}\) are given respectively as:

$$\begin{aligned}{} & {} \frac{\partial \rho ^{l}\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _1} \nonumber \\{} & {} \quad = \frac{ \Big ( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l \Big )^{\top } \Delta _{\theta _1} }{\rho ^{l}\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )} \quad \text { and } \nonumber \\{} & {} \frac{\partial \rho ^{l}\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _2}\nonumber \\{} & {} \quad = \frac{ \Big ( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l \Big )^{\top } \Delta _{\theta _2} }{\rho ^{l}\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}, \end{aligned}$$
(65)

where \(\Delta _{\theta _1} = \frac{\partial \Delta }{\partial \theta _1}\) and \(\Delta _{\theta _2} = \frac{\partial \Delta }{\partial \theta _2}\) following standard convention. Similar to section 2, the unit normals can be obtained as \(\hat{\textbf{N}} = \frac{ \varphi _{\theta _1} \times \varphi _{\theta _2}}{\Vert \varphi _{\theta _1} \times \varphi _{\theta _2} \Vert }\). From Eq. (65), the second derivatives of the warps can be computed as:

$$\begin{aligned} \begin{aligned} \tilde{\varphi }_{\theta _1 \theta _1}&= \begin{pmatrix} \cos {\theta _1}\cos {\theta _2}&\sin {\theta _1}&\cos {\theta _1}\sin {\theta _2} \end{pmatrix} {\textbf{a}}\\&\quad + \frac{\partial ^2 \rho \big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _1^2}{\textbf{w}} \\ \tilde{\varphi }_{\theta _2 \theta _2}&= \begin{pmatrix} \cos {\theta _1}\cos {\theta _2}&0&\cos {\theta _1}\sin {\theta _2} \end{pmatrix} {\textbf{a}}\\&\quad + \frac{\partial ^2 \rho \big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _2^2}{\textbf{w}} \\ \tilde{\varphi }_{\theta _1 \theta _2}&= \tilde{\varphi }_{\theta _2 \theta _1} = \begin{pmatrix} -\sin {\theta _1}\sin {\theta _2}&0&\sin {\theta _1}\cos {\theta _2} \end{pmatrix} {\textbf{a}} \\&\quad + \frac{\partial }{\partial \theta _1}\Big (\frac{\partial \rho \big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _2}\Big ){\textbf{w}}, \end{aligned} \end{aligned}$$
(66)

where:

$$\begin{aligned} \begin{aligned}&\frac{\partial ^2 \rho ^l\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _1^2} = \frac{ \Big (\rho ^l\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )\Big )^2 \Big ( ( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l )^{\top } \Delta _{\theta _1 \theta _1} + \Delta _{\theta _1}^{\top }\Delta _{\theta _1} \Big ) - ( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l )^{\top } \Delta _{\theta _1}}{\Big (\rho ^l\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )\Big )^3}\nonumber \end{aligned} \end{aligned}$$
$$\begin{aligned} \begin{aligned}&\frac{\partial ^2 \rho ^l\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )}{\partial \theta _2^2} = \frac{ \Big (\rho ^l\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )\Big )^2 \Big ( ( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l )^{\top } \Delta _{\theta _2 \theta _2} + \Delta _{\theta _2}^{\top }\Delta _{\theta _2} \Big ) - ( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l )^{\top } \Delta _{\theta _2}}{\Big (\rho ^l\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )\Big )^3}\\&\frac{\partial }{\partial \theta _1}\Big (\frac{\partial \rho ^l\big (\Delta (\theta _2), {\textbf{D}}\big )}{\partial \theta _2} \Big ) = \frac{\partial }{\partial \theta _2}\Big (\frac{\partial \rho ^l\big (\Delta (\theta _1), {\textbf{D}}\big )}{\partial \theta _2} \Big ) \\&\quad = \frac{ \Big (\rho ^l\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )\Big )^2 \Big ( ( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l )^{\top } \Delta _{\theta _1 \theta _2} + \Delta _{\theta _1}^{\top }\Delta _{\theta _2} \Big ) - ( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l )^{\top }( \Delta (\theta _1,\theta _2) - {\textbf{D}}_l) \Delta ^{\top }_{\theta _1} \Delta _{\theta _2}}{\Big (\rho ^l\big (\Delta (\theta _1,\theta _2), {\textbf{D}}\big )\Big )^3}. \end{aligned} \end{aligned}$$
(67)

1.4 General Shapes

We have a combination of two warps, the first one being:

$$\begin{aligned} \Delta (x,y) = \begin{pmatrix} x&y&0&1\end{pmatrix} {\textbf{a}}_{\Delta } {+} \rho (\textbf{p}, {\textbf{D}}) {\textbf{w}}_{\Delta } {=} \begin{pmatrix} X&Y&Z \end{pmatrix} {=} \textbf{P}, \end{aligned}$$
(68)

where the pre-defined warp parameters \(({\textbf{a}}_{\Delta }, {\textbf{w}}_{\Delta } )\) are obtained using conformal flattening of some mesh using the method of Sheffer and de Sturler (2001) and Sheffer et al. (2005). The variables \(({\textbf{a}}_{\Delta }, {\textbf{w}}_{\Delta } )\) are computed offline and only once per object model. This is followed by the second warp for deformation of the canonical model, given by:

$$\begin{aligned} \psi _{i}(\textbf{P}) =&\begin{pmatrix} {X}&{Y}&{Z}&1\end{pmatrix} \underset{4 \times 3}{{\textbf{a}}} + \underset{1 \times {l}}{\rho (\textbf{P}, {\textbf{D}})} \underset{{l} \times 3}{{\textbf{w}}} \qquad \text { and } \nonumber \\ \varphi _i(x, y) =&\psi _{i} \circ \Delta . \end{aligned}$$
(69)

We are interested in the derivatives of the warps:

$$\begin{aligned} \varphi _x = \begin{pmatrix} \frac{\partial \textbf{P}}{\partial x}&0 \end{pmatrix} + \frac{\partial \rho (\textbf{P}, {\textbf{D}})}{\partial x}{\textbf{w}} \qquad \varphi _y = \begin{pmatrix} \frac{\partial \textbf{P}}{\partial y}&0 \end{pmatrix} + \frac{\partial \rho (\textbf{P}, {\textbf{D}})}{\partial y}{\textbf{w}}. \end{aligned}$$
(70)

Thereafter, we have:

$$\begin{aligned} \begin{pmatrix} \frac{\partial \textbf{P}}{\partial x} \\ \frac{\partial \textbf{P}}{\partial y} \end{pmatrix}= & {} \begin{pmatrix} \begin{pmatrix} 1 &{} 0 &{} 0 &{} 0 \end{pmatrix} {\textbf{a}}_{\Delta } + \frac{\partial \rho (\textbf{p}, {\textbf{D}})}{\partial x} {\textbf{w}}_{\Delta } \\ \begin{pmatrix} {0} &{} {1} &{} {0} &{} 0\end{pmatrix} {\textbf{a}}_{\Delta } + \frac{\partial \rho (\textbf{p}, {\textbf{D}})}{\partial y} {\textbf{w}}_{\Delta } \end{pmatrix}\nonumber \\= & {} \begin{pmatrix} \frac{\partial X}{\partial x} &{} \frac{\partial Y}{\partial x} &{} \frac{\partial Z}{\partial x} \\ \frac{\partial X}{\partial y} &{} \frac{\partial Y}{\partial y} &{} \frac{\partial Z}{\partial y} \end{pmatrix} \text {, } \nonumber \\ \begin{pmatrix} \frac{\partial \rho ^l(\textbf{p}, {\textbf{D}})}{\partial x} \\ \frac{\partial \rho ^l(\textbf{p}, {\textbf{D}})}{\partial x}\end{pmatrix}= & {} \begin{pmatrix} \frac{x - D^X_l}{\rho ^l(\textbf{p}, {\textbf{D}})} \\ \frac{y - D^Y_l}{\rho ^l(\textbf{p}, {\textbf{D}})} \end{pmatrix} \forall l \in [1,n], \end{aligned}$$
(71)

and:

$$\begin{aligned}&\begin{pmatrix} \frac{\partial \rho ^l(\textbf{P}, {\textbf{D}})}{\partial x} \\ \frac{\partial \rho ^l(\textbf{P}, {\textbf{D}})}{\partial y} \end{pmatrix} = \begin{pmatrix} \frac{(X - D_l^X)\frac{\partial X}{\partial x} + (Y - D_l^Y)\frac{\partial Y}{\partial x} + (Z - D_l^Z)\frac{\partial Z}{\partial x} }{\rho ^l(\textbf{P}, {\textbf{D}})} \\ \frac{(X - D_l^X)\frac{\partial X}{\partial y} + (Y - D_l^Y)\frac{\partial Y}{\partial y} + (Z - D_l^Z)\frac{\partial Z}{\partial y} }{\rho ^l(\textbf{P}, {\textbf{D}})} \end{pmatrix} \nonumber \\&\qquad \qquad \forall l \in [1,n]. \end{aligned}$$
(72)

Following similar geometric properties, the next frame describes an example of the computation of length along geodesic, specifically for the spherical template:

figure c

Jacobian Matrices

We now describe the derivation of analytic Jacobian matrices for all cost functions used in sections 6 and 7.

1.1 Initial Parameterised Reconstruction

The minimisation of Eq. (33) is done analytically and the Jacobian matrix relating the change of \(g_{\textrm{data}}\), \(g_{\textrm{def0}}\) and \(g_{\textrm{def1}}\) w.r.t. \(\xi _I \in \mathbb {R}^{1 \times 3l}\), the stacked optimisation parameters, are expressed by the terms:

$$\begin{aligned} \begin{aligned} \textbf{J}_{P} =&\frac{\partial g_{\textrm{data}}}{\partial \xi _I} \text { , } \\ \textbf{J}_{N} =&\frac{\partial g_{\textrm{def1}}}{\partial \xi _I} \quad \text { and } \\ \textbf{J}_{B} =&\frac{\partial g_{\textrm{def0}}}{\partial \xi _I}. \end{aligned} \end{aligned}$$
(75)

Expanding the Jacobian matrices for the j-th row of the matrices \(\textbf{J}_{P}\) and \(\textbf{J}_{N}\) (corresponding to the j-th row of the error vectors), we obtain the following expressions:

$$\begin{aligned} \begin{aligned} \underset{1 \times 3l}{\underbrace{\textbf{J}_{P,j}}} =&\frac{\partial }{\partial \xi _I} \Big ( \big (\varphi ({\textbf{p}}_j) - {\textbf{Q}}_{j} \big ) \cdot \eta \big (\varphi ({\textbf{p}}_j)\big ) \Big ) \\ =&\frac{\partial }{\partial \xi _I} \Bigg ( \overbrace{\Big ( \underset{1 \times 4}{\underbrace{\begin{bmatrix} \rho \big (\Delta (r_j,\theta _j), {\textbf{D}}\big )&\tilde{\textbf{P}}_j \end{bmatrix} \mathcal {D}^{-1}\begin{bmatrix}\tilde{{\textbf{C}}} \\ \textbf{0}\end{bmatrix}}} - \underset{1 \times 4}{\underbrace{\tilde{{\textbf{Q}}}_{j}}} \Big )}^{\varvec{\mu }_j} \\&\overbrace{\underset{4 \times 1}{\underbrace{\begin{bmatrix} \hat{N}^{X}_j&\hat{N}^{Y}_j&\hat{N}^{Z}_j&1 \end{bmatrix}}}^{\top }}^{\hat{\textbf{N}}_j} \Bigg ) \\ =&\frac{\partial }{\partial \xi _I} (\varvec{\mu }_j \hat{\textbf{N}}_j) = \underbrace{\frac{\partial \varvec{\mu }_j }{\partial \xi _I}}_{1 \times 12l} \underbrace{(\hat{\textbf{N}}_j \otimes \mathbb {1}_{3l})}_{12l \times 3l} + \underbrace{\varvec{\mu }_j}_{1 \times 4} \underbrace{\frac{\partial \hat{\textbf{N}}_j}{\partial \xi _I}}_{4 \times 3l}, \end{aligned} \end{aligned}$$
(76)

where:

(77)

and \(\frac{\partial \hat{\textbf{N}}_j}{\partial \xi _I}\) can be obtained from:

$$\begin{aligned} \begin{aligned}&\underbrace{\frac{\partial \hat{\textbf{N}}_j}{\partial \xi _I}}_{4 \times 3l} = \frac{\partial }{\partial \xi _I} \begin{bmatrix} \hat{N}^{X}_j&\hat{N}^{Y}_j&\hat{N}^{Z}_j&1 \end{bmatrix}^{\top } \\&\quad = \frac{1}{\Vert \tilde{\textbf{N}_j}\Vert } \begin{bmatrix} \frac{\partial N^{X}_j}{\partial \xi _I}&\frac{\partial N^{Y}_j}{\partial \xi _I}&\frac{\partial N^{Z}_j}{\partial \xi _I}&0\end{bmatrix}^{\top }\\&\quad - \frac{ \begin{bmatrix} N_j^{X}&N_j^Y&N_j^Z&1 \end{bmatrix}^{\top } \Big ( N_j^X \frac{\partial N_j^X}{\partial \xi _I} + N_j^Y \frac{\partial N_j^Y}{\partial \xi _I} + N_j^Z \frac{\partial N_j^Z}{\partial \xi _I} \Big ) }{(\Vert \tilde{\textbf{N}_j}\Vert )^3}. \end{aligned} \end{aligned}$$
(78)

Thereafter, we are left with the terms \(\frac{\partial N^{X}_j}{\partial \xi _I}\), \(\frac{\partial N^{Y}_j}{\partial \xi _I}\) and \(\frac{\partial N^{Z}_j}{\partial \xi _I}\) which are obtained from Eqs. (56) and (58) by differentiating the expression for the un-normalised normal vector:

$$\begin{aligned} \begin{aligned}&\frac{\partial }{\partial \xi _I} \bigg ( \begin{bmatrix} N^{X}_j&N^{Y}_j&N^{Z}_j \end{bmatrix} \bigg )\\&\quad = \frac{\partial }{\partial \xi _I} \big (\varphi _r \times \varphi _{\theta } \big )\\&\quad = \frac{\partial }{\partial \xi _I} \big ( [\varphi _r]_{\times } \varphi _{\theta } \big ) = \frac{\partial }{\partial \xi _I}\big ( [\varphi _r]_{\times } \big ) \big ( \varphi _{\theta } \otimes \mathbb {1}_{3l} \big ) + [\varphi _r]_{\times }\frac{\partial \varphi _{\theta }}{\partial \xi _I} \\&\quad = \begin{bmatrix} 0 &{} -\frac{\partial \varphi _{r,3}}{\partial \xi _I} &{} \frac{\partial \varphi _{r,2}}{\partial \xi _I} \\ \frac{\partial \varphi _{r,3}}{\partial \xi _I} &{} 0 &{} -\frac{\partial \varphi _{r,1}}{\partial \xi _I} \\ -\frac{\partial \varphi _{r,2}}{\partial \xi _I} &{} \frac{\partial \varphi _{r,1}}{\partial \xi _I} &{} 0\end{bmatrix} \big ( \varphi _{\theta } \otimes \mathbb {1}_{3l} \big )\\&\qquad + [\varphi _r]_{\times } \begin{bmatrix} \frac{\partial \varphi _{\theta ,1}}{\partial \xi _I} \\ \frac{\partial \varphi _{\theta ,2}}{\partial \xi _I} \\ \frac{\partial \varphi _{\theta ,3}}{\partial \xi _I} \end{bmatrix}. \end{aligned} \end{aligned}$$
(79)

From Eq. (56), we have:

(80)

Similarly:

$$\begin{aligned} \begin{aligned}&\frac{\partial \tilde{\varphi _{\theta }}}{\partial \xi _I} = \frac{\partial }{\partial \xi _I} \left( \begin{bmatrix} (\upalpha _1 \cos {\theta } - \upalpha _3\sin {\theta }) \\ (\upalpha _5\cos {\theta } - \upalpha _7\sin {\theta }) \\ (\upalpha _9 \cos {\theta } - \upalpha _{11} \sin {\theta }) \\ (\alpha _{13} \cos {\theta } - \upalpha _{15} \sin {\theta }) \end{bmatrix}^{\top } \right) \\&\quad + \begin{bmatrix} \frac{ D^{\textrm{Z}}_1 \sin {\theta } - D^{\textrm{X}}_1 \cos {\theta } }{\rho ^1(\Delta (r,\theta ), {\textbf{D}})} \\ \vdots \\ \frac{D^{\textrm{Z}}_{l} \sin {\theta } - D^{\textrm{X}}_{l} \cos {\theta }}{\rho ^l(\Delta (r,\theta ), {\textbf{D}})} \end{bmatrix}^{\top } \bar{\varepsilon }_{\lambda } \begin{bmatrix} \mathbb {1}_{l}&\mathbb {0}_{l \times 3l}&\mathbb {1}_{l}&\mathbb {0}_{l \times 3l}&\mathbb {1}_{l}&\mathbb {0}_{l \times 3l} \end{bmatrix} \\&= \begin{bmatrix} \cos {\theta } \\ -\sin {\theta } \end{bmatrix} \frac{\partial }{\partial \xi _I} \bigg ( \begin{bmatrix} \upalpha _{1} &{} \upalpha _{5} &{} \upalpha _{9} &{} \upalpha _{13} \\ \upalpha _{3} &{} \upalpha _{7} &{} \upalpha _{11} &{} \upalpha _{15} \end{bmatrix} \bigg ) \\&\quad + \begin{bmatrix} \frac{ D^{\textrm{Z}}_1 \sin {\theta } - D^{\textrm{X}}_1 \cos {\theta } }{\rho ^1(\Delta (r,\theta ), {\textbf{D}})} \\ \vdots \\ \frac{D^{\textrm{Z}}_{l} \sin {\theta } - D^{\textrm{X}}_{l} \cos {\theta }}{\rho ^l(\Delta (r,\theta ), {\textbf{D}})} \end{bmatrix}^{\top } \bar{\varepsilon }_{\lambda } \begin{bmatrix} \mathbb {1}_{l}&\mathbb {0}_{l \times 3l}&\mathbb {1}_{l}&\mathbb {0}_{l \times 3l}&\mathbb {1}_{l}&\mathbb {0}_{l \times 3l} \end{bmatrix}. \end{aligned} \end{aligned}$$
(81)

Equations (80) and (81) leave us with some more unknown terms in the form of . However, these values can be easily obtained by differentiating Eq. (55) as:

$$\begin{aligned}{} & {} \frac{\partial \check{{\textbf{a}}}}{\partial \xi _I} = \frac{\partial }{\partial \xi _I} \left( \begin{bmatrix} {\alpha }_{1} &{} {\alpha }_{5} &{} {\alpha }_{9} &{} {\alpha }_{13} \\ {\alpha }_{2} &{} {\alpha }_{6} &{} {\alpha }_{10} &{} {\alpha }_{14} \\ {\alpha }_{3} &{} {\alpha }_{7} &{} {\alpha }_{11} &{} {\alpha }_{15} \\ {\alpha }_{4} &{} {\alpha }_{8} &{} {\alpha }_{12} &{} {\alpha }_{16} \end{bmatrix} \right) \nonumber \\{} & {} \quad = \Big ( \tilde{{\textbf{D}}} {\textbf{K}}_{\lambda }^{-1} \tilde{{\textbf{D}}}^{\top } \Big )^{-1} \tilde{{\textbf{D}}} {\textbf{K}}_{\lambda }^{-1} \begin{bmatrix} \mathbb {1}_{l}&\mathbb {0}_{l \times 3l}&\mathbb {1}_{l}&\mathbb {0}_{l \times 3l}&\mathbb {1}_{l}&\mathbb {0}_{l \times 3l} \end{bmatrix}.\nonumber \\ \end{aligned}$$
(82)

Going back to Eq. (75), the Jacobian matrix \(\textbf{J}_{N}\) can be expressed as:

$$\begin{aligned}{} & {} \underbrace{\textbf{J}_{N,j}}_{1 \times 3l} = \frac{ \Big (\hat{N}^X_j - \eta ^{X}\big (\Delta ({\textbf{p}}_j)\big )\Big ) \frac{\partial \hat{N}^X_j}{\partial \xi _I} + \Big (\hat{N}^Y_j - \eta ^{Y}\big (\Delta ({\textbf{p}}_j)\big )\Big ) \frac{\partial \hat{N}^Y_j}{\partial \xi _I} + \Big (\hat{N}^Z_j - \eta ^{Z}\big (\Delta ({\textbf{p}}_j)\big )\Big ) \frac{\partial \hat{N}^Z_j}{\partial \xi _I} }{ \Vert \eta \big (\varphi ({\textbf{p}}_j)\big ) - \eta \big (\Delta ({\textbf{p}}_j)\big ) \Vert }. \end{aligned}$$
(83)

The final Jacobian matrix \(\textbf{J}_B\) is a straightforward partial differentiation of Eq. (35).

1.2 Global Refinement

We now discuss the details of the Jacobian matrices involved in the global refinement process from Eq. (39), the Jacobian matrices are given for the original problem, not the efficient one, since the accelerated solutions are easy to derive from the full expanded ones. A single row of the first Jacobian matrix relating the change of \(h_{\textrm{rep}}\) to \(\varvec{\xi }\) is given by:

(84)

where \(\varvec{\kappa }\) and \(\varvec{\omega }\) are vectorised uv-coordinates and control handles respectively. Considering the first term and the second set of terms separately, we start with the first term of Eq. (39):

$$\begin{aligned} \begin{aligned}&\frac{\partial h_{\textrm{rep}}}{\partial \kappa } = \frac{\partial }{\partial \kappa } \Big ( \Vert {\textbf{q}}_{i,j} - \Pi \big (\varphi _i({\textbf{p}}_{j})\big ) \Vert \Big ) \\&\quad = \frac{-1}{\Vert {\textbf{q}}_{i,j} - \Pi \big (\varphi _i({\textbf{p}}_{j})\big ) \Vert } \\&\qquad \Bigg ( \bigg ( \Big ( ({\textbf{q}}_{j})_x - \Pi \big (\varphi _i({\textbf{p}}_{j})\big )_x \Big ) \frac{\partial }{\partial \kappa }\Big ( \Pi \big (\varphi _i({\textbf{p}}_{j})\big )_x \Big ) \bigg ) \\&\qquad + \bigg ( \Big ( ({\textbf{q}}_{j})_y - \Pi \big (\varphi _i({\textbf{p}}_{j})\big )_y \Big ) \frac{\partial }{\partial \kappa }\Big ( \Pi \big (\varphi _i({\textbf{p}}_{j})\big )_y \Big ) \bigg ) \Bigg ), \end{aligned} \end{aligned}$$
(85)

assuming the suffix \((\cdot )_x\) or \((\cdot )_y\) gives the x or y coordinate of the 2D point. Given that \({\textbf{Q}}_{i,j} = \varphi _i({\textbf{p}}_j)\) and its homogeneous coordinates are given as \(\tilde{{\textbf{Q}}}_{i,j}\), we differentiate both sides of the perspective projection equation w.r.t.  \(\kappa \) to obtain:

$$\begin{aligned} \begin{aligned}&\underbrace{\frac{\partial }{\partial \kappa } \Big (\Pi \big (\varphi _i({\textbf{p}}_j)\big ) \Big )}_{2 \times 2m} = \frac{\partial }{\partial \kappa } \left( \begin{bmatrix} \Pi \big (\varphi _i({\textbf{p}}_j)\big )_x \\ \Pi \big (\varphi _i({\textbf{p}}_j)\big )_y \end{bmatrix} \right) \\&\quad = \frac{\partial }{\partial \kappa } \left( \begin{bmatrix} \frac{f_x}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} 0 &{} c_x \\ 0 &{} \frac{f_y}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} c_y \end{bmatrix} f_i^{-1} \tilde{{\textbf{Q}}}_{i,j} \right) \\&\quad = \underbrace{\frac{\partial }{\partial \kappa } \left( \begin{bmatrix} \frac{f_x}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} 0 &{} c_x \\ 0 &{} \frac{f_y}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} c_y \end{bmatrix} \right) }_{2 \times 8m} \\&\quad \underbrace{\big (f_i^{-1} \tilde{{\textbf{Q}}}_{i,j} \otimes \mathbb {1}_{2m}\big )}_{8m \times 2m} + \left( \underbrace{\begin{bmatrix} \frac{f_x}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} 0 &{} c_x \\ 0 &{} \frac{f_y}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} c_y \end{bmatrix}}_{[2 \times 4]}\right. \\&\quad \left. \underbrace{f_i^{-1}}_{4 \times 4} \underbrace{\frac{\partial \tilde{{\textbf{Q}}}_{i,j}}{\partial \kappa }}_{4 \times 2m} \right) . \end{aligned} \end{aligned}$$
(86)

Given that \(\frac{\partial }{\partial \kappa }(\frac{f_x}{({\textbf{Q}}_{i,j})_Z} ) = -\frac{f_x}{({\textbf{Q}}_{i,j})_Z^2} \frac{\partial ({\textbf{Q}}_{i,j})_Z}{\partial \kappa }\), to compute Eq. 86), we need the expression for the term \(\frac{\partial ({\textbf{Q}}_{i,j})_Z }{\partial \kappa }\), which can be obtained from:

$$\begin{aligned} \begin{aligned}&\underbrace{\frac{\partial \tilde{{\textbf{Q}}}_{i,j}^{\top } }{\partial \kappa }}_{1 \times 8m} = \begin{bmatrix} \frac{\partial ({\textbf{Q}}_{i,j})_X }{\partial \kappa }&\frac{\partial ({\textbf{Q}}_{i,j})_Y }{\partial \kappa }&\frac{\partial ({\textbf{Q}}_{i,j})_Z }{\partial \kappa }&\textbf{0}_{1 \times 2m}\end{bmatrix} \\&\quad = \frac{\partial }{\partial \kappa } \left( \begin{bmatrix} \underbrace{\rho \big (\Delta (r_j,\theta _j), {\textbf{D}}\big )}_{[1 \times l]}&\tilde{{\textbf{Q}}}_{i,j}^{\top } \end{bmatrix} \varepsilon _{\lambda , i}\begin{bmatrix}\tilde{{\textbf{C}}}_i \\ \textbf{0}\end{bmatrix} \right) \\&= \underbrace{ \begin{bmatrix} \frac{\partial }{\partial \kappa } \Big ( \rho \big ( \Delta (r_j,\theta _j), {\textbf{D}}\big ) \Big )&\frac{\partial \sin {\theta _j}}{\partial \kappa }&\frac{\partial r_j}{\partial \kappa }&\frac{\partial \cos {\theta _j}}{\partial \kappa }&0 \end{bmatrix}}_{1 \times 2m(l + 4)} \\&\quad \underbrace{\Bigg ( \bigg (\varepsilon _{\lambda , i}\varepsilon _{\lambda , i}\begin{bmatrix}\tilde{{\textbf{C}}}_j \\ \textbf{0}\end{bmatrix}\bigg ) \otimes \mathbb {1}_{2m}\Bigg )}_{2m(l+4) \times 8m}, \end{aligned} \end{aligned}$$
(87)

and the four terms inside the first \(1 \times 2m(l + 4)\) matrix of Eq. (87), for the k-th element of the source points \({\textbf{D}}\), is given by the expressions in the frames below.

figure d
figure e
figure f

Moving to the second set of terms in Eq. 84:

$$\begin{aligned} \begin{aligned}&\frac{\partial h_{\textrm{rep}}}{\partial \varvec{\omega }_i} = \frac{\partial }{\partial \varvec{\omega }_i} \Big ( \Vert {\textbf{q}}_{i,j} - \Pi \big (\varphi _i({\textbf{p}}_{j})\big ) \Vert \Big )\\&\quad = \frac{-1}{\Vert {\textbf{q}}_{i,j} - \Pi \big (\varphi _i({\textbf{p}}_{j})\big ) \Vert } \\&\qquad \Bigg ( \bigg ( \Big ( ({\textbf{q}}_{j})_x - \Pi \big (\varphi _i({\textbf{p}}_{j})\big )_x \Big ) \frac{\partial }{\partial \varvec{\omega }_i}\Big ( \Pi \big (\varphi _i({\textbf{p}}_{j})\big )_x \Big ) \bigg ) \\&\qquad + \bigg ( \Big ( ({\textbf{q}}_{j})_y - \Pi \big (\varphi _i({\textbf{p}}_{j})\big )_y \Big ) \frac{\partial }{\partial \varvec{\omega }_i}\Big ( \Pi \big (\varphi _i({\textbf{p}}_{j})\big )_y \Big ) \bigg ) \Bigg ), \end{aligned} \end{aligned}$$
(93)

where:

$$\begin{aligned}{} & {} \frac{\partial }{\partial \varvec{\omega }_i}\Bigg ( \Pi \big (\varphi _i({\textbf{p}}_{j})\big ) \Bigg ) = \frac{\partial }{\partial \varvec{\omega }_i} \left( \begin{bmatrix} \frac{f_x}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} 0 &{} c_x \\ 0 &{} \frac{f_y}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} c_y \end{bmatrix} \right) \nonumber \\{} & {} \quad \Bigg (f_i^{-1} \tilde{{\textbf{Q}}}_{i,j} \otimes \textbf{1}_{3l} \Bigg ) + \left( \begin{bmatrix} \frac{f_x}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} 0 &{} c_x \\ 0 &{} \frac{f_y}{({\textbf{Q}}_{i,j})_Z} &{} 0 &{} c_y \end{bmatrix}f_i^{-1}\frac{\partial \tilde{{\textbf{Q}}}_{i,j}}{\partial \varvec{\omega }_i} \right) . \end{aligned}$$
(94)

Once again, to compute Eq. (94), we need the expression for the term \(\frac{\partial ({\textbf{Q}}_{i,j})_Z }{\partial \varvec{\omega }_i}\), which can be obtained from:

(95)

Obviously, when the indices of \(\tilde{{\textbf{Q}}}\) and \(\varvec{\omega }\) do not match, the rows of the Jacobian matrix are all zeroes, i.e.  \(\frac{\partial \tilde{{\textbf{Q}}}_{{i_1},j}^{\top } }{\partial \varvec{\omega }_{i_2}} = \textbf{0}_{1 \times 12\,l}\) when \(i_1 \ne i_2\). Our next objective is to compute the Jacobian matrix relating the change of \(E_I\) to \(\varvec{\xi }\), providing us with:

$$\begin{aligned}{} & {} \textbf{J}_{I,h} = \frac{\partial }{\partial \varvec{\xi }} \big ( e_{I,h}(\textbf{Q}_{i,j}, \textbf{Q}_{i,q}, d_{j,q}) \big ) \nonumber \\{} & {} \quad = \begin{bmatrix} \frac{\partial }{\partial \kappa } \big ( e_{I,h}(\textbf{Q}_{i,j}, \textbf{Q}_{i,q}, d_{j,q}) \frac{\partial }{\partial \varvec{\omega }} \big ( e_{I,h}(\textbf{Q}_{i,j}, \textbf{Q}_{i,q}, d_{j,q}) \end{bmatrix}.\nonumber \\ \end{aligned}$$
(96)

The two terms on the right most matrix of Eq. (96) are expanded below:

$$\begin{aligned} \begin{aligned}&\frac{\partial }{\partial \kappa } \big ( e_{I,h}(\textbf{Q}_{i,j}, \textbf{Q}_{i,q}, d_{j,q}) \big )\\&\quad = \frac{1}{\zeta _1} \Bigg ( \Big ( (\textbf{Q}_{i,j})_X - (\textbf{Q}_{i,q})_X \Big ) \left( \frac{\partial (\textbf{Q}_{i,j})_X }{\partial \kappa } - \frac{\partial (\textbf{Q}_{i,q})_X}{\partial \kappa } \right) \\&\qquad + \Big ( (\textbf{Q}_{i,j})_Y - (\textbf{Q}_{i,q})_Y \Big ) \left( \frac{\partial (\textbf{Q}_{i,j})_Y }{\partial \kappa } - \frac{\partial (\textbf{Q}_{i,q})_Y}{\partial \kappa } \right) \\&\qquad + \Big ( (\textbf{Q}_{i,j})_Z - (\textbf{Q}_{i,q})_Z \Big ) \left( \frac{\partial (\textbf{Q}_{i,j})_Z }{\partial \kappa } - \frac{\partial (\textbf{Q}_{i,q})_Z}{\partial \kappa } \right) \Bigg ) \\&\qquad - \frac{1}{\zeta _2} \frac{\partial d_{j,q}^2}{\partial \kappa }, \end{aligned} \end{aligned}$$
(97)

where:

(98)
figure g
figure h

The other term from Eq. (96) is:

$$\begin{aligned} \begin{aligned}&\frac{\partial }{\partial \varvec{\omega }} \big ( e_{I,h}(\textbf{Q}_{i,j}, \textbf{Q}_{i,q}, d_{j,q}) \big ) \\&\quad = \frac{1}{\zeta _1} \Bigg ( \Big ( (\textbf{Q}_{i,j})_X - (\textbf{Q}_{i,q})_X \Big ) \Big ( \frac{\partial (\textbf{Q}_{i,j})_X }{\partial \varvec{\omega }} - \frac{\partial (\textbf{Q}_{i,q})_X}{\partial \varvec{\omega }} \Big ) \\&\qquad + \Big ( (\textbf{Q}_{i,j})_Y - (\textbf{Q}_{i,q})_Y \Big ) \Big ( \frac{\partial (\textbf{Q}_{i,j})_Y }{\partial \varvec{\omega }} - \frac{\partial (\textbf{Q}_{i,q})_Y}{\partial \varvec{\omega }} \Big )\\&\qquad + \Big ( (\textbf{Q}_{i,j})_Z - (\textbf{Q}_{i,q})_Z \Big ) \Big ( \frac{\partial (\textbf{Q}_{i,j})_Z }{\partial \varvec{\omega }} - \frac{\partial (\textbf{Q}_{i,q})_Z}{\partial \varvec{\omega }} \Big ) \Bigg ). \end{aligned} \end{aligned}$$
(99)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sengupta, A., Bartoli, A. ToTem NRSfM: Object-Wise Non-rigid Structure-from-Motion with a Topological Template. Int J Comput Vis (2024). https://doi.org/10.1007/s11263-023-01923-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11263-023-01923-6

Keywords

Navigation