A computer-implemented method is disclosed for recognizing edges in a
digital image having a plurality of pixels with gray-scale values
defining features. The method includes recognizing edges of the features
by cearting a new image in which pixels in the new image corresponding to
pixels in the gray-scale image that have a brightness value meeting a
predetermined threshold are assigned a first binary value to represent
edge regions, while remaining pixels in the new image are assigned a
second value to represent both background and internal areas of the
features. Area recognition is then performed to distinguish internal
feature areas from background areas. The method further includes
detecting edge lines from the edge regions that separate features from
background and internal feature areas.