A memory medium comprising program instructions for tracing a line in an image, wherein the line is displayed on a surface of an object in the image, wherein the tracing is performed to identify defects in the object, wherein the line includes a left edge and a right edge, wherein the program instructions are executable to implement:
- a) tracking left and right edges of the line in the image, wherein said tracking includes determining left and right edge points uses a bi-directional edge detection technique;
- b) determining a local width of the line for the left and right edge points of the line;
- c) determining a local orientation of the first line for the left and right edge points of the line;
- repeating steps (a)-(c) a plurality of times to substantially trace the line and determine information regarding the line;
- determining whether a defect is present in the object using said local widths and said local orientations.