A computer system and a method for a mail sorting operation in which the computer system determines the location of the ZIP code within a digital image of an address block from a piece of mail. An interstroke distance is calculated for the image and the strokes of the image are thinned to enhance vertical separation between the lines of the address block. A medial axis for each line is determined and the medial axis is superimposed upon the digital image. A bleeding operation is conducted on the digital image from the medial axis at which data bits that do not connect to the medial axis are notated as punctuation and interlinear connected strokes are then divided between the two lines. The last line which is determined to be large enough to contain a ZIP code based on bounding box size is then selected. Alternate splits of words are formed and the best split is selected in which the last formed group is detected to be the ZIP code.
展开▼