1. A method of deskewing an image, the method comprising: capturing a first image; forming a plurality of regions within the first image; generating a plurality of bounding rectangles for the plurality of regions; calculating a plurality of areas for the plurality of bounding rectangles; rotating the plurality of regions by an angle within a predefined range; finding a plurality of angles that minimize the plurality of areas of the plurality of bounding rectangles; and rotating the plurality of regions by the plurality of angles found.