A PCB photoelectric image edge information detection method

A PCB photoelectric image edge information detection method

Accepted Manuscript Title: A PCB photoelectric image edge information detection method Authors: Fen Zhang, Naosheng Qiao, Jianfeng Li PII: DOI: Refere...

272KB Sizes 11 Downloads 155 Views

Accepted Manuscript Title: A PCB photoelectric image edge information detection method Authors: Fen Zhang, Naosheng Qiao, Jianfeng Li PII: DOI: Reference:

S0030-4026(17)30811-2 http://dx.doi.org/doi:10.1016/j.ijleo.2017.07.002 IJLEO 59397

To appear in: Received date: Accepted date:

23-1-2017 3-7-2017

Please cite this article as: Fen Zhang, Naosheng Qiao, Jianfeng Li, A PCB photoelectric image edge information detection method, Optik - International Journal for Light and Electron Opticshttp://dx.doi.org/10.1016/j.ijleo.2017.07.002 This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

A PCB photoelectric image edge information detection method Fen Zhanga,b, Naosheng Qiaob,c , Jianfeng Li d* a School of Computer Science and Technology, Hunan University of Arts and Science, ChangDe, HuNan 415000, PR China b Hunan Province Cooperative Innovation Center for The Construction & Development of Dongting Lake Ecological Economic Zone, ChangDe, HuNan 415000, PR China c School of Physics and Electronic, Hunan University of Arts and Science, ChangDe, HuNan 415000, PR China d College of Information Science and Engineering, Jishou University, Jishou, Hunan, 416000 , PR China * Corresponding author. E-mail address: [email protected].

Abstract: In order to carry out edge information detection for printed circuit board (PCB) photoelectric image better, an effective edge information detection method by combining image preprocessing with image detection based on adaptive iterative threshold selection algorithm is proposed. Firstly, the PCB photoelectric image enhancement preprocessing method based on removing gray redundancy and gray scale transformation is discussed. Secondly, the basic principle of image detection based on adaptive iterative threshold selection algorithm is analyzed, and its formulas are deduced. Finally, in order to verify the correctness of the basic principle analysis, the image edge information detection experiments by using the PCB photoelectric images acquired by CCD and microscope are actualized, and the better edges information of the subjective results and the objective results are obtained. Key words: image edge information detection; PCB photoelectric image; image preprocessing; adaptive iterative threshold selection algorithm; image edge information entropy; Canny operator 1. Introduction It is very important during the course of Printed Circuit Board (PCB) manufacture in the field of PCB detection, it is a useful and arisen vision detection method in recent years, and many scholars study it in the world due to its popular [1-3]. For example, Shirvaikar M et al. obtained the disfigurement of high density PCB thorn default by adopting the automatic optical inspection technology [1]. QIAO Kai et al. proposed an automatic PCB wire detecting method based on superpixel segmentation, and a better result with a detection rate more than 90% was achieved [2]. The PCB board information is mainly reflected in the image information, and the PCB board information detection results are usually reflected by the PCB photoelectric image information detection. Common classical detection methods are reference comparison method, non reference calibration method and hybrid method [4-5]. With the development of such fields as microelectronics industry, the requirement of PCB photoelectric image information detection is getting higher and higher. In order to detect the information of PCB photoelectric image better, many scholars in the word have studied it deeply, and some good results have been achieved [6-12]. For example, Qiao Naosheng et al. accorded to the extraction problem of the edge information of noisy PCB defect image, proposed an image edge detection method based on

the mixed method by combining with median filter, improved maximum distance between categories method, the improved mathematical morphology edge detection operator and LOG operator [6]. Zhang Jing et al. proposed a method for chrominance correction of photoelectric image of appearance detection in printed circuit board, and it can improve the detection accuracy and efficiency of automatic optical inspection which will have a wide application in the field of optical detection [7]. Xiong Bangshu et al. proposed a detection method for PCB defect based on image by combining image processing technology, it can improve the automatic defect detection ability of PCB, and the defect detection information in real PCB images is obtained better [8]. N S Qiao et al. proposed an edge detection method for noisy and darker PCB photoelectric image by combining with the advantages of both wavelet transform and Canny edge detection operator, and the better edge detection information was obtained [9]. Owing to the special conditions for illegibility and noise, it is difficult to detect accurately the PCB photoelectric image information by use single method. In this paper, aiming at the idiographic condition of the PCB photoelectric image, we combine with image preprocessing and image detection based on adaptive iterative threshold selection algorithm to carry out PCB photoelectric image information detection, and the better detection results were obtained. 2. Basic principle 2.1 Image enhancement based on removing gray redundancy and gray scale transformation Because of the main disadvantage of PCB photoelectric image acquired by CCD or microscope is that the whole image is the overall dim, and the gray level distribution of the target image pixels is mainly concentrated in the low gray level range of the histogram, it is necessary to enhance the image preprocessing. Supposing that an original PCB photoelectric image is g 0 ( x , y ) , and its output display gray scale range is [0, 255], the gray scale range of the target pixels is [A, B]. After the gray transform to get the image g ( x , y ) , the relationship between g 0(x, y)   255 g (x, y)   g0(x, y) B  A  g 0 ( x , y )

g ( x, y )

and

g 0 ( x, y)

is [13]

0  g0(x, y)  A A  g0(x, y)  B

(1)

B  g 0 ( x , y )  255

Because the gray scale transformation is further extended to the target pixels gray range, the gray level distribution of the image target pixels is mainly concentrated in the ranges of high gray level, the image

g ( x, y )

obtained by the gray scale transformation have these advantages of uniform brightness

and clear outline, but the image is still too dark, the contrast is not high. In order to overcome these disadvantages, a new enhanced image g ( x , y ) is obtained by combining the following gray scale transformation:  g ( x, y) f0 ( x, y)    g ( x , y )

where

T0

0  g ( x, y )  T0 T 0  g ( x , y )  255

(2)

is the threshold between the background and the target, its size has the characteristic of the

adaptive selection and adjustment aiming at the specific circumstances of different PCB photoelectric images, and that

 1.

It can be seen that the target is enhanced under the condition of the same background, thus the image contrast is further improved. 2.2 Image detection based on adaptive iterative threshold selection algorithm Supposing that mean, and

is the image after primary enhancement,

f0 ( x, y)

f ( x, y  f0 ( x, y )  n( x, y ) f ( x, y)

(3)

is divided into two parts

threshold segmentation method, and the image f 02 ( x , y )

is noise image with zero

is the image with noise. The relationship among them is

f ( x, y)

The image

n(x, y)

f1 ( x , y )

f0 ( x, y )

and

f2 ( x, y)

by using Canny operator

is divided into two parts

f 01 ( x , y )

and

by using the same method. Because of the randomness of the noise, the Eq. (3) becomes

 f 1 ( x , y )  f 01 ( x , y )  n ( x , y )   f 2 ( x , y )  f 02 ( x , y )  n ( x , y )

(4)

The average gray value of the two images in the Eq. (4) can be obtained as:  E { f 1 ( x , y )}  E { f 01 ( x , y )}   E { f 2 ( x , y )}  E { f 02 ( x , y )}

(5)

It can be seen that the average gray value tends to the true value. That is, the selected threshold is not affected by noise interference. Supposing that

H

f

represents the gray value of the image

T

f ( x, y)

then the Eq. (3) can be further expressed as  f1 ( x , y )  { f ( x , y ) H    f 2 ( x , y )  { f ( x , y ) H

f

 T )}

f

 T )}

(6)



The gray mean value    H f  1       H  f2  

where



H

f1



and

H

f2

of the two parts image can be calculated respectively as:

f (i, j )

f ( i , j )T



N 1 (i, j )

f ( i , j )T



(7) f (i, j )

f ( i , j )T



N 2 (i, j )

f ( i , j )T

f (i, j )

is the gray value of the image point

1 N 1 (i, j )   0

f (i, j )  T

1 N 2 (i, j )   0

f (i, j )  T

f (i, j )  T

f (i, j )  T

(8)

(9)

(i, j )

,

N 1 (i, j )

and

N 2 (i, j )

must be satisfied with

,



The average value of 

T

'



H

f1

H

f1



and

H

f2

is taken as the new gray threshold

T

'

, that is



 H

f2

(10)

2

In order to further reduce the error of image pixel segmentation, adaptive iterative algorithm is used to 

look for the optimal high threshold gray threshold

T

'

H

f1



and the optimal low threshold

H

f2

, so as to obtain the optimal

, and use it to determine whether the point of the image is edge point, thus it can reduce

the noise interference effectively and detect the edge information accurately of the image. 2.3 PCB photoelectric image edge information detection The large PCB photoelectric image was acquired by using the PCB detection experiment system that mentioned in Fig. 2 of the literature [13]. For the many factors such as imaging system performance, electronic noise and external light source during the course of acquisition, the PCB photoelectric image has the characteristic of partial dark and noisy, and it will lead to much difficulty in the feature extraction and recognition for the subsequent fault disposal process, so the preprocess process such as image enhancement, noise and ambiguity elimination must be actualized. Firstly, the median filter is chosen to filter out the noise of the PCB photoelectric image preliminarily, the homomorphic filter is chosen to remove the fuzzy degeneration phenomenon of the image. And then we adopt the algorithm by combining with removing gray redundancy method and gray scale transformation method mentioned above to enhance the PCB photoelectric image, so the final PCB photoelectric image has the characteristic of symmetrical and global brightness improvement. At lastly, the image detection based on adaptive iterative threshold selection algorithm is adopted to acquire the edge information of PCB photoelectric image. 3 Results and analysis of experiment The large PCB photoelectric image can be obtained from the PCB detection experiment system as shown in Fig. 2 in the literature [13]. The image processing is actualized by acquiring partial image from the large PCB photoelectric image, and the acquired original partial image with illegibility and noise phenomena is shown in Fig. 1 (a). The image edge information detected by Canny operator, the methods mentioned in literature [8, 9] and our method are shown in Fig. 1(b-e), respectively. The illegibility and noise PCB photoelectric image obtained by the microscope is shown in Fig. 2 (a). The results obtained by the above methods are shown in Fig. 2 (b), (c), (d), (e), respectively. The edge information detection experiments by using the two PCB photoelectric images acquired by CCD and microscope are actualized. We can see from the subjective results that the images edge is more continuous by adopting our method, and it has many characters such as evident boundary and lesser noise points, etc. compare to other methods mentioned to in the experiments.

In order to evaluate the detection results of PCB photoelectric image edge information objectively, the image edge information entropy is used as evaluation criterion, and its expression is defined as follows [9]: n

H    Pi log Pi

(11)

i0

where n is the total number of image edge points,

Pi

is the probability of the emergence of the ith pixel.

The edge information of PCB photoelectric image is detected, and the value of image edge information entropy by using Canny operator, literature [8] method, literature [9] method and our method of this paper are shown in table 1, respectively. As seen from the table 1, the result of the image information detected by using our method is better than that of other’s, the value of image information entropy is the maximum of all the methods mentioned above in the experiments. The experiment results show that it can detect better the PCB photoelectric image edge information because of the advantages of edge information detection method by combining image preprocessing with image detection based on adaptive iterative threshold selection algorithm. 4 Conclusions Aiming at the actual condition of PCB photoelectric image which have ambiguity and noise, we adopt the image information detection method by combining with image preprocessing and adaptive iterative threshold selection algorithm to detect the edge information of PCB photoelectric image, and the better information detection results are obtained. Acknowledgements We gratefully acknowledge support from the National Natural Science Foundation of China (61475045, 61262032, 61562029), the Key Scientific Research Fund of Hunan Provincial Education Department of China (13A062), the Program Research Foundation of Hunan Province Science-Technology Department of China (2011FJ3076) and the Key Laboratory of photoelectric Information Integration and Optics Manufacture Technology in Hunan Province (2011171). References [1] Shirvaikar M. Trends in automated visual inspection[J]. Journal of Real-Time Image Processing, 2006, 1(1):41-43. [2] QIAO Kai, CHEN Jian, LI Zhong-guo, ZENG Lei, YAN Bin. Automatic printed circuit board wire detecting method of cone beam CT image[J]. Optics and Precision Engineering, 2016, 24(2): 413-421. [3] FTC Moreira, MJMS Ferreira, JRT Puga, MGF Sales. Screen-printed electrode produced by printed-circuit board technology. Application to cancer biomarker detection by means of plastic antibody

as sensing material[J]. Sensors & Actuators B Chemical, 2016, 223:927-935. [4] Moganti M, Ercal F. Automatic PCB inspection Algorithms: A Survey[J]. Computer Vision and Image Understanding, 1996, 63(2): 287-313. [5] Crispin A J, Rankov V. Automated inspection of PCB components using a genetic algorithm template-matching approach[J]. International Journal of Advanced Manufacturing Technology, 2007, 35: 293-300. [6] Qiao Naosheng. Edge detection of printed circuit board defect image[J]. Acta Photonica Sinica, 2016, 45 (4): 0410001-7. [7] ZHANG Jing, YE Yu-tang, XIE Yu, CHANG Yong-xin, LIU Lin1, LIU Juan-xiu1, LUO Ying, YE Su. Method for Chrominance Correction of Photoelectric Image of Appearance Detection in Printed Circuit Board[J]. Acta Metrologica Sinica, 2015, 36(3): 238-241. [8] Xiong Bangshu, Xiong Zhenjiao, Mo Yan, Chen Gancai. Detection method of printed circuit board defect based on image[J]. Semiconductor Optoelectronics, 2012, 33(2):303-306. [9] N S Qiao, L Deng, Y B Ceng, J C Zou. Study of noisy and darker PCB photoelectricity image edge detection[J]. Journal of Optoelectronics . Laser, 2013, 24(4): 740-745. [10] W B Wang, D Y Liu, Y Q Yao. Defects Detection of Printed Circuit Board Based on the Machine Vision Method[J]. Applied Mechanics & Materials, 2014, 494-495:785-788. [11] T Blecha. Detection of printed circuit board failures based on signal frequency analyses[C]. Proceedings of the 2011 34th International Spring Seminar on Electronics Technology (ISSE), 2011: 168-171. [12] T Okubo, T Sudo, T Hosoi, H Tsuyoshi, F Kuwako. Signal transmission loss on printed circuit board in GHz frequency region[C]. 2013 IEEE Electrical Design of Advanced Packaging Systems Symposium (EDAPS), 2013:112-115. [13] Qiao Naosheng, Ye Yutang, Mo Chunhua, Huang Yonglin. Study of capturing and preprocessing of printed circuit board photoelectric image[J]. Acta Optica Sinca, 2010, 30(4): 984-988.

(a) Original PCB photoelectric image

(c) Detection result with literature [8]

(b) Detection result with Otsu operator

(d) Detection result with literature [9]

(e) Detection result with our algorithm

Fig.1 Experimental results of the PCB photoelectric image acquired by CCD

(a) Original PCB photoelectric image

(c) Detection result with literature [8]

(b) Detection result with Otsu operator

(d) Detection result with literature [9]

(e) Detection result with our operator

Fig.2 Experimental results of the PCB photoelectric image acquired by microscope

Table. 1 Value of image edge information entropy by adopting different detection methods Canny operator

Literature [8] method

Literature [9] method

(d) Our method

Fig. 1

3.7842

5.2646

5.4243

6.3516

Fig. 2

2.9326

3.5042

3.7312

4.6619