Ransac updated with headland detection