An Image Distortion Correction Algorithm Based on Automatic Extraction of Control Points