1. A method of cropping an image based on a content of the image, comprising: 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; and cropping the image according to the document bounding box.