Patent attributes
A page orientation component of an image processing device receives an image of a document, transforms the image to a binarized image by performing a binarization operation on the image, and identifies a portion of the binarized image that comprises one or more rows of textual content. The page orientation component identifies a plurality of horizontal runs of white pixels and a plurality of vertical runs of white pixels in the one or more rows of textual content in the portion of the binarized image. The page orientation component generates a first histogram for the plurality of horizontal runs of white pixels, and a second histogram for the plurality of vertical runs of white pixels, and determines an orientation of the one or more rows of textual content in the image based on the first histogram and the second histogram.