• Tidak ada hasil yang ditemukan

A New Method for Appearance Quality Detection of Lens Module Based on Machine Vision

N/A
N/A
Protected

Academic year: 2017

Membagikan "A New Method for Appearance Quality Detection of Lens Module Based on Machine Vision"

Copied!
8
0
0

Teks penuh

(1)

DOI: 10.12928/TELKOMNIKA.v14i2A.4345 343

A New Method for Appearance Quality Detection of

Lens Module Based on Machine Vision

Zhang Jian-zhong*1, He Yong-yi 2

School of Mechatronics Engineering and Automation, Shanghai University, Shanghai 200072,China *Corresponding author, e-mail: 1zjzfirst@aliyun.com, 2heyongyi@shu.edu.cn

Abstract

The lens module is widely used in many types of equipment, such as mobile phone, image recognition product, iPad, computer camera module, security product, car rear view module, industrial endoscope and medical endoscope product. In the process of appearance quality inspection of lens module, it is a problem that the inspection accuracy depends mainly on manual workers. To save the time and amount of this quality detection labor, it’s necessary for us to design the lens module’s appearance quality automatic inspection system. This paper proposes a subpixel-accurate edge detection algorithm based on wavelet transform with the cubic spline interpolation for the lens module’s appearance quality inspection system. Firstly, calculate the wavelet modulus maximum, and detect a pixel-accurate edge. Then apply the cubic spline interpolation to obtain subpixel-accurate edge at the side of the pixel-accurate edge. Finally, an industrial measurement method using this subpixel-accurate edge detection algorithm is studied, and some experiments are conducted to demonstrate the effectiveness of the lens module’s appearance quality inspection system. Comparing with the traditional methods, the lens module’s appearance quality inspection system has a good anti-noise performance and stable inspection accuracy.

Keywords: Spline interpolation; Wavelet transform; Subpixel, edge detection

Copyright © 2016 Universitas Ahmad Dahlan. All rights reserved.

1. Introduction

The lens module consists of BARREL, LENS, filter and HOLDER part. The general structure of the lens module is composed of several plastic or glass lenses.The lens structure can be divided into 1P, 2P, 1G1P, 1G3P, 2G2P, 4G type. A typical lens module is shown in Figure 1.

(a) Lens structure (b) LENS and BARREL

Figure 1. Lens module

Quality inspection of lens module usually consists of three items: 1) Appearance of structure detection

Detection including the total lens module’s height, LENS diameter, PCB image module length and width, thickness of FPC etc. The surface besides the lens’s light hole cannot be scratched and dirty, dot area is less than or equal to 0.2mm2, the edges and corners of HOLDER can not be injured etc.

2) Function test

(2)

3) Reliability test

Including strength test (base adhesion, LENS torque), life test, environment test etc. The quality detection task of appearance and the structure is an important step of qulity detection for lens module. In this paper, machine vision is applied and the algorithm of the wavelet transform with the cubic spline interpolation for the lens module’s measurement system is studied, which consists of three parts:

1) Detection of BLOB based on morphology, 2) Detection of lens size,

3) Detection of lens height.

2. Methods

2.1. Theory of Wavelet Transform Edge Detection

In lens module’s appearance quality automatic inspection system, it’s a basic task to measure the lens module’s size, and so it’s necessary to detect the edge of a lens module’s digital image. The edge consists of the key points which gradiant value is significantly changed in gradient image [1].

We can partly obtain the whole characteristic of an image by the classical image pixel-accurate processing algorithms, such as Sobel operator, Roberts operator, Canny operator [2, 3]. The localization of Sobel operator is pixel-accurate, which is particularly suitable for a much noisy image. Roberts operator extracts an image and obtains the coarse edge, therefore the edge location is not accurate, Roberts operator is suitable for a low noisy image.The Canny operator is an effective edge detection algorithm, which is not easily interfered by the noise.Canny operator, using two different thresholds, respectively detects strong edges and weak edges. When the weak edge and the strong edge is connected, the weak edge will be included in the output edges. Therefore, Canny operator is easier to detect the real edge.

