9. An image processing method comprising: using a processor to perform the steps of: extracting a predetermined number of consecutive characters from a document image; converting the consecutive characters into a set of symbols using layout information obtained from the consecutive characters; and detecting an orientation of the consecutive characters based on occurrence probabilities of the set of symbols obtained using a plurality of reference images, each reference image corresponding to one of the predetermined orientations, wherein the detecting step comprises the steps of: obtaining a plurality of n-gram models each trained on one of the plurality of reference images; calculating the occurrence probabilities of the set of symbols for each of the predetermined orientations using the n-gram models; and selecting one of the predetermined orientations corresponding to the occurrence probability having a largest value.
9. An image processing method comprising: using a processor to perform the steps of: extracting a predetermined number of consecutive characters from a document image; converting the consecutive characters into a set of symbols using layout information obtained from the consecutive characters; and detecting an orientation of the consecutive characters based on occurrence probabilities of the set of symbols obtained using a plurality of reference images, each reference image corresponding to one of the predetermined orientations, wherein the detecting step comprises the steps of: obtaining a plurality of n-gram models each trained on one of the plurality of reference images; calculating the occurrence probabilities of the set of symbols for each of the predetermined orientations using the n-gram models; and selecting one of the predetermined orientations corresponding to the occurrence probability having a largest value. 12. The method of claim 9 , wherein the detecting step further comprises the step of: detecting a language type of the character line using the set of symbols, wherein the plurality of reference images correspond to the detected language type.