Skip to main content
Log in

Shape-From-Template with Curves

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

Abstract

Shape-from-Template (SfT) is the problem of using a shape template to infer the shape of a deformable object observed in an image. The usual case of SfT is ‘Surface’ SfT, where the shape is a 2D surface embedded in 3D, and the image is a 2D perspective projection. We introduce ‘Curve’ SfT, comprising two new cases of SfT where the shape is a 1D curve. The first new case is when the curve is embedded in 2D and the image a 1D perspective projection. The second new case is when the curve is embedded in 3D and the image a 2D perspective projection. We present a thorough theoretical study of these new cases for isometric deformations, which are a good approximation of ropes, cables and wires. Unlike Surface SfT, we show that Curve SfT is only ever solvable up to discrete ambiguities. We present the necessary and sufficient conditions for solvability with critical point analysis. We further show that unlike Surface SfT, Curve SfT cannot be solved locally using exact non-holonomic Partial Differential Equations. Our main technical contributions are two-fold. First, we give a stable, global reconstruction method that models the problem as a discrete Hidden Markov Model. This can generate all candidate solutions. Second, we give a non-convex refinement method using a novel angle-based deformation parameterization. We present quantitative and qualitative results showing that real curve shaped objects such as a necklace can be successfully reconstructed with Curve SfT.

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.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
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
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27
Fig. 28
Fig. 29

Similar content being viewed by others

Notes

  1. Which is different from statistics-based priors such as the morphable face models of Blanz and Vetter (1999).

