1. A method of correcting alignment of an image, the method comprising: identifying an image of a document; detecting a plurality of lines within the image; classifying at least a subset of the plurality of lines as horizontal lines or vertical lines; determining that a variance exists within the subset of the plurality of lines; and applying a corrective transformation to adjust the image, wherein the variance within the subset of the plurality of lines is at least partially reduced as compared to the variance prior to the application of the corrective transformation.