Applies a homography to an ndarray