1. An image processing method comprising: analyzing, by an image processing apparatus, an image of a portion of text having at least one line; detecting, by the image processing apparatus, inter-line spacing and inter-word spacing across an area of the image; based on the detected inter-line spacing and the inter-word spacing, deriving a quadrilateral shape, the quadrilateral shape representing a deformation of the image from an undistorted image; and modifying, by the image processing apparatus, the image to perform perspective correction based on the derived quadrilateral shape.