1. A method of processing a page in the form of an image, said page including lines of text, the method comprising: generating a histogram of foreground pixel counts corresponding to a current line of text of said page being processed, said foreground pixel counts corresponding to different rows of pixels corresponding to said current line of text; identifying a first peak and a second peak in said histogram, said first peak corresponding to a row of pixels above said second peak; determining if said page is inverted or non-inverted based on a difference between a first count of foreground pixels in a first portion of said current line of text and a second count of foreground pixels in a second portion of said current line of text, said first portion being located in said line of text above said first peak, said second portion being located in said line of text below said second peak.
9. The method of claim 1 , further comprising: setting said current line of text to a new line of text; generating a per text line difference value for said current line of text; and updating the cumulative difference value based on the per text line difference value for the current line of text.