3D shape recovery algorithm from image orientations of textured surfaces