pattern detect and ang_pose estimation