O'Reilly logo

Practical Guide to Machine Vision Software: An Introduction with LabVIEW by Steven Ready, Kye-Si Kwon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13Contour Analysis

Contour analysis is often used to detect defects in objects by analyzing the object's contours. Boundary curves of objects are connected to produce contours. For this purpose, the objects in the image should have clear boundary edges to accurately distinguish its location from the image background. Since boundary curves are a set of edge points, the color image should be converted to 8 bit grayscale or binary image for the edge detection.

Figure 13.1 shows the basic process for contour analysis to find defects in objects.

img

Figure 13.1 Defect detection process using contour analysis.

To analyze the contour of objects, curvature profile is often used. The curvature profile is effective in detecting defects in places where the contour changes abruptly. However, some objects may have abrupt contour changes even though there are no defects. In such cases, defect detection using the curvature may be impossible.

On the other hand, you may use a reference template image to detect defects in an object by the comparison of contours. Alternatively, if the contour has a standard geometric general shape, such as line, circle ellipse, polynomial, and B-spline, the contour of the object may be numerically fitted to find abnormal parts in an object.

The example for detecting defects of an object can be found from the following folder:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required