Efficient Rectification of Distorted Fingerprints