1. 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 plurality of reference images includes four types of reference images, each type corresponding to one of four orientations, the four types of reference images being prepared for at least one of a vertical character line and a horizontal character line.