Dense Image Registration through Mrfs and Efficient Linear Programming