Detect Defects Concepts |
The Detect Defects step is based on a technique called golden template comparison. Golden template comparison compares the pixel intensities of an image under inspection to a golden template. A golden template is an image containing an ideal representation of an object under inspection. A pixel in an inspection image is marked as a defect if its intensity does not match the corresponding pixel in the golden template within a specified tolerance.
Inspection based on golden template comparison is a common vision application. Use golden template comparison when you want to inspect for defects, and other methods of defect detection are not feasible. To use golden template comparison, you must be able to acquire an image that represents the ideal inspection image for your application.
Conceptually, inspection based on golden template comparison is simple: Subtract an image from an ideal part and another image of a part under inspection. Any visible defects on the inspected part appear as differences in intensity in the resulting defect image. Figure 1 illustrates this concept.
Figure 1 |
Figure 1a shows the golden template in a label inspection application. Figure 1b shows the inspection image. Figure 1c shows the resulting defect image. Defect areas in which the inspection image is brighter than the template are overlaid in green. Defect areas in which the inspection image is darker than the template are overlaid in red.
Refer to the NI Vision Concepts Manual for more information about golden template comparison.