Study on inspection method of glass defect based on phase image processing

Study on inspection method of glass defect based on phase image processing

Optik 125 (2014) 5846–5849 Contents lists available at ScienceDirect Optik journal homepage: www.elsevier.de/ijleo Study on inspection method of gl...

798KB Sizes 0 Downloads 52 Views

Optik 125 (2014) 5846–5849

Contents lists available at ScienceDirect

Optik journal homepage: www.elsevier.de/ijleo

Study on inspection method of glass defect based on phase image processing Yong Jin, Zhaoba Wang ∗ , Yu Chen, Xiaoli Kong, Limei Wang, Weizhe Qiao National Key Lab for Electronic Measurement Technology, North University of China, Taiyuan 030051, China

a r t i c l e

i n f o

a b s t r a c t

Article history: Received 18 October 2013 Accepted 30 May 2014

To solve the problem in projecting grating method, the paper presents an inspection method based on phase image processing for glass defects. In the proposed method, the wrapped phase difference is achieved according to the images of defect-free and defect-containing. The unwrapping phase algorithm, based on jump corrected is used to eliminate jump error. The segmentation of defect region is implemented by integrating grayscale mathematical morphology with high-low threshold segmentation, and the boundary coordinate of connected region is used to calculate the size and location of defect. The results demonstrate that the proposed method provides reliable identification of defects. © 2014 Elsevier GmbH. All rights reserved.

Keywords: Glass defect inspection Wrapped phase difference image Phase unwrapping Defect region segmentation

1. Introduction The defects from production process will damage the appearance and reduce the grade of glass. Thus, defect inspection is an important task in glass manufacturing [1]. The method based on transmission-mode projecting grating for glass defects is valid, which can calculate the diopter and test the location, size and type of defect [2]. However, it is likely to divide a single defect into several unconnected ones and yield an incorrect size and amount of defects. This will make false classification of the quality grade. In this paper, the method of defect inspection is proposed to solve this problem by phase image processing. The wrapped phase image is calculated by Fourier transform, and the wrapped phase difference is achieved according to the images of defect-free and defect-containing. The unwrapping phase algorithm is used to eliminate jump error. The segmentation algorithm is implemented by integrating grayscale mathematical morphology with high-low threshold segmentation. The boundary coordinate of connected region is used to calculate the size and location of defect.

where I(x,y) is the fringe intensity, a(x,y)is the background intensity, b(x,y) is the fringe amplitude and (x,y) the fringe phase, f0 = 1/p is the spatial frequency of the grating, and p the grid pitch of the grating, x and y refer to the spatial coordinates along the horizontal and vertical directions. In the proposed method, two fringe images, i.e. one defect-free and the other with defects are considered, and the change of phase near the defect will occur compared with the defect-free. Hence, the defect can be inspected by using the information about the phase change. Taking the several typical defects for example, the fringe images (200 × 200 pixels) with resolution of (0.1 mm × 0.1 mm)/pixel, such as defect-free, stone, knot and ream, are shown in Fig. 1. Fourier transform is applied to solve the phase of fringe image [3,4]. The phase is calculated by arctan function and wrapped in the range between − and , which is interrupted and jumped. The wrapped phase in Fig. 1 is shown in Fig. 2. The wrapped phase difference of defects is calculated by  (x, y) =

2. The wrapped phase difference of typical defects The grayscale distribution of fringe image on glass surface is given as: I(x, y) = a(x, y) + b(x, y) cos (2f0 x +

(x, y))

∗ Corresponding author. Tel.: +86 13503515326. E-mail address: [email protected] (Z. Wang). http://dx.doi.org/10.1016/j.ijleo.2014.07.021 0030-4026/© 2014 Elsevier GmbH. All rights reserved.

(1)

(x, y) −

0 (x, y),

where 0 (x,y) and (x,y) are the wrapped phase of defect-free and defects. The wrapped phase difference  (x,y) is still jumped compared with 0 (x,y), and the magnitude is 2. The typical defects image of wrapped phase difference is shown in Fig. 3. From Fig. 3, it is clear that the position of the jump is different to each other. For the wrapped phase of knot and ream defects, the deviation of jump position is due to the influence of system noise, the difference between defects and defect-free generates 2 jump. However, the stone defect, in addition to the 2 jump caused by the

Y. Jin et al. / Optik 125 (2014) 5846–5849

5847

Fig. 4. The unwrapped phase difference of typical defects: (a) stone; (b) knot; (c) ream. Fig. 1. The fringe images of typical defects: (a) defect-free; (b) stone; (c) knot; (d) ream.

3. The algorithm of unwrapping phase

Fig. 2. The wrapped phase of typical defects: (a) defect-free; (b) stone; (c) knot; (d) ream.

system noise, the defect-core also induces the jump and generates the residue, the reason is that the interrupting fringe at defectcore makes dramatic change and calculates the wrong value in the wrapped phase.

The wrapped phase difference of typical defects must be unwrapped to obtain the real phase difference. The major phase unwrapping algorithms include the point-by-point unwrapping method [5], the branch cutting method [6], the quality map guidance method [7,8] and the least square method [9]. The efficiency of the point-by-point unwrapping method is the highest. But the residue in the wrapped phase difference will lead to the results related to the path, making the error propagation along the path. The branch cutting method and the quality map guidance method can get the real phase with high quality, but the unwrapping efficiency is lower. The least square method is one of the best approximation algorithms, so the phase change by the defects will extend to the defect-free area. A phase unwrapping algorithm, based on jump corrected is presented. The concrete implementation process as follows: By selecting two threshold as ±, and for each pixel with spatial coordinates (x,y) in the fringe image, the unwrapped phase difference (x,y) can be calculated by the following equation:

(x, y) =