As early as 1987, Mallat applied wavelet analysis technology into image’s edge detection [4], and presented the corresponding edge detection algorithm. Studies show the wavelet transform not only has a good localization property in the time domain and the frequency domain, but also the signal singularity analysis is useful to detect the edge better.

Regarding to multi-scale factor, the wavelet analysis is a good and effective way to extract the edge of a workpiece’s image [5]. When a large scale factor is applied, we can get stable edge with higher anti-noise performance. When a small scale factor is applied, we can get more information on an edge with higher localization performance.

Firstly, smooth the image with filter function. Assume that (u,v) is a 2-D Gaussian function with , then take the mother wavelet function as following function (1).

, (1)

If and , then the wavelet transform

function , is computed as follow equation (2).

(3)

Where and are two differential functions in the horizon and vertical direction at the scale factor , which reflect the different edge property along the horizon direction and vertical direction. And so and are two sections of a gradient vector.

The module and the phase of the gradient vector are computed by equation (4).

(4)

From above, the local gradient vector’s wavelet modulus maximum in the direction indicates the corner of the smoothen image , so that the multi-scale factor edges of the image can be extracted by the local wavelet modulus maximum. In order to avoid the fake edge, a threshold T is selected, the local wavelet modulus maximum should be larger than T.

The measurement effect with wavelet modulus maximum algorithm (WMMA) is shown in Figure 2.

(a) BARREL (b) LENS

Figure 2. Measurement effect with wavelet modulus maximum algorithm

2.2. Theory of the Cubic Spline Interpolation

In recent years, a wide variety of approaches of the subpixel technology have been taken in size measurement system. There are several subpixel-accurate edge detection algorithms as follows [2, 6].

● Gemetry character: the algorithm is always used to analyze the image with regular shape (circular, triangle, square shape).

● Interpolation: the algorithm is used to analyze the image with less time and higher accuracy in localization of an edge, which includes linear interpolation, spline interpolation, bilinear interpolation, bi-cubic B-Spline surface interpolation.

● Moment estimation: the algorithm is used to analyze an image with higher accuracy in localization of an edge, but usually take longer time, such as Zernike moment.

Compared with the other two algorithms, spline interpolation is an algorithm with high accuracy and good anti-noise performance.

It’s necessary to select the right rank of the spline. If there is an image mixed with much noise, we should deal with the image by the lower rank spline. When we apply the higher rank spline interpolation, it needs longer time to calculate or probably lead to no computing result. When we apply the lower rank spline interpolation, it is easy to make the first or second derivative discontinuous at the end or start point. Therefore the cubic spline interpolation is mostly applied.

