1 A computer-implemented method for recognizing edges in a digital image, the image having a plurality of pixels with gray-scale values defining features, the method comprising the steps of: (a) recognizing edge regions of the features by creating 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; (b) performing area recognition to distinguish internal feature areas from background areas; and (c) detecting edge lines that separate features from background areas and internal feature areas.