1. A character string recognition method for recognizing a character string comprising the steps of: imaging a character string on a medium to obtain image data; a first step in which: a first projection data of the image data are calculated in a direction of the character string while shifting in a perpendicular direction which is perpendicular to a direction of the character string; and the image data are divided into a plurality of segments in the direction of the character string and projection in each of the plurality of segments is calculated; a second step in which a position of the character string in the perpendicular direction is detected on a basis of the first projection data which are obtained through the first step; a third step in which a second projection data in the segment in the perpendicular direction are calculated on a basis of the position of the character string which is detected through the second step while shifting in the direction of the character string; and a fourth step in which a position where the second projection data obtained through the third step exceeds a threshold value is detected as a boundary position of a character included in the character string; wherein the threshold value is made larger as the pixel number between both ends of the character string increases and the threshold value is made smaller as the pixel number between both ends of the character string decreases.