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:
- projecting a pattern of lines on a surface of the object;
- generating an image of the surface of the object, wherein the image includes the pattern of lines projected on the surface of the object, wherein each line includes a left edge and right edge;
- a) tracking left and right edges of the line in the image, wherein said tracking includes determining left and right edge points of the line;
- b) determining a local width of the line from 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.