1. A method of correcting image distortion, comprising: obtaining a scanned image having distortion caused by scanning; extracting a pixel run having a selected ranged length in a main scanning direction from the scanned image; forming a rule line rectangle based on the pixel run; extracting a rule line based on the rule line rectangle; and correcting the distortion by using the rule line.