References

  • Agisoft. (2013). Agisoft Lens Version 0.4.1 beta 64 bit (build 1718). http://www.agisoft.com.

  • Agisoft. (2014). Agisoft PhotoScan Version 1.2.3 build 2331 (64 bit). http://www.agisoft.com.

  • Bartoli, A., & Özgür, E. (2016). A perspective on non-isometric shape-from-template. In ISMAR.

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

    Article  Google Scholar 

  • Berthilsson, R., Åström, K., & Heyden, A. (2001). Reconstruction of general curves, using factorization and bundle adjustment. International Journal of Computer Vision, 41(3), 171–182.

    Article  Google Scholar 

  • Blanz, V., & Vetter, T. (1999). Morphable model for the synthesis of 3D faces. In SIGGRAPH.

  • Blender. (2017). Blender 2.78a. https://www.blender.org.

  • Brunet, F., Hartley, R., & Bartoli, A. (2014). Monocular template-based 3D surface reconstruction: Convex inextensible and nonconvex isometric methods. Computer Vision and Image Understanding, 125, 138–154.

    Article  Google Scholar 

  • Casillas-Perez, D., & Pizarro, D. (2017). Solutions of quadratic first-order odes applied to computer vision problems. ArXiv:1710.04265.

  • Chhatkuli, A., Pizarro, D., Bartoli, A., & Collins, T. (2017). 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 

  • Collins, T., & Bartoli, A. (2014). Using isometry to classify correct/incorrect 3D-2D correspondences. In ECCV.

  • Collins, T., & Bartoli, A. (2015). Realtime shape-from-template: System and applications. In ISMAR.

  • Collins, T., Mesejo, P., & Bartoli, A. (2014). An analysis of errors in graph-based keypoint matching and proposed solutions. In ECCV.

  • Collins, T., Bartoli, A., Bourdel, N., & Canis, M. (2016). Dense, robust and real-time 3D tracking of deformable organs in monocular laparoscopy. In MICCAI.

  • David 3D Scanner. (2014). http://www.david-3d.com/en/products/david4.

  • Eliashberg, Y., & Mishachev, N. M. (2002). Introduction to the h-principle. Number Grad. Stud. Math. 48. New York: American Mathematical Society.

  • Faugeras, O., & Papadopoulo, T. (1993). A theory of the motion fields of curves. International Journal of Computer Vision, 10(2), 125–156.

    Article  Google Scholar 

  • Gallardo, M., Pizarro, D., Bartoli, A., & Collins, T. (2015). Shape-from-template in flatland. In CVPR.

  • Gallardo, M., Collins, T., & Bartoli, A. (2016). Using shading and a 3D template to reconstruct complex surface deformations. In BMVC.

  • Haouchine, N., Dequidt, J., Berger, M. O., & Cotin, S. (2014). Single view augmentation of 3D elastic objects. In ISMAR.

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

    MATH  Google Scholar 

  • Kahl, F., & August, J. (2003). Multiview reconstruction of space curves. In ICCV.

  • Liu-Yin, Q., Yu, R., Agapito, L., Fitzgibbon, A., & Russell, C. (2016). Better together: Joint reasoning for non-rigid 3D reconstruction with specularities and shading. In BMVC.

  • Löfberg, J. (2004). YALMIP: A toolbox for modeling and optimization in MATLAB. In International symposium on computer-aided control system design.

  • Lowe, D. G. (2004). Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2), 91–110.

    Article  Google Scholar 

  • Mai, F., & Hung, Y. S. (2010). 3D curves reconstruction from multiple images. In Digital image computing: techniques and applications.

  • Malti, A., & Bartoli, A. (2014). Combining conformal deformation and cook-torrance shading for 3D reconstruction in laparoscopy. IEEE Transactions on Biological Engineering, 61(6), 1684–1692.

    Article  Google Scholar 

  • Malti, A., Bartoli, A., & Collins, T. (2011). A pixel-based approach to template-based monocular 3D reconstruction of deformable surfaces. In Proceedings of the IEEE international workshop on dynamic shape capture and analysis at ICCV.

  • Malti, A., Hartley, R., Bartoli, A., & Kim, J. (2013). Monocular template-based 3D reconstruction of extensible surfaces with local linear elasticity. In CVPR.

  • Malti, A., Bartoli, A., & Hartley, R. I. (2015). A linear least-squares solution to elastic shape-from-template. In CVPR.

  • Martinsson, H., Gaspard, F., Bartoli, A., & Lavest, J. (2007). Energy-based reconstruction of 3D curves for quality control. In EMMCVPR.

  • Ngo, T. D., Park, S., Jorstad, A. A., Crivellaro, A., Yoo, C., & Fua, P. (2015). Dense image registration and deformable surface reconstruction in presence of occlusions and minimal texture. In ICCV.

  • Ngo, T. D., Östlund, J., & Fua, P. (2016). Template-based monocular 3D shape recovery using laplacian meshes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(1), 172–187.

    Article  Google Scholar 

  • Özgür, E., & Bartoli, A. (2017). Particle-SfT: A provably-convergent, fast shape-from-template algorithm. International Journal of Computer Vision, 123(2), 184–205.

    Article  Google Scholar 

  • Parashar, S., Pizarro, D., Bartoli, A., & Collins, T. (2015). As-rigid-as-possible volumetric shape-from-template. In ICCV.

  • 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 

  • Pizarro, D., & Bartoli, A. (2012). Feature-based deformable surface detection with self-occlusion reasoning. International Journal of Computer Vision, 97(1), 54–70.

    Article  Google Scholar 

  • Rabiner, L. R. (1989). A tutorial on hidden markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2), 257–286.

    Article  Google Scholar 

  • Robert, L., & Faugeras, O. (1991). Curve-based stereo: Figural continuity and curvature. In CVPR.

  • Salzmann, M., & Fua, P. (2009). Reconstructing sharply folding surfaces: A convex formulation. In CVPR.

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

    Article  Google Scholar 

  • Salzmann, M., Pilet, J., Ilic, S., & Fua, P. (2007). Surface deformation models for nonrigid 3D shape recovery. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(8), 1481–1487.

    Article  Google Scholar 

  • Sbert, C., & Solé, A. F. (2003). 3D curves reconstruction based on deformable models. Journal of Mathematical Imaging and Vision, 18, 211–223.

    Article  MathSciNet  Google Scholar 

  • Schmidt, M. (2007). UGM: A matlab toolbox for probabilistic undirected graphical models. http://www.cs.ubc.ca/~schmidtm/Software.

  • Sorkine, O., & Alexa, M. (2007). As-rigid-as-possible surface modeling. In Proceedings of the fifth Eurographics symposium on geometry processing (pp. 109–116).

  • Sturm, J. (1999). Using SeDuMi 1.02, a MATLAB toolbox for optimization over symmetric cones. Optimization Methods and Software, 11–12, 625–653.

    Article  MathSciNet  Google Scholar 

  • TurboSquid. (2016). http://www.turbosquid.com.

  • Vicente, S., & Agapito, L. (2013). Balloon shapes: Reconstructing and deforming objects with volume from images. In 3DV, June.

  • Warehouse, D. (2016). https://3dwarehouse.sketchup.com.

  • Wu, C. (2011). VisualSFM: A visual structure from motion system. http://ccwu.me/vsfm.

  • Yu, R., Russell, C., Campbell, N. D. F., & Agapito, L. (2015). Direct, dense, and deformable: Template-based non-rigid 3D reconstruction from RGB video. In ICCV.

