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.





























Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Notes
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.
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.
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.
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.
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.
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.
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.
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.
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.
Ö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.
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.
Pizarro, D., & Bartoli, A. (2012). Feature-based deformable surface detection with self-occlusion reasoning. International Journal of Computer Vision, 97(1), 54–70.
Rabiner, L. R. (1989). A tutorial on hidden markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2), 257–286.
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.
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.
Sbert, C., & Solé, A. F. (2003). 3D curves reconstruction based on deformable models. Journal of Mathematical Imaging and Vision, 18, 211–223.
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.
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.
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
Corresponding author
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):
We substitute Eq. (44) in Eq. (10), then express \(\xi \) as a function of \(\hat{\varphi }\) and \(\mathbf {J}_{\hat{\varphi }}\):
We expand Eq. (45) and simplify:
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 }}\):
We now replace \(\hat{\varphi }\) by its three components \(\hat{\varphi }_x\), \(\hat{\varphi }_y\) and \(\hat{\varphi }_z\):
By expanding Eq. (48) and simplifying, we obtain:
We now reintroduce \(u_c\) to use Definition 1:
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:
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:
Because \(\hat{\theta }\) is a solution to the ODE (10), at \(u_c\) we have by substituting Eq. (52):
We then differentiate Eq. (13) to obtain the following constraint on \(\varphi _s\) at \(u_c\):
We substitute Eq. (53) into Eq. (54) and use \(\hat{\theta }(u_c) = \theta _{s}(u_c)\) to obtain:
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:
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:
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:
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 }\):
From Eqs. (58), (59) and (61), we have:
Using \({\eta }^{\top } \mathbf {J}_{\eta } = {\mathbf {J}}^{\top }_{\eta } \eta \), we obtain:
from which we have that \(\xi '(u_s)=0\) is equivalent to:
By substituting \(\varepsilon \) and \(\varepsilon '\) in terms of \(\eta \) and removing factors in Eq. (64), we obtain the following:
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):
We substitute Eq. (66) in Eq. (25) and Eq. (24) to express \(\xi \) and \(\hat{\theta }\):
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 }'\):
We now reintroduce \(u_c\) to use Definition 1:
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):
from which we have that \(\xi '(u_s)=0\) is equivalent to:
By substitution of \(\varepsilon \) and \(\varepsilon '\) in terms of \(\eta \) and removing factors in Eq. (72) we have the second identity:
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.


Appendix G
Hyperparameters for \(\hbox {SfT}^{1 \rightarrow 2 \rightarrow 1}\) and \(\hbox {SfT}^{1 \rightarrow 3 \rightarrow 2}\) Experiments
Rights and permissions
About this article
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11263-019-01214-z