Handheld 3D reconstruction based on closed-loop detection and nonlinear optimization. (28th November 2019)