| As one of the indispensable key components of electrical equipment,electronic connectors play a role in transmitting signals and connecting circuits in electrical equipment and they are widely used in various manufacturing fields such as automobiles,communications,smart homes,and military aerospace.As the outer cover of the electronic connector,the plastic case plays a mechanical protection role for the electronic connector,and it is the basis for the performance of the electronic connector.The quality of the plastic case not only affects the appearance of the plastic case itself,but also plays a key role in the conduction and assembly of subsequent circuits.At present,the detection efficiency and accuracy of manual quality inspection methods are low,which cannot meet the requirements of high efficiency and real-time quality inspection for mass production of plastic cases.This article takes the plastic case of electronic connector(hereinafter referred to as plastic case)as the research object and carries out research on the method of measuring and defect detection of plastic case based on machine vision technology,which has important engineering application value.The quality inspection process of the plastic case is analyzed,designing a quality inspection process based on machine vision and the corresponding system architecture and forming a visual inspection scheme suitable for plastic case size measurement and defect detection.According to the appearance characteristics and size measurement requirements of the plastic case,a plastic case image acquisition system is constructed,and the hardware conditions of the camera,light source,lens and other hardware conditions in the image acquisition system are compared and matched,and a set of image acquisition suitable for plastic case is formed.The corresponding vision inspection system platform is built.On this basis,the principle of Zhang Zhengyou calibration method is analyzed,and a standard glass calibration plate is used to conduct calibration experiments.Through calibration experiments,internal and external parameters are obtained,and the mapping relationship between pixels and actual physical dimensions is calculated.The principle of image edge positioning technology is analyzed,introducing gray moment sub-pixel edge positioning algorithm for edge detection,researching on line feature detection technology and proposing a line detection algorithm that combines Hough transform and least squares method,which solves the long fitting time of Hough transform.The linear fitting accuracy of the least square method is not high and it is easy to be distorted.Through the analysis of the simulation results of different methods,it is verified that the method proposed in this paper can detect the contour of the plastic shell more effectively.using the extracted contour features and calibration coefficients,the method of calculating the average distance from the point to the straight line obtains the size and matches the size of the groove.A method for detecting plugging defects of plastic shell connectors based on convolutional neural network is proposed with constructing a convolutional neural network model,establishing a sample library and analyzing the impact of different network parameter settings on the performance of the network model,etc.The optimal parameters are determined and the optimized network model is obtained.Taking the plugging defect of the plastic shell connector as the research object,the experimental research is carried out,and the accuracy of the defect detection can reach 100%by using the optimized network model.The experimental results show that the convolutional neural network can effectively and accurately detect the plugging defects of the plastic shell connector. |