adapt the perspective to match the reference image