Patent Document ID: 20090317000
Application ID: 12489673
Patent Status: 0

Claim One:
1. A method of detecting orientation of an image, the method comprising: selecting text blocks; testing whether the number of text blocks N is less than a pre-set threshold T; if the number of text blocks N is less than the pre-set threshold T, not detecting the orientation of the document; if the number of text blocks N is greater than the pre-set threshold T, filling non-text areas with white color; transforming the image into a binary image; calculating asymmetry parameters of text (asym 0 , asym 90 ); calculating a horizontal coefficient (ah) and a vertical coefficient (av); testing whether the parameter (asym 0 ) is greater than zero and whether the horizontal coefficient (ah) is greater than the vertical coefficient (av); if a result of testing whether the parameter (asym 0 ) is greater than zero and the horizontal coefficient (ah) is greater than the vertical coefficient (av) is positive, determining that the image has correct orientation; if a result of testing whether the parameter (asym 0 ) is greater than zero and the horizontal coefficient (ah) is greater than the vertical coefficient (av) is negative, testing whether the parameter (asym 0 ) is less than zero and whether the horizontal coefficient (ah) is greater than the vertical coefficient (av); if a result of testing whether the parameter (asym 0 ) is less than zero and the horizontal coefficient (ah) is greater than the vertical coefficient (av) is positive, turning the image by 180 degrees; if a result of testing whether the parameter (asym 0 ) is less than zero and the horizontal coefficient (ah) is greater than the vertical coefficient (av) is negative, testing whether the parameter (asym 90 ) is greater than zero and the horizontal coefficient (ah) is less than the vertical coefficient (av); if a result of testing whether the parameter (asym 90 ) is greater than zero and the horizontal coefficient (ah) is less than the vertical coefficient (av) is positive, turning the image by 90 degrees; and if a result of testing whether the parameter (asym 90 ) is greater than zero and the horizontal coefficient (ah) is less than the vertical coefficient (av) is negative, turning the image by 270 degrees.