1. A method of cropping an image based on a content of the image, comprising: receiving the image at a processor; identifying image features in the content of the image; determining horizontal histogram frequencies and vertical histogram frequencies of the identified image features; determining borders of a document bounding box based on the determined horizontal histogram frequencies and vertical histogram frequencies; determining a horizontal centroid and a vertical centroid of the horizontal and vertical histogram frequencies, respectively; resizing the document bounding box based on the determined horizontal and vertical centroids; and cropping the image according to the document bounding box as said resized.