In operation 2010, a length and height of a region of an image is determined. The image may be of a document. The region may be a bounding box defined to substantially surround an area of an image having a probability of including handwriting. As discussed above with respect to operation 1705, some embodiments may analyze an image of a document and identify one or more regions in the image having a handwriting probability above a threshold. The length and height of the region are determined in operation 2010. In some aspects, operation 2010 determines the height of the region to be parallel to a direction of a majority of linear features in the region. For example, operation 2010 may analyze features within the region and identify linearity to groups of features in the region. Option 2010 may then determine a vector that a majority of the groups of features are aligned with. The height may be substantially parallel to this vector while the length may be substantially perpendicular with the vector.