Single-Shot Accurate 3D Reconstruction Using Structured Light Systems Based On Local Optimization