Download references

Acknowledgements

We thank Armine Vardazaryan for her help in creating the simulated dataset 3D cord and the Conseil Départemental du Puy-de-Dôme which allows us to acquire the ground-truth of the road dataset. We also thank Bastien Durix for his valuable discussions about the case of closed curvilinear templates. This research has received funding from the EU’s FP7 through the ERC research Grant 307483 FLEXABLE.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mathias Gallardo.

Additional information

Communicated by Ko Nishino.

Publisher's Note

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

Appendices

Appendix A

1.1 \(\hbox {SfT}^{1 \rightarrow 3 \rightarrow 2}\): Proof of Proposition 3–Critical Point Definition in \(\varphi \)

Proof

We start by writing \(\mathbf {J}_{\bar{\eta }}\) as a function of \(\hat{\varphi }\) from Eq. (4):

$$\begin{aligned} \mathbf {J}_{\bar{\eta }} = \frac{\hat{\varphi }_z \mathbf {J}_{\hat{\varphi }} - \hat{\varphi }'_z \hat{\varphi }}{\hat{\varphi }^2_z}. \end{aligned}$$
(44)

We substitute Eq. (44) in Eq. (10), then express \(\xi \) as a function of \(\hat{\varphi }\) and \(\mathbf {J}_{\hat{\varphi }}\):

$$\begin{aligned} \xi =&\; \frac{1}{\Vert \bar{\eta }\Vert ^2} \left( \frac{1}{\hat{\varphi }^4_z} \left( \hat{\varphi }_z \mathbf {J}_{\hat{\varphi }} - \hat{\varphi }'_z \hat{\varphi } \right) ^2 \right. \nonumber \\&\,\left. -\, \frac{1}{\Vert \bar{\eta }\Vert ^2} \frac{1}{\hat{\varphi }^6_z} \left( \hat{\varphi }_z {\mathbf {J}}^{\top }_{\hat{\varphi }} \hat{\varphi } - \hat{\varphi }'_z {\hat{\varphi }}^{\top }\hat{\varphi } \right) \left( \hat{\varphi }_z {\hat{\varphi }}^{\top } \mathbf {J}_{\hat{\varphi }} - \hat{\varphi }'_z {\hat{\varphi }}^{\top }\hat{\varphi } \right) \right) \nonumber \\ =&\; \frac{1}{\Vert \bar{\eta }\Vert ^2} \frac{1}{\hat{\varphi }^4_z} \left( \left( \hat{\varphi }_z \mathbf {J}_{\hat{\varphi }} - \hat{\varphi }'_z \hat{\varphi } \right) ^2\right. \nonumber \\&\,\left. -\, \frac{1}{\Vert \hat{\varphi }\Vert ^2} \left( \hat{\varphi }_z {\mathbf {J}}^{\top }_{\hat{\varphi }} \hat{\varphi } - \hat{\varphi }'_z {\hat{\varphi }}^{\top }\hat{\varphi } \right) \left( \hat{\varphi }_z {\hat{\varphi }}^{\top } \mathbf {J}_{\hat{\varphi }} - \hat{\varphi }'_z {\hat{\varphi }}^{\top }\hat{\varphi } \right) \right) . \end{aligned}$$
(45)

We expand Eq. (45) and simplify:

$$\begin{aligned} \xi =&\; \frac{1}{\Vert \bar{\eta }\Vert ^2} \frac{1}{\hat{\varphi }^4_z} \left( \hat{\varphi }^2_z {\mathbf {J}}^{\top }_{\hat{\varphi }} \mathbf {J}_{\hat{\varphi }} - \frac{\hat{\varphi }^2_z}{\Vert \hat{\varphi }\Vert ^2} {\mathbf {J}}^{\top }_{\hat{\varphi }} \hat{\varphi } {\hat{\varphi }}^{\top } \mathbf {J}_{\hat{\varphi }} \right) \nonumber \\ =&\; \frac{1}{\Vert \bar{\eta }\Vert ^2} \frac{1}{\hat{\varphi }^2_z} \frac{1}{\Vert \hat{\varphi }\Vert ^2} \left( {\hat{\varphi }}^{\top } \hat{\varphi } {\mathbf {J}}^{\top }_{\hat{\varphi }} \mathbf {J}_{\hat{\varphi }} - {\mathbf {J}}^{\top }_{\hat{\varphi }} \hat{\varphi } {\hat{\varphi }}^{\top } \mathbf {J}_{\hat{\varphi }} \right) . \end{aligned}$$
(46)

We use Definition 1 which gives \(\hat{\theta }^2(u_c)\xi (u_c) = 1\) if and only if \(u_c\) is a critical point. For this, we express \(\hat{\theta }^2\xi \) as a function of \(\hat{\varphi }\) and \(\mathbf {J}_{\hat{\varphi }}\):

$$\begin{aligned} \hat{\theta }^2\xi =&\; \hat{\varphi }^2_z \; \Vert \bar{\eta }\Vert ^2 \frac{1}{\Vert \bar{\eta }\Vert ^2} \frac{1}{\hat{\varphi }^2_z} \frac{1}{\Vert \hat{\varphi }\Vert ^2} \left( {\hat{\varphi }}^{\top } \hat{\varphi } {\mathbf {J}}^{\top }_{\hat{\varphi }} \mathbf {J}_{\hat{\varphi }} - {\mathbf {J}}^{\top }_{\hat{\varphi }} \hat{\varphi } {\hat{\varphi }}^{\top } \mathbf {J}_{\hat{\varphi }} \right) \nonumber \\ =&\; \frac{1}{\Vert \hat{\varphi }\Vert ^2} \left( {\hat{\varphi }}^{\top } \hat{\varphi } {\mathbf {J}}^{\top }_{\hat{\varphi }} \mathbf {J}_{\hat{\varphi }} - {\mathbf {J}}^{\top }_{\hat{\varphi }} \hat{\varphi } {\hat{\varphi }}^{\top } \mathbf {J}_{\hat{\varphi }} \right) . \end{aligned}$$
(47)

We now replace \(\hat{\varphi }\) by its three components \(\hat{\varphi }_x\), \(\hat{\varphi }_y\) and \(\hat{\varphi }_z\):

$$\begin{aligned} \hat{\theta }^2\xi= & {} \; \frac{1}{\Vert \hat{\varphi }\Vert ^2} \left( \left( \hat{\varphi }^2_x + \hat{\varphi }^2_y + \hat{\varphi }^2_z \right) \left( \hat{\varphi }'^2_x + \hat{\varphi }'^2_y + \hat{\varphi }'^2_z \right) \right. \nonumber \\&\,\left. -\, \left( \hat{\varphi }_x \hat{\varphi }_x + \hat{\varphi }_y \hat{\varphi }'_y + \hat{\varphi }_z \hat{\varphi }'_z \right) ^2 \right) . \end{aligned}$$
(48)

By expanding Eq. (48) and simplifying, we obtain:

$$\begin{aligned} \hat{\theta }^2\xi =&\; \frac{1}{\Vert \hat{\varphi }\Vert ^2} \left( \left( \hat{\varphi }_x \hat{\varphi }'_y + \hat{\varphi }'_x \hat{\varphi }_y \right) ^2 + \left( \hat{\varphi }_x \hat{\varphi }'_z + \hat{\varphi }'_x \hat{\varphi }_z \right) ^2 \right. \nonumber \\&\left. +\, \left( \hat{\varphi }_y \hat{\varphi }'_z + \hat{\varphi }'_y \hat{\varphi }_z \right) ^2 \right) \nonumber \\ =&\frac{\Vert \hat{\varphi } \times \mathbf {J}_{\hat{\varphi }} \Vert ^2}{\Vert \hat{\varphi }\Vert ^2}. \end{aligned}$$
(49)

We now reintroduce \(u_c\) to use Definition 1:

$$\begin{aligned}&( u_c \text { is a critical point} ) \nonumber \\ {}&\quad \Leftrightarrow \Bigg ( \hat{\theta }^2(u_c)\xi (u_c) = \frac{\Vert \hat{\varphi }(u_c) \times \mathbf {J}_{\hat{\varphi }}(u_c) \Vert ^2}{\Vert \hat{\varphi }(u_c)\Vert ^2} = 1 \Bigg ) \nonumber \\&\quad \Leftrightarrow \Big ( {\hat{\varphi }}^{\top }(u_c) \, \, \mathbf {J}_{\hat{\varphi }}(u_c) = 0 \Big ). \end{aligned}$$
(50)

Appendix B

1.1 \(\hbox {SfT}^{1 \rightarrow 3 \rightarrow 2}\): Proof of Proposition 4–The Set of Super Critical Points

Proof

We first demonstrate that given a solution \(\hat{\varphi }\) and a critical point \(u_c\), then \(u_c\) is also a critical point of \(\varphi _s\). From Definition 1, we have \(\hat{\theta }'(u_c)=0\), which gives:

$$\begin{aligned} \hat{\theta }(u_c) = \frac{1}{\sqrt{\xi (u_c)}}. \end{aligned}$$
(51)

From Eqs. (51) and (13), we have \(\hat{\theta }(u_c) = \theta _{s}(u_c)\). Therefore the two curves meet at \(u_c\). To demonstrate that \(u_c\) is also a critical point of \(\varphi _s\), we first differentiate Eq. (10) to obtain the following second-order ODE:

$$\begin{aligned} 2\theta '\theta '' + \xi ' \theta ^2 + 2\xi \theta \theta ' = 0. \end{aligned}$$
(52)

Because \(\hat{\theta }\) is a solution to the ODE (10), at \(u_c\) we have by substituting Eq. (52):

$$\begin{aligned} \xi '(u_c) \hat{\theta }(u_c)^2 = 0. \end{aligned}$$
(53)

We then differentiate Eq. (13) to obtain the following constraint on \(\varphi _s\) at \(u_c\):

$$\begin{aligned} \xi (u_c) \theta _{s}(u_c) \theta '_{s}(u_c) + \xi '(u_c) \theta _{s}(u_c)^2 = 0. \end{aligned}$$
(54)

We substitute Eq. (53) into Eq. (54) and use \(\hat{\theta }(u_c) = \theta _{s}(u_c)\) to obtain:

$$\begin{aligned} \xi (u_c) \theta _{s}(u_c) \theta '_{s}(u_c) = 0. \end{aligned}$$
(55)

Because \(\hat{\varphi }\) is a solution of the ODE (10) and \(u_c\) a critical point, we have \(\xi (u_c) \hat{\theta }(u_c)^2 = 1\), so \(\xi (u_c)\) and \(\theta _{s}(u_c)\) cannot be null. We then have \(\theta '_{s}(u_c)=0\) and thus \(u_c\) is also a critical point of \(\varphi _s\).

Appendix C

\(\hbox {SfT}^{1 \rightarrow 3 \rightarrow 2}\): Proof of Proposition 5–Super Critical Point Identities

Proof

Derivation of the first identity. We derive a necessary and sufficient condition on \(\eta \) that is valid at super critical points. We assume \(\hat{\varphi }\) is a solution to Eq. (4) with \(u_s\) being a super critical point. We first differentiate Eq. (10) to form the following ODE:

$$\begin{aligned} 2\theta '\theta '' + \xi ' \theta ^2 + 2\xi \theta \theta ' = 0. \end{aligned}$$
(56)

We know that \(\hat{\theta }=\varepsilon \hat{\varphi }_{y}\) is a solution to Eq. (56), and \(\hat{\theta }'(u_s)=0\) from Definition 1. We substitute \(\hat{\theta }\) in Eq. (56) and evaluate the result at \(u_s\), obtaining the following:

$$\begin{aligned} \xi '(u_s) \hat{\theta }^2(u_s)= 0. \end{aligned}$$
(57)

Derivation of the second identity. We know \(\hat{\theta }^2(u_s)\ne 0\), otherwise \(\hat{\varphi }\) would pass through the camera’s origin at \(u_s\). We also have that \(\xi '(u_s)=0\) from the first super critical point identity. The second identity is found by differentiating \(\xi \) as defined in Eq. (10). To express \(\xi '\) as a function of \(\eta \) and its derivatives, we first define two intermediate terms, \(A_{\eta }\) and \(B_{\eta }\), and express \(\xi '\) using \(A_{\eta }\), \(B_{\eta }\) and their first derivatives:

$$\begin{aligned} A_{\eta }= & {} {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta } - \frac{1}{\varepsilon ^2} B_{\eta } \quad \text {and} \quad B_{\eta } = {\mathbf {J}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {J}_{\eta }, \end{aligned}$$
(58)
$$\begin{aligned} A'_{\eta }= & {} {\mathbf {H}}^{\top }_{\eta } \mathbf {J}_{\eta } + {\mathbf {J}}^{\top }_{\eta } \mathbf {H}_{\eta } - \frac{1}{\varepsilon ^4}\left( \varepsilon ^2 B'_{\eta } - 2 \varepsilon ' \varepsilon B_{\eta } \right) ,\end{aligned}$$
(59)
$$\begin{aligned} B'_{\eta }= & {} {\mathbf {H}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {J}_{\eta } + {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta } {\eta }^{\top } \mathbf {J}_{\eta } + {\mathbf {J}}^{\top }_{\eta } \eta {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta } \nonumber \\&+ {\mathbf {J}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {H}_{\eta }. \end{aligned}$$
(60)

Because \(\eta \), \(\mathbf {J}_{\eta }\) and \(\mathbf {H}_{\eta }\) are \({\mathbb {R}}^2\)-vector, \({\mathbf {H}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {J}_{\eta } = {\mathbf {J}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {H}_{\eta }\) and \({\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta } {\eta }^{\top } \mathbf {J}_{\eta } = {\mathbf {J}}^{\top }_{\eta } \eta {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta }\), which simplifies \(B'_{\eta }\):

$$\begin{aligned} B'_{\eta } = 2 {\mathbf {J}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {H}_{\eta } + 2 {\mathbf {J}}^{\top }_{\eta } \eta {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta }. \end{aligned}$$
(61)

From Eqs. (58), (59) and (61), we have:

$$\begin{aligned} \xi ' =&\; \frac{1}{\varepsilon ^4}\left( \varepsilon ^2 A'_{\eta } - 2 \varepsilon ' \varepsilon A_{\eta } \right) \nonumber \\ =&\; \frac{1}{\varepsilon ^4}\left( 2 \varepsilon ^2 {\mathbf {J}}^{\top }_{\eta } \mathbf {H}_{\eta } - B'_{\eta } + 2 \frac{\varepsilon '}{\varepsilon } B_{\eta } - 2 \varepsilon ' \varepsilon {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta } + 2\frac{\varepsilon '}{\varepsilon } B_{\eta } \right) \nonumber \\ =&\; \frac{1}{\varepsilon ^4}\left( 2 \varepsilon ^2 {\mathbf {J}}^{\top }_{\eta } \mathbf {H}_{\eta } - 2 {\mathbf {J}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {H}_{\eta } - 2 {\mathbf {J}}^{\top }_{\eta } \eta {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta }\right. \nonumber \\&\,\left. +\, \frac{4}{\varepsilon ^2} {\eta }^{\top } \mathbf {J}_{\eta } {\mathbf {J}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {J}_{\eta } - 2 {\eta }^{\top } \mathbf {J}_{\eta } {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta } \right) . \end{aligned}$$
(62)

Using \({\eta }^{\top } \mathbf {J}_{\eta } = {\mathbf {J}}^{\top }_{\eta } \eta \), we obtain:

$$\begin{aligned} \xi '= & {} \frac{2}{\varepsilon ^6}\left( \varepsilon ^4 {\mathbf {J}}^{\top }_{\eta } \mathbf {H}_{\eta } - {\eta }^{\top } \mathbf {J}_{\eta } \left( \varepsilon ^2 {\eta }^{\top } \mathbf {H}_{\eta } + 2 \varepsilon ^2 {\mathbf {J}}^{\top }_{\eta } \mathbf {J}_{\eta } \right. \right. \nonumber \\&\left. \left. -\, 2 {\mathbf {J}}^{\top }_{\eta } \eta {\eta }^{\top } \mathbf {J}_{\eta } \right) \right) , \end{aligned}$$
(63)

from which we have that \(\xi '(u_s)=0\) is equivalent to:

$$\begin{aligned}&\varepsilon ^4(u_s) {\mathbf {J}}^{\top }_{\eta }(u_s) \mathbf {H}_{\eta }(u_s) - \varepsilon ^2(u_s) {\eta }^{\top }(u_s) \mathbf {J}_{\eta }(u_s) {\eta }^{\top }(u_s) \mathbf {H}_{\eta }(u_s) \nonumber \\&- 2 {\eta }^{\top }(u_s) \mathbf {J}_{\eta }(u_s) \left( \varepsilon ^2(u_s) {\mathbf {J}}^{\top }_{\eta }(u_s) \mathbf {J}_{\eta }(u_s) \right. \nonumber \\&\left. -\, {\mathbf {J}}^{\top }_{\eta }(u_s) \eta (u_s) {\eta }^{\top }(u_s) \mathbf {J}_{\eta }(u_s) \right) = 0. \end{aligned}$$
(64)

By substituting \(\varepsilon \) and \(\varepsilon '\) in terms of \(\eta \) and removing factors in Eq. (64), we obtain the following:

$$\begin{aligned}&\Vert \bar{\eta }(u_s)\Vert ^4 {\mathbf {J}}^{\top }_{\eta }(u_s) \mathbf {H}_{\eta }(u_s) \nonumber \\&- \Vert \bar{\eta }(u_s)\Vert ^2 {\eta }^{\top }(u_s) \mathbf {J}_{\eta }(u_s) {\eta }^{\top }(u_s) \mathbf {H}_{\eta }(u_s) \nonumber \\&- 2 {\eta }^{\top }(u_s) \mathbf {J}_{\eta }(u_s) \left( \Vert \bar{\eta }(u_s)\Vert ^2 {\mathbf {J}}^{\top }_{\eta }(u_s) \mathbf {J}_{\eta }(u_s)\right. \nonumber \\&\left. -\, {\mathbf {J}}^{\top }_{\eta }(u_s) \eta (u_s) {\eta }^{\top }(u_s) \mathbf {J}_{\eta }(u_s) \right) = 0. \end{aligned}$$
(65)

This only depends on \(\eta \) and its derivatives.

Derivation of the third identity. We use the fact that, at any super critical point \(u_s\), \(\hat{\varphi }(u_s) = \varphi _{s}(u_s)\) (Definition 2). We then use Proposition 3 which says that the critical points of the super curve \(\varphi _{s}\) are the points where the tangent of \(\varphi _{s}\) and the line-of-sight are orthogonal.

Appendix D

1.1 \(\hbox {SfT}^{1 \rightarrow 2 \rightarrow 1}\): Proof of Proposition 9–Critical Point Definition in \(\varphi \)

Proof

We start by writing \(\eta '\) in function of \(\hat{\varphi }\) from Eq. (17):

$$\begin{aligned} \eta ' =\dfrac{\hat{\varphi }'_x \hat{\varphi }_y-\hat{\varphi }_x\hat{\varphi }'_y}{(\hat{\varphi }_y)^2}. \end{aligned}$$
(66)

We substitute Eq. (66) in Eq. (25) and Eq. (24) to express \(\xi \) and \(\hat{\theta }\):

$$\begin{aligned} \xi =\dfrac{\left( \hat{\varphi }'_x\hat{\varphi }_y - \hat{\varphi }_x\hat{\varphi }'_y\right) ^2}{\left( \hat{\varphi }^2_x + \hat{\varphi }^2_y \right) ^2} \end{aligned}$$
(67)
$$\begin{aligned} \hat{\theta } =\sqrt{\hat{\varphi }^2_x +\hat{\varphi }^2_y}. \end{aligned}$$
(68)

We use Definition 1 which gives \(\hat{\theta }^2(u_c)\xi (u_c) = 1\) if and only if \(u_c\) is a critical point. For this, we express \(\hat{\theta }^2\xi \) as a function of \(\hat{\varphi }\) and \(\hat{\varphi }'\):

$$\begin{aligned} \nonumber \hat{\theta }^2\xi =&\; \dfrac{\left( \hat{\varphi }'_x\hat{\varphi }_y - \hat{\varphi }_x\hat{\varphi }'_y) \right) ^2}{\hat{\varphi }^2_x + \hat{\varphi }^2_y} \\ =&\; \dfrac{\Vert \hat{\varphi } \times \hat{\varphi }'\Vert ^2}{\left\| \hat{\varphi }\right\| ^2}. \end{aligned}$$
(69)

We now reintroduce \(u_c\) to use Definition 1:

$$\begin{aligned}&\nonumber ( u_c \text { is a critical point} ) \\&\quad \Leftrightarrow \Bigg ( \hat{\theta }^2(u_c)\xi (u_c) = \dfrac{\Vert \hat{\varphi }(u_c) \times \hat{\varphi }'(u_c)\Vert ^2}{\left\| \hat{\varphi }(u_c)\right\| ^2} = 1 \Bigg )\nonumber \\&\quad \Leftrightarrow \Big ( {\hat{\varphi }}^{\top }(u_c) \, \, \hat{\varphi }'(u_c) = 0 \Big ). \end{aligned}$$
(70)

Appendix E

\(\hbox {SfT}^{1 \rightarrow 2 \rightarrow 1}\): Proof of Proposition 10–Super Critical Point Identites

Proof

We follow the same steps as the proof of Proposition 5 and obtain that \(\xi '(u_s)=0\), which is the first characterization. A second one can be found by differentiating the analytical expression of \(\xi \) given in Eq. (25):

$$\begin{aligned} \xi '= \dfrac{2\varepsilon ^4\eta '\eta ''-4\varepsilon ^3\varepsilon '\eta '^2}{\varepsilon ^8}, \end{aligned}$$
(71)

from which we have that \(\xi '(u_s)=0\) is equivalent to:

$$\begin{aligned} \dfrac{\varepsilon ^3}{\eta '}\left( \varepsilon (u_s)\eta ''(u_s) - 2\varepsilon '(u_s)\eta '(u_s) \right) =0. \end{aligned}$$
(72)

By substitution of \(\varepsilon \) and \(\varepsilon '\) in terms of \(\eta \) and removing factors in Eq. (72) we have the second identity:

$$\begin{aligned} 2\eta (u_s)\eta '^2(u_s)-(1+\eta ^2(u_s))\eta ''(u_s)=0, \end{aligned}$$
(73)

which only depends on \(\eta \) and its derivatives.

For the third characterization, we use the fact that, at any super critical point \(u_s\), \(\hat{\varphi }(u_s) = \varphi _{s}(u_s)\) (Definition 2). We then use Proposition 9 and obtain that the critical points of the super curve \(\varphi _{s}\) are the points where the tangent of \(\varphi _{s}\) and the line-of-sight are orthogonal.

Appendix F

1.1 Reconstruction Algorithm of Proposed Category (iv) Method for the \(\hbox {SfT}^{1 \rightarrow 3 \rightarrow 2}\) Problem

We give here a pseudo-code of our proposed category (iv) method for the \(\hbox {SfT}^{1 \rightarrow 3 \rightarrow 2}\) problem, which we present in Sect. 5.2. The pseudo-code for the \(\hbox {SfT}^{1 \rightarrow 2 \rightarrow 1}\) problem differs from only one notation, the 2D correspondence in the input image \(\mathbf {q}_k\) which becomes a scalar \(q_k\) as it is a 1D correspondence.

figure a
figure b

Appendix G

Hyperparameters for \(\hbox {SfT}^{1 \rightarrow 2 \rightarrow 1}\) and \(\hbox {SfT}^{1 \rightarrow 3 \rightarrow 2}\) Experiments

See Tables 5, 6.

Table 5 Hyperparameter values for different category methods to solve \(\hbox {SfT}^{1 \rightarrow 2 \rightarrow 1}\) for all datasets
Table 6 Hyperparameter values for different category methods to solve \(\hbox {SfT}^{1 \rightarrow 3 \rightarrow 2}\) for all datasets

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gallardo, M., Pizarro, D., Collins, T. et al. Shape-From-Template with Curves. Int J Comput Vis 128, 121–165 (2020). https://doi.org/10.1007/s11263-019-01214-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11263-019-01214-z

Keywords

Navigation