A computer-readable medium containing a program of instructions adapted to cause, when executed, a computer to perform the operations of:
- acquiring a scanned image containing a string of characters;
- extracting a recognition image containing the string of characters and a neighboring image area from the scanned image, the recognition image containing a plurality of matching areas;
- applying a recognition process to the recognition image by comparing each matching area with templates;
- and
- determining and setting a size of each of a second and subsequent matching areas to which the recognition process is applied based on a position at which a character in the string of characters in an immediately previous matching area was recognized;
- wherein, if a noise character is erroneously recognized and no character is recognized within a specific distance from the noise character, a next matching area is reset.