The cubic spline interpolation fits the points of the pixel-accurate edge with a cubic spline surface [7-10]. The subpixel interpolated points are also considered as a combination with the points neighborhood around them. Study shows the cubic spline interpolation algorithm

) , (

1

2 f x y

Wj ( , )

2 2 f x y Wj

j

2  

) , (

1

2f xy

Wj (, )

2 2f xy

Wj

      

 

] ) , (

) , ( [ tan ) , (

) , ( ) , ( )

, (

1 2

1 2

2 2 2 1 2

2 2

2 2

y x f W

y x f W y

x f A

y x f W y x f W y x f M

j j j

j j

j

) , (

2 f xy

Mj

) , (

2 f xy

Aj * (, )

2 xy

(4)

produces a smoother surface than linear interpolation algorithm. As an example, the cubic spline subpixel interpolation of a row of pixels is shown in Figure 3 [10-12].

Figure 3. Subpixel cubic spline interpolation of a row of pixels

The cubic spline interpolation formula is given by equation (5).

i

Where hi=xi-xi-1, xi is the horizon direction or vertical direction coordinate of

subpixel-accurate edge point. yi is the grayscale value of the pixel-accurate edge point. C0~Cn are

computed by the following matrix equation (6).

If we detect the above subpixel-accurate boundary, we can select a first point on the detected pixel-accurate edge, construct the cubic spline function with the search of neighborhood points (left and right, left and right). The function Si(x) is given by equation (7).

(5)

Where the point’s light intensity function is maximized, there is a desired subpixel-accurate edge point, and so we can obtain all the subpixel-subpixel-accurate boundary points by calculating the extremum of the function Si(x) point by point. As usual, we can obtain the

extremum by calculating that the second derivative of Si(x) with respect of

x

is zero.

From above, the pixel-accurate edge of an image is obtained at the position where the wavelet modulus is maximized. The experimental process description of cubic spline subpixel edge detection algorithm is shown in Figure 4.

Figure 4. Experimental process description of the cubic spline subpixel edge detection algorithm

3. Results

Install the experimental device and detect the appearance quality for lens module with machine vision.The experimental equipment is shown in Figure 5. The resolution of this industrial camera is 1280×1024 pixels.

Reset the storage area ,define the cycle variables

Calculate the two-dimensional wavelet coefficients Start

Select the filter function (1)(u,v),(2)(u,v),smooth the image

1 2

j

The last point?

Y

Calculate the module and phase of the gradient vector

Is it a maximum?

Eliminate the weak edge point

Edge detection

Y

End

Next point

N

Spline interpolation , obtain subpixel edge,calculate the size of a workpiece

Y

N

N

Y

Y

(6)

Figure 5. Experimental equipment

Besides the coordinates with the two subpixel-accurate measurement edges of the image, we can measure the subpixel-accurate size of the LENS. The local size measurement effect at a different wavelet scale is shown in Figure 6. Some experiments are carried out to test this method. The LENS’s size deviation with different edge detection algorithms is shown in Table 1.

(a) j=1 (b) j=2

Figure 6. Local measurement effect at a different scale

Table 1. The LENS’s size deviation with different edge detection algorithms (unit:mm)

NO. Canny Wavelet spline subpixel algorithm Wavelet modulus maximum algorithm

1 -0.01947 -0.000335 -0.00306

2 -0.02617 0.000335 0.01194

3 0.10133 0.000335 0.01454

4 -0.01947 0.000335 -0.00566

5 -0.02617 0.000335 -0.00566

6 0.09463 -0.000335 -0.00226

7 -0.02617 -0.000335 -0.00226

8 -0.02617 -0.000335 -0.00226

9 -0.02617 0.000335 -0.00306

10 -0.02617 -0.000335 -0.00226

(7)

Figure 7. The LENS’s size deviation graph with different edge detection algorithms (unit:mm)

In order to clarify the anti-noise performance of this algorithm, we do some other experiments. Firstly, the BARREL’s image is mixed with salt and pepper noise, shown in Figure 8. When the noise density is greater than 0.33, the measurement with the Sobel operator has the distinct error. But the wavelet modulus maximum and the subpixel algorithm of wavelet modulus maximum just take on a slight fluctuation. By changing the wavelet scale, we also can finish an accurate measurement with the two algorithms.Therefore, the anti-noise characteristics of wavelet modulus maximum or wavelet spline subpixel algorithm is better than that of Sobel.

(a) Sobel (b) WMMA

Figure 8. BARREL’s measurement with salt and pepper noise

From the experimental results with the wavelet spline subpixel algorithm, the LENS’s size relative accuracy is about 0.7 um, which fully meets the needs of the appearance quality detection of lens module.The accuracy of the size measurement system is significantly better than that of the pixel-accurate solution method. The LENS’s size measurement system with the wavelet spline subpixel algorithm also has a good anti-noise performance, and the effectiveness and usefulness of the proposed subpixel algorithm are confirmed.

4. Conclusions

(8)

References

[1] T Sutikno, M Facta, GRA Markadeh. Progress in Artificial Intelligence Techniques: from Brain to

Emotion. TELKOMNIKA Telecommunication Computing Electronics and Control. 2011; 9(2):

201-202.

[2] Manfred H Hueckel. A Local Visual Operator Which Recognizes Edges and Lines. Journal of the

Association for Computing Machinery. 1973; 20(4): 634-647.

[3] Sekhar A, Raghavendrarajan V, Kumar RH, et al. An Interconnected Wind Driven SEIG System

Using SVPWM Controlled TL Z-Source Inverter Strategy for Off-Shore WECS. Indonesian Journal of

Electrical Engineering and Informatics (IJEEI). 2013; 1(3): 89-98.

[4] Ali J Tabatabai, O Robert Mitchell. Edge Location to Subpixel Values in Digital Imagery. IEEE

Transactions on Pattern Analysis and Machine Intelligence. 1984; 6(2): 188-201.

[5] Kris Jensen, Dimitris Anastassiou. Subpixel Edge Localization and the Interpolation of Still Images.

IEEE Transactions on Image Processing. 1995; 4(3): 285-295.

[6] ZHANG Jianzhong, HE Yongyi, LI Jun. Research on Positioning Compensation in the Pick-and-Place System. JCIT: Journal of Convergence Information Technology. 2013; 8(10): 340-348.

[7] Singh S, Chana I. Cloud Based Development Issues: A Methodical Analysis. International Journal of

Cloud Computing and Services Science. 2013; 2(1): 73.

[8] Jinyu Hu and Zhiwei Gao. Distinction immune genes of hepatitis-induced heptatocellular carcinoma.

Bioinformatics. 2012; 28(24): 3191-3194.

[9] Cui Y, Zhang S, Chen Z, Zheng W. A New Digital Image Hiding Algorithm Based on Wavelet Packet

Transform and Singular Value Decomposition. TELKOMNIKA Indonesian Journal of Electrical

Engineering. 2014; 12(7): 5408-5413.

[10] Lv Z, Li X, Zhang B, et al. Managing Big City Information Based on WebVRGIS. IEEE Access. 2016; 4: 407-415.

[11] Yang J, Lin Y, Gao Z, et al. Quality Index for Stereoscopic Images by Separately Evaluating Adding and Subtracting. PloS one. 2015; 10(12): e0145800.

Gambar

Figure 1.
Figure 2. Measurement effect with wavelet modulus maximum algorithm
Figure 3. Subpixel cubic spline interpolation of a row of pixels
Figure 4. Experimental process description of the cubic spline subpixel edge detection algorithm
+3

Referensi

Dokumen terkait

Kemampuan sentuhan yang harus ada pada suatu teknologi, mengiringi azas keseimbangan, akan menempatkan teknologi sebagai alat bantu yang berguna bagi setiap sisi kehidupan

Wisata Domestik Taman Narmada.

Pegawai adalah eks Pegawai Negeri Sipil Departemen Perhubungan yang bekerja di Perusahaan Jawatan Kereta Api (PJKA) dan telah diberhentikan dengan hormat sebagai Pegawai Negeri

Penelitian ini berguna untuk memperoleh data dalam penyusunan skripsi sebagai salah satu syarat untuk mendapatkan gelar sarjana teknologi pangan di Program Studi Ilmu dan

Dari hasil pengujian diatas e-service quality berpengaruh langsung terhadap loyalitas pelanggan memiliki angka yang paling tinggi yaitu 0.574, dapat disimpulkan

A large number of students developed a large varity of proofs, some of which were quite unique and very interesting and in fact

Catatan : Agar membawa dokumen penawaran dan dokumen asli sesuai yang di-upload lewat aplikasi SPSE.. Demikian undangan dari kami dan atas perhatiannya disampaikan

Experiments of the in situ self-calibration supported by vertical control points and 3D coordinates of the camera position stations are conducted to evaluate the