Quality inspection of aluminum foil products plays an important role for aluminum foil manufactures. We present a method that uses input estimate (IE)-based chi-square detectors for defect detection in aluminum foil. It is assumed that the intensity of the aluminum foil image is Gaussian distributed, and the distribution of the defect intensity is different from the normal. Under these assumptions, Kalman filters with a constant velocity (CV) model are used to filter the image. We assume there is an unknown input in the CV model and the unknown input is estimated in the filtering process. The defects are determined by the chi-square test of the estimate of the unknown input. Experiments show that our technique is effective for most defects in aluminum foil. ©2009 Society of Photo-Optical Instrumentation Engineers
Optical devices have been incorporated into mechatronic systems, and many machine-vision-based techniques have been used for quality control of products equipped with intelligence. In product quality control of aluminum foil manufacturing, quality inspection has to resort to machine-vision-based techniques for rigorous manufacture conditions. There are many machine-vision-based quality control techniques. In Ref. 1, edges in images are used to detect defects in ceramic tiles. In the textile industry, the Fourier analysis technique,2 morphology-based technique,3 wavelet-based technique,4 co-occurrence matrices, and Garbo-filter-based technique5 are used to detect defects in fabric surfaces. In the leather industry, oriented texture analysis is used to detect defects in leather.6 In Ref. 7, the infrared light reflected by the metal sheet is used to analyze the defects of metal sheets. However, each defect detecting technique is designed for a special target, so those techniques may not be suitable for defect detection in aluminum foil.
The techniques suitable for the detection of defects in aluminum foil should be designed according to the property of the aluminum foil product line. In our case, the foil goes through the product line at nearly five meters per second. The high resolution planar array camera is not suitable for this case, because high resolution planar cameras often have low frame rates, and the redundant information in the image sequence will affect image processing speed. Therefore, a line scan camera is used, and after every equal time span an image array can be obtained.
There are many types of defects in aluminum foil, some of which are shown in Fig. 1. Some defects have no apparent edges and some defects take up no more than 5 pixels [e.g., Figs. 1(a)1(c)1(d)1(g)], so edge-based methods may not perform well. Some defects have an intensity similar to the normal area [e.g., Fig. 1(a)], so a threshold-based method whose performance is often sensitive to its parameters may not perform well for this type of defect. Although some defects have direction properties [e.g., Fig. 1(k)], most defects have no direction property, so Garbo-filter-based techniques are not suitable. There is less texture and period information in foil images, so texture- or frequency-analysis-based methods often used in fabric defect detection are not suitable for our case. Furthermore, the intensity of the normal area may vary [e.g., Fig. 1(e)1(h)1(m)], and the sizes of the defects are different [e.g., Figs. 1(d)1(g)1(l)1(m)]; these may cause difficulty in defect detection.Figure 1.
We collect a large number of foil images from the product line, and from these images the histogram of intensity is obtained. The histogram shows that the intensity of the foil images approximately obeys Gaussian distribution. Then we collect the images with labeled defects and compute the histogram only using the pixels labeled as defects. The two histograms show that the intensity distribution of the defect is different from the normal. This property can be used to detect defects in aluminum foil.
We apply an input-estimate-based chi-square detector, which is widely used in maneuver target tracking, to solve the defect detecting problem and obtain inspiring results. We assume the intensity of the aluminum foil image is Gaussian distributed, and use the Kalman filters with a constant velocity (CV) model to filter the image. By assuming there is an unknown input in the CV model, the unknown input is estimated in the filtering process. The defects are determined by the chi-square significance test of the estimate of the unknown input. Experiments show that our technique is effective for most types of defects, and the processing speed can satisfy real-time applications.
This work is organized as follows. Section I is the introduction; some basic notions are reviewed in Sec. II; Sec. III is the implementation; and Sec. IV is the experimental results and the conclusions.
In this section, we review some basic notions from the theory of Kalman filters, the constant velocity (CV) model, as well as the input-estimation-based chi-square detector that we need in the sequel.
The Kalman filter is a linear estimator based on the minimum mean squared error (MMSE).8,9 For the sake of less computation and better performance, it has been widely used since it was introduced. Here is a brief review of a Kalman filter.
Given a system equation and measurement equation as follows:
where x and z are state and measurement vectors, respectively; v and w are zero mean Gaussian noise with covariance Q and R; u is an input vector that is estimated; F, G, and H are state, input, and measurement matrices, respectively; and F, G, H, Q, and R are assumed known and possibly time varying. The two noise sequences and the initial state are assumed mutually independent. The previous constitute the linear Gaussian (LG) assumption.
The main equations of a Kalman filter are as follows:
where the expression (k+1|k) denotes the estimate of A at time k+1 estimated at time k; P and S are the state covariance and the innovation covariance; and W and µ are the filter gain and the innovation.
In the Kalman filter some kinetic models are often used to describe the kinetic property of the target, like the constant velocity (CV) model and the constant acceleration (CA) model.9 Given a target moving with constant velocity, the CV model is suitable to describe the kinetic property of the target. In the CV model, the state vector is x=(X,X)T, where X is considered as displacement and X is the differential of X, i.e., velocity. If the measurement is displacement, the measurement matrix is H=(1 0). Otherwise, if the measurement is velocity then the measurement matrix is H=(0 1). In the CV model the state matrix is
where T is a time interval.
The input-estimation (IE)-based chi-square detector is often used to detect target maneuvers in maneuver target tracking (MTT) applications.9,10,11,12,13,14 The detector consists of input estimation and chi-square significance tests. In the input estimation process two models are used, one is the nonmaneuvering model [Eq. (3)] and the other is the maneuvering model [Eq. (4)] with input u.
Denote the present time by k and assume the target starts maneuvering at time k-s, that is, the maneuver onset time is k-s. The unknown inputs during the interval [k-s,…,k] are u(i), i=k-s,…,k-1. The state from the mismatched nonmaneuvering filter based on Eq. (3) is denoted by an asterisk:
with the initial condition *(k−s|k−s−s)=*(k−s|k−s−1).
If the inputs are known, the hypothetical correct filter based on Eq. (4) yields estimates according to the recursion
The innovations corresponding to the hypothetical correct filter [Eq. (6)] is
The innovations corresponding to the nonmaneuvering filter [Eq. (5)] is
Combining Eqs. (5),(6),(7),(8) yields
Assuming the input to be constant over the interval [k-s,…,k-1], i.e., u(j)=u, j=k-s,…,k-1, yielding
Based on Eq. (10), the input can be estimated via LS from
and , whose components are innovations [Eq. (7)], is zero mean with block-diagonal covariance matrix
The input estimate in batch form is
with the resulting covariance matrix
The chi-square significance test is used to test the significance of the estimation of input. A maneuver is declared if and only if Eq. (16) is statistically significant. The significance test for the input is
It is a chi-square distributed variable, i.e., ~, where nu=dim() is the dimension of vector . If
then decide if a maneuver occurs, where 1− is the confidence level.
In our product line the aluminum foil goes through the line scan camera at almost five meters per second. After each equal time span, an intensity image I with M rows and N columns is obtained. Statistics from a large number of foil images show that the intensity approximately obeys Gaussian distribution, and the intensity distribution of the defects is different from the normal. The intensity of every column (row) constitutes a time sequence that is Gaussian distributed, and the time sequence is considered as the measurement sequence of velocity in the CV model. Under these conditions, H=(0 1), the state matrix is
where T is a time interval, and the variance R should be set a bit larger than the variance of the intensity of the image I. Since every column (row) is considered as a measurement sequence of velocity in the CV model, the Kalman filter is used to filter the column from up to down. There are N columns in image I, so N Kalman filters are used correspondingly. Each column relates to one filter. In the filtering process of each filter, use the input-estimation (IE)-based chi-square detector to detect maneuvers. The position, where a maneuver is determined to occur, is considered to be the defect position. The detecting result is stored in the defect mask . is an M×N matrix, and if the (i,j)'th point in image I is detected to be a defect point, then label the (i,j)'th element of with 1, otherwise label it with zero. It is found that the position of the defect areas detected by the IE detector will be behind the correct defects due to the detection delay of the IE detector, so it will lead to imprecise locations of defects. To solve the problem, we detect image I from the four directions: up to down; down to up; left to right; and right to left. So totally 2M+2N filters are used. Denote up, down, left, and right as the defect mask from the detecting results of the four directions, respectively, and compute the logical OR of the four defect mask,
where the operator | is logical OR. The defect mask is the final defect mask, and the defect area of image I is labeled in .
The Kalman filter needs initialization to determine the first state vector x(0) and the first state covariance P(0|0). Set x(0)=(0,X)T, where X is the average intensity of the image I. It is an alternative choice to set X equal to the intensity of the pixel where the filter started at if the defects seldom occur in the marginal area of the image. Set the first state covariance
It is an alternative choice to set
which will lead to the convergence of the filter with a little delay.
We apply our technique to detect defects in a defect image database that contains ten types of defects. The correct detection rate is 95%, and some results are shown in Fig. 2. Due to the detection delay of the IE detector, the defect mask will be a bit larger than the correct defect, but it will not affect the correct detection. For large defects, there will be a hole in the defect mask [e.g., Fig. 2(m)]. This shortcoming can be solved by some morphology operators. In fact, the sizes of defects in the foil are often small, so this shortcoming can be ignored for detecting and locating defects. Moreover, in our technique the four detecting processes of the four directions are mutually independent, so the four processes can be carried out in parallel. If carried out in parallel, the process time can be reduced by three quarters in theory. We test our technique on a PC with an Intel E4500 CPU (2.2 GHz) to detect the defect images of size 1024×768. If in parallel, the average processing time is less 52 ms, if not, the average processing time is more than 110 ms.Figure 2.
There are many maneuver detectors such as measurement-residual-based chi-square detectors, input-estimate-based Gaussian significance detectors, and generalized likelihood ratio test detectors. It will be our future work to study whether these detectors can be used in defect detection for aluminum foil and compare their performance.
Fig. 1. Aluminum foil defect images. First citation in article
Fig. 2. Defect images and defect masks. First citation in article
Up: Issue Table of Contents
Go to: Previous Article | Next Article
Other formats: HTML (smaller files) | PDF ( kB)