A structural approach for the computer recognition of planar shapes such as handwritten alphanumeric characters. Encodes structural features of contours extracted from digitized images into strings, which provide a basic and simple representation of the images for the purpose of classification. The general technique allows further enhancements and can be adapted for a number of pattern recognition applications.