1. A computer-implemented method of processing a document image, comprising: receiving a document image captured by a mobile device; performing a shape detection test on the document image to produce a first set of coordinates representing a set of edges of the document image; performing a feature detection test on the document image to produce a second set of coordinates associated with a feature set, wherein the feature detection test comprise a feature matching operation between the feature set of the document image and a document image template; combining the first set of coordinates and the second set of coordinates to generate a set of adjustment parameters associated with the document image; cropping the document image based at least on the adjustment parameters; binarizing the cropped image to produce a binarized cropped image; and outputting the binarized cropped image.