The segmentation algorithm for handwritten numeral strings in bank-check recognition