⎧ ⎨  (x, y) − 2 if  (x, y) >  ⎩

 (x, y) + 2  (x, y)

if  (x, y) < −

(2)

otherwise

Compared with above algorithms, the unwrapping algorithm proposed in this paper can be implemented according to the value of each pixel only, with higher efficiency and similar accuracy results. The typical defects image of unwrapped phase difference is shown in Fig. 4. 4. The segmentation of phase difference image As can be seen in Fig. 4, the change of the phase difference near the defect is pronounced compared to defect-free regions. Hence, by using the segmentation algorithm about the phase difference value, the defect could be identified. In this paper, the segmentation algorithm of defect region is proposed based on integrating grayscale mathematical morphology with high-low threshold segmentation. A disk structuring element b(x,y) with a diameter of 7 pixels is selected. The enhanced image of the unwrapped phase difference, f (x,y), can be computed as: f  (x, y) = [(x, y) ⊕ b(x, y)] − [(x, y)b(x, y)]

Fig. 3. The wrapped phase difference of typical defects: (a) stone; (b) knot; (c) ream.

(3)

where ‘⊕’denotes the dilation operation of grayscale mathematical morphology, and ‘’ the erosion operation.

5848

Y. Jin et al. / Optik 125 (2014) 5846–5849

Fig. 6. The highlighted region of typical defects: (a) stone; (b) knot; (c) ream. Fig. 5. The identified region of typical defects: (a) stone; (b) knot; (c) ream.

A low threshold is selected as T1 = 0.05, the image which eliminated the background noise can be obtained by the following formula:



f  (x, y) =

if f  (x, y)

0 f  (x, y)

< 0.05

(4)

otherwise

The defect region can be identified by the following formula:



f (x, y) =

0

if f  (x, y) < T2

1

otherwise

5. Calculating the size and location of defect The connected region, which has a gray value of 1 in the binary defect image, is extracted by the extraction method of connected components, and the location of the defect can be calculated according to the central coordinate of the region. Its boundary coordinate is used to calculate the size of the defect. The actual size D and location P(x,y) are given by:

(5) D = max{˛ × [max(xi ) − min(xi )], ˇ × [max(yi ) − min(yi )]}

where T2 is the average gray value in the connected region with f (x, y) = / 0. Based on this approach, the achieved binary result f(x,y) can be used to identify the defect region. The identified and highlighted region of typical defects is shown in Figs. 5 and 6 respectively. The highlighted defect region demonstrates that the proposed method provides reliable identification of defects, and a defect is segmented into one connected region with accurate size.



P(x, y) = ˛ ×

max(xi ) + min(xi ) max(yi ) + min(yi ) ,ˇ × 2 2

(6)

 (7)

where xi , yi are the boundary coordinate values of the connected region, ˛, ˇ are the image resolution along the horizontal and vertical directions and determined by the image capture system. The resulting defect information with resolution of (0.1 mm × 0.1 mm)/pixel can be calculated according to the method above as shown in Table 1.

Table 1 Calculated results for stone, knot and ream. Defect

Minimum (xi )

Maximum (xi )

Minimum (yi )

Maximum (yi )

D, mm

P(x,y), mm

Stone Knot Ream

67 87 85

140 118 118

76 92 55

135 125 159

7.3 3.3 10.4

(10.4, 10.6) (10.3, 10.9) (10.2, 10.7)

Y. Jin et al. / Optik 125 (2014) 5846–5849

6. Conclusions The paper presents an effective method for identifying the glass defects by phase image processing. The proposed phase unwrapping algorithm is used to achieve the real phase difference quickly and precisely. The segmentation algorithm to unwrapped phase difference can assure the integrity of single defect and the precision of the defect region. This ensures the correct classification of the quality grade. Acknowledgment This work is supported by the Natural Science Foundation of Shanxi Province, China (Grant No. 2012021011-5). References [1] X. Peng, Y. Chen, W. Yu, Z. Zhou, G. Sun, An online defects inspection method for float glass fabrication based on machine vision, Int. J. Adv. Manuf. Technol. 39 (2008) 1180–1189.

5849

[2] Y. Jin, Z. Wang, L. Zhu, J. Yang, B. Wei, Study on glass defect inspection based on projecting grating method, J. Test. Eval. 41 (2013) 332– 339. [3] E. Zappa, G. Busca, Comparison of eight unwrapping algorithms applied to Fourier-transform profilometry, Opt. Lasers Eng. 46 (2008) 106– 116. [4] L.-C. Chen, H.-W. Ho, X.-L. Nguyen, Fourier transform profilometry (FTP) using an innovative band-pass filter for accurate 3-D surface reconstruction, Opt. Lasers Eng. 48 (2010) 182–190. [5] J.C. Estrada, M. Servin, J. Vargas, 2D simultaneous phase unwrapping and filtering: a review and comparison, Opt. Lasers Eng. 50 (2012) 1026–1029. [6] Y. Zhang, M. Huang, H. Liang, F. Lao, Branch cutting algorithm for unwrapping photoelastic phase map with isotropic point, Opt. Lasers Eng. 50 (2011) 619–631. [7] K. Chen, J. Xi, Y. Yu, Quality-guided spatial phase unwrapping algorithm for fast three-dimensional measurement, Opt. Commun. 294 (2013) 139– 147. [8] Y. Lu, W. Zhao, X. Zhang, W. Xu, G. Xu, Weighted-phase-gradient-based quality maps for two-dimensional quality-guided phase unwrapping, Opt. Lasers Eng. 50 (2012) 1397–1404. [9] S.B. Kim, Y.S. Kim, Least squares phase unwrapping in wavelet domain, IEEE Proc. Vis. Image Signal Process. 152 (2005) 261–267.