APP下载

Application of Machine Vision in Auto-registration of Machine Parts Assembly

2013-03-09SUJingbo

机床与液压 2013年24期
关键词:模式识别合格率机器

SU Jingbo

International School,Chongqing Jiaotong University,Chongqing 400074,China

Application of Machine Vision in Auto-registration of Machine Parts Assembly

SU Jingbo*

International School,Chongqing Jiaotong University,Chongqing 400074,China

Aiming at the puzzle resulted easily from the fault by human eye judgment in assembly of precise machine parts,the paper explored the application related puzzle of machine vision in the autoregistration of precision machine parts assembly.Based on the inspection of machine vision,it analyzed the pattern recognition of assembly,researched on the translation and rotation characteristics of image registration as well as edge extraction algorithm of matching location.In the paper,it took the inspection of industrial parts as an example,and the actual tested data demonstrated that the qualified rate satisfies the specified requirements fully.The practice related application shows that the method can be used for auto-registration of precise machine part inspection online.

machine part assembly,machine vision,autoregistration

Project of the Ministry of National Education(2012-LJZY06-01)

*SU Jingbo.E-mail:sujingbo@126.com

1.Introduction

The machine vision is that it uses the machine to replace human eyes to make the measurement and judgment.The machine vision system means that it makes the intake target by machine vision products,and then it is transformed into the image signal.After that,it is transmitted to special image information processing system so as to make the high precision pretreatment.Finally it adopts machine to replace human eye to make accurate measurement and judgment for intake target.Through machine vision system,it can quickly obtain lots of information,and it is easy to make the automatic processing and to actualize the process integration,therefore it has extensive application in the modern automatic production[1-2].The characteristic of machine vision is the automatic,objective,non contact,high accuracy, and the intelligent integrated test system based on machine vision can realize the quality inspection in intelligentization,full-automation,high-accuracy and celerity[3-5].It can overcomes all kinds of errors resulted in manual inspection,and therefore it greatly improves the inspection efficiency.

2.Inspection system based on machine vision

The inspection system of machine vision can be divided into two kinds of quantitative and qualitative inspection,and each kind is also divided into different sub-kinds.Machine vision is very active in industrial online inspection of various application areas,such as visual inspection of printed circuit board,automatic flaw inspection of steel surface,measurement of parallelism and perpendicularity of large scale work-piece,inspection of container volume or impurity,automatic recognition and classification of mechanical parts,and measurement of geometric size etc.Furthermore there are many difficulties to inspect using other methods in industrial field,but by using the machine vision system it can effectively a-chieve the automatic inspection of high precision,and no doubt,the machine vision largely improves the intelligent level of production automation and inspection system.The Machine vision system is widely used in all aspects of quality inspection such as the large work-piece parallelism and perpendicularity measuring instrument adopted by laser scanning and CCD detection system,it can be as the measurement baseline by stable collimated laser beam,and with the rotary shaft rotating five angle prism it can scan out a parallel or perpendicular reference plane to each other,then it can make the comparison with each surface of the measured large work-piece.When processing or assembling a large work-piece,it can use machine vision recognition system for measuring surface parallelism and verticality.The vision technology can monitor the bearing load and temperature change in real time and eliminate the risk of overload and overheat,and it can make conventional and passive measurement be as the active monitoring by means of measuring the ball surface to ensure machining quality and safety operation.In a word,there are still many homologous utility systems,and the machine vision can be widely used in industrial inspection system.

3.Pattern recognition of assembly based on machine vision

Under the non-destructive condition,the industrial computer tomography can obtain the internal information of complex work-piece,and it can display as a two-dimensional grey image of inspected section.By means of artificial evaluation for image,it can determine whether or not existence of parts and the defects of parts of their own for their internal parts of complex work-piece.But with the development of modern production technology,there is urgent need for automatic identification of defects so as to improve the efficiency of recognition and to reduce the error caused by the human factor.Aiming at the inspection of complex parts assembly defects,the automatic identification method for assembly defects is presented in this paper.The method mainly includes image registration,template matching,position judgment,and etc.Because the placed position of the scanned work-piece is inconsistent,there are the position translation and rotation angle in CT images obtained.In order to use the position information of the template image in the original image,it is needed to make the registration between the inspected image and the original image.

1)Image registration

The method of image registration is generally divided into the following types.They are the methods of image gray value such as correlation method,and the frequency domain method such as method based on FFT,The method based on image features such as edge and corner method,and the region based method etc.Fourier transform method is different from other registration methods,and it makes the best matching according to the search for the frequency domain information,and through expansion for the related phase technique it can directly find the change in parameters between images and fast implement the automatic image registration.Therefore the paper adopts the Fourier method to make the image registration.

2)Translation variation

If the imagef2(x,y)is an image after imagef1(x,y)through the translation(x0,y0),namelyf2(x,y)=f1(x-x0,y-y0),then the corresponding relation betweenF1andF2is as follow.

And the corresponding cross energy spectrum of two images in frequency domain is the following.

In which,is the complex conjugate ofF2.According to the Fourier translation theory,the phase of cross energy spectrum is equal to the phase difference between the images.Through making inverse transformation for cross energy spectrum,it can get a pulse function δ(x-x0,y-y0).This function has a sharp peak value evidently in the offset position,and the value of other location is close to zero,and hereby it can find the offset between the two images.

3)Rotation characteristics

Iff2(x,y)is the image through translation (x0,y0)and rotationθ0off1(x,y),namely

According to Fourier rotation and translation properties,after transform the relationship between two images is as follow.

Assume thatM1,M2is respectively the energyF1andF2,and it has the following relationship.

From the above expression,it can be seen that the energy is the same forF1andF2.The rotation in right angle axes is corresponding to the translational of polar coordinates angle.Therefore by polar coordinates,it can be described as the following.

And then by means of the phase correlation theory,it gets θ0.

Thus it can be seen that when it makes the registration of two rotating images,it can make two images to be transformed as the system of polar coordinates from Cartesian coordinate system,and then it can inspect the phase angle of two images by means of phase correlation method.In the polar coordinates,the horizontal coordinate is ρ,and the longitudinal coordinate isθ.ForN×NCT projection data,the size of the image and number of projection division are concordant.Therefore theθinterval can be taken as 360 number of divisions,and it not only can guarantee the high accuracy,but also can improve the calculation speed.When the image is in the rotation,it often requires making the interpolation.Commonly used interpolation methods are the nearest neighbor interpolation,bilinear interpolation and high order interpolation.Because it is fast in speed and better in effect by bilinear interpolation,this paper uses the bilinear interpolation.In order to verify the effect of the selected algorithm,here it selected three piece of CT image to make the registration experiment.Fig.1(a)is as the original CT image,and it will be as the reference image.In Fig.1(b)for image rotation,there is no translation,and Fig.1(c) for both rotation and translation image.

Fig.1 CT image

The registration results are shown in Tab.1

From Tab.1,it can be seen that it is high in registration accuracy,small in influence resulted from image gray change,and not sensitive in random noise.

Tab.1 Image registration result

4)Image matching location

Template matching is an important method in image positioning,and by means of feature level it can be divided into three methods,namely directly using the original gray value algorithm of original data,using low intermediate feature algorithm,and using the advanced feature algorithm.In this paper,it takes Hausdorff distance with low intermediate feature as the similarity measurement.

①Hausdorff distance

It is a kind of the maximum and minimum distance(max-min)defined by the two point sets.If the two finite point setsA={a1,…,ap}andB= {b1,…,bq}are given,then Hausdorff distance betweenAandBis defined as

In the above, ‖*‖is a canonical form of distance between setAand setB(such euclidean distance)

Here the expression(1)is called as bidirectional Hausdorff distance,and it is the basic form of Hausdorff distance.Theh(A,B)in expression(2) is called as a one-way distance.Hausdorff distance is often used for the template matching of two-value image,and usually it selects the image edge features as the matching basis.After the edge is respectively extracted for the measured image and template,it adopts Hausdorff distance to determine the matching position in the two two-value image.Assuming the set of pixels of the measured image(edge image)isI= {i1,i2,...,ip},and the feature set of template isM={m1,m2,…mq},then the bidirectional Hausdorff distance between the template and image is as the follow.

In which,h(M,I)is the distance from template to the image,andh(I,M)is the distance from image to the template.In a certain transform space,it can search match position from template to the image.However,in the face of unexpected noise,Hausdorff distance defined by expression(1) can produce more errors so as to make computing result too large.For this reason,the paper adopts the modified Hausdorff distance to make the template matching,and it is defined as the following.

In which,NAis the number of point in point setA.

②Edge extracting

The paper adopts Canny edge detection operator to extract the image edge,and it can obtain the edge position information at the same time and also acquire directional information of the edge pixel dot,and each edge only has a single response.Fig.2 is the image after the edge of Fig.1(a)is extracted by Canny operator.From Fig.2,it can be seen that the extracted edge is more complete using Canny edge detection operator,and the extracted edge can be provided as the subsequent matching processing.

Fig.2 Edge image inspected by CANNY

Fig.3 Image after Chamfer distance transform

③Hausdorff distance for object matching

Implementing distance transform for the edge image is to take the distance transform for two-value image substantially and obtain the distance map of corresponding original edge image size,and it is the key step of implementing template matching to adopt Hausdorff distance.The paper adopts Chamfer distance transform,and Fig.3 is the distance image after Fig.2 through Chamfer transform.The literature says the image is Voronoi surface of the original image,in which the position of smaller gray value shows where the transformed distance value is smaller.Then in the distance space,the template image in the distance map makes matching of translation.Accordinglyhj(M,I)can take as the maximum in a plurality of values of corresponding position on the current distance map which belongs to the edge pixels of the template image,and it measured the maximum mismatch of the template image among the current translation position and the corresponding pixels of the edge’s image.And then the discriminant rule of the Hausdorff distance template matching in basic form is that it takes the minimum of the abovehj(M,I)value obtained by all translation matching as the measure of similarity,in which,there may exist in the corresponding object template of this template and the image.The paper adopts the modified Hausdorff distance matching method,and it finds the average ofhi(M,I)obtained from each translation,and then it can obtain the template measure of similarity corresponding to the image to be recognized.

The minimum similarity value position is the position that the template image is most likely to occur.The position coordinates(x,y)compares with the template image coordinates in the reference image.If the difference between the transverse,longitudinal coordinate is less than a preset threshold,then there is the template image in inspected image,and the assembly is correct.Otherwise it can be considered as misassembly.

Fig.4 Template image

Fig.5 Edge image after registration

④Experimental result and its analysis

The algorithm is realized by Visual C 6,and Fig.4 is the part image needed to be located.Fig.5 is the edge image after registration,and Fig.6 is the result image after matching.It is made the matching by Hausdorff distance for the image of Tab.1,and the result is listed as in Tab.2.And at the same time,in order to verify the effectiveness of the algorithm,it is modified for Fig.1(b)and Fig.1(c),and it removed the positioning parts.The recognition results are shown in Tab.2.

From Tab.2,it can be seen that adopting the recognition algorithm proposed in the paper,it can make correct recognition whether or not to contain the key components for the image to be recognized.

Fig.6 Image after location

Tab.2 Recognition results

4.Conclusions

The above explored the method of leakage defect automatic recognition.The experiment results demonstrated that it is feasible and effective to make the assembly defect recognition of components and parts using the algorithm presented in this paper,and it has strong anti-jamming capability and the fault-tolerant ability.It can be used for online inspection,and it is a method that can be used for reference.

[1] ZHAO Weijie,GAO Yon.Application of machine vision in defects inspection of optical fiber surface[J].Modern electronics technique,2011,34(19):316-319.

[2] LI Zhongtao,LIU Jiang,SUN Guanhong,et al.Multidiameter of geometrical size and shape-position error detection by machine vision[J].Tool Technology,2008,42(2):77-80.

[3] LI Ping,ZHU Junyan,LIU Yande,et al.Application and developing trend of computer version technology in detection and classification of agricultural products[J].Jiangxi Journal of Agriculture University,2005,27(5): 296-300.

[4] ZHANG Qiang,HAO Xiangyang,LIU Songlin,et al.A rapid method of image registration for inspection based on machine vision[J].Journal of Institute of Surveying and Mapping,2005,22(1):33-35.

[5] YANG Dongtao,GONG Changlai,LUO Cong.Dimensional inspection for part using image processing techniques[J].2012,33(5):141-143.

机器视觉在机器零部件装配自动定位中的应用

宿靖波*
重庆交通大学国际学院,重庆 400074

为了解决精密机器零部件装配中人眼判断易导致失误问题,探讨了机器视觉在机器零部件装配自动定位中的应用相关问题。基于机器视觉检测,分析了装配模式识别,研究了图像配准的平移变化、旋转特性以及匹配定位中的边缘提取算法等。以工业零部件检测为例,实测数据显示合格率完全达到规定指标要求。实践相关应用表明:该方法完全可以在线用于对精密零部件装配自动定位进行检测。

零部件装配;机器视觉;自动定位

TP273

10.3969/j.issn.1001-3881.2013.24.017

2013-04-20

猜你喜欢

模式识别合格率机器
机器狗
机器狗
提高肉鸡出栏合格率的综合措施
未来机器城
浅谈模式识别在图像识别中的应用
第四届亚洲模式识别会议
提高重症医学科床头抬高合格率
我国生鲜乳连续7年三聚氰胺抽检合格率100%
去年国抽合格率首次突破90%
第3届亚洲模式识别会议