1. A method for cutting out, from a gray-scale image generated by capturing an image of a character string, each character in the character string for recognition, the method comprising: a first step of repeating projection processing for projecting a highest or lowest gray level in a line along a direction crossing the character string in the gray-scale image, onto an axis along the character string, with the lowest gray level selected when a character in the gray-scale image is darker than a background, the highest gray level selected when the character in the gray-scale image is brighter than the background, and a projection target position moved along the character string; a second step of extracting a local maximum value and a local minimum value from a projected pattern generated by the first step, and setting, between a variable range of the local maximum value and a variable range of the local minimum value, a straight line inclined in accordance with variation of the values; and a third step of cutting out an image in a cut out target range in the gray-scale image with a range, in which a gray level higher than the straight line in the projected pattern is projected, set as the cut out target range when the highest gray level is projected in the first step, and a range, in which a gray level lower than the straight line in the projected pattern is projected, set as the cut out target range when the lowest gray level is projected in the first step.