1. A method, said method comprising: receiving a captured digital image for processing as an input image; determining an initial angle of rotation by sampling a plurality of test angles of rotation of the input image and analyzing resultant rotated images to determine a resultant rotated image with a highest number of substantially empty lines; rotating the input image by the initial angle of rotation to generate a first rotated image; processing the first rotated image to determine a refining angle of rotation, said processing including: determining text line areas of the first rotated image; generating a representative line of each text line area; calculating a slope of each representative line; and determining an aggregated slope of all the representative lines in the first rotated image, wherein the aggregated slope is converted to the refining angle of rotation; validating the refining angle of rotation by finding points of intersection of lines connecting opposing ends of adjacent representative lines, and estimating a substantially vertical line through the point of intersection, wherein the difference between the substantially vertical line and a line perpendicular to the aggregated slope indicates the accuracy of the refining angle of rotation; and rotating the first rotated image by the refining angle of rotation to result in a final rotated image.