To improve the recognition rate without requiring a long processing time and a large-scale memory by inverting and outputting the color of a pixel of interest in an input image when a pixel matrix having the pixel of interest in the center satisfies a specific expression.
A preprocess part 2 performs a filter process while scanning the input image and sends an output image to a segmentation part 3 when finishing the filter process for the whole image or a desirable specified area. The segmentation part 3 segments a character image of a parts where characters are prsent from the whole preprocessed image and sends it to a recognition part 4. The recognition part 4 recognizes the character image as characters and outputs the result in the form of character codes. Here, the filter used by the preprocess part 2 inverts and outputs the color of the pixel of interest in the input image when the pixel matrix X (i, j) of three rows and three columns having the pixel of interest in the center satisfies a conditional expression, etc. In the expression, 0 represents a white pixel, 1 represents a black pixel, and * is an arbitrary pixel whose color is not important.