1. A method comprising: obtaining an image of a document against a background; finding a bounding box that bounds a region of the image that is distinguishable from the background; finding coordinates of a plurality of points of the distinguishable region, each point being a point of the distinguishable region that is closest to each corner of the bounding box; and identifying the document within the image as a region of the image whose corners are defined by the found coordinates.