Intelligent and Robust 3D shape measurement for in-situ applications