Fix bug in homography detection

Until now the slower map_coordinates was used.