摘要 |
A technique for detecting defects in stationary products or in products moving on a production line (102, FIG. 12) by analyzing their images uses a matrix or line-scan camera (104, FIG. 12) for taking images of products (102). The product's dimensions are measured with accuracy and the sizes and positions of their surface defects are determined. The technique is much faster and more accurate than current techniques and is based on an analysis of the histogram of the full image (C, FIG. 2). A carefully selected template image (A, FIG. 1) is created and saved in the memory of a computer (106, FIG. 12). The method also includes the steps of: creating and saving a histogram vector of the template image; loading look-up tables with a shifting and quantizing function for the image gray levels; saving a product image in memory to be superposed onto template image (FIG. 1); creating and saving a histogram vector of the result superposed image; analyzing the resulting histograms, i.e., finding discontinuations, changes the values of gray levels, appearance of new gray levels, etc. This results in the detection of product dimensions or surface defects and allows deciphering of product codes.
|