Aiming at its shortcomings of being difficult-to-move, low-efficiency modeling and high cost, this paper proposes a handheld 3D reconstruction system based on closed-loop detection and nonlinear optimization. The proposed system adds closed-loop detection with the bag of words model, reducing the drift and misalignment of the 3D reconstruction model caused by cumulative errors. Meanwhile, the g2o framework is employed to optimize the graph to solve the pose state estimation problem of the nonlinear system, which greatly enhances the robustness and accuracy of the system. The experimental platform for the experiment and analysis of the 3D reconstruction system uses a non-invasive 3D detection Tango mobile phone. Experimental results show that the indoor high-precision 3D reconstruction system based on the handheld device (Project Tango) has good accuracy and robustness, and the error range is about 1%. Therefore, the system proposed in this paper has a good application value.