Speed up orthorectification.

The orthorectification currently takes some minutes on the test dataset and is very slow on larger datasets. This has to be speeded up.