Pose estimation for mobile devices and augmented reality