| O-type rubber sealing ring(O-ring)is a kind of basic industrial original,China is the country with the largest annual output of O-ring in the world,with many production enterprises.However,many small and medium-sized enterprises still adopt manual methods such as visual observation,touching the surface and using measuring tools when testing the quality of new O-ring,which is not only inefficient,but also increases a lot of labor costs,and easy to cause false inspection.Although there are already automatic testing equipment,but the price and requirements for the operating environment are very high,the users are mostly large leading enterprises.In order to overcome the disadvantages of manual inspection and improve the comprehensive efficiency of O-ring production line,this paper studies the automatic quality inspection method of O-ring with inner diameter less than or equal to 80 mm and line diameter between 3mm and 10 mm.The paper focuses on two detection sections: O-ring size measurement and surface defect recognition.The main research results are as follows:(1)An O-ring size measurement method based on Bresenham algorithm is proposed.Firstly,the region of interest(ROI)of the O-ring image is extracted,then the geometric center of ROI is taken as the starting point,and fitting lines are generated along various specific directions by using multiple groups of Bresenham algorithm.The inner circle and outer circle of the O-ring are searched in the 360 degree range of omnidirectional,and the final measurement value is obtained by averaging multiple groups of measurement results.The method runs fast,and the difference between the measured size and the real size is less than 0.1mm,which can meet the actual needs of the production line in terms of running speed and detection accuracy.Based on the intermediate results of the size measurement method,this paper also proposes a detection method of defect “sticked rubber” using threshold judgment,with an accuracy of 100%.(2)A new method for surface defect recognition of O-ring is proposed.This paper constructs a machine learning model based on image features,which is used to classify the O-ring image to distinguish whether there are defects and the specific types of defects.This paper selects SIFT feature extraction algorithm and Bag-of-Word(Bo W)model to process ROI of six different types of O-ring images,all SIFT features of each image are made into a Bow vector as a unified description of it.In this paper,we improve the clustering algorithm and the method of Bo W vector coding in the construction of Bo W model,and use support vector machine(SVM)with kernel methods to train these Bo W vectors.The paper tests the influence of the number of visual words K,specific type of SVM kernel function and penalty factor C on the recognition effect of this model,finally the optimal parameters are determined,a 98.3% accuracy of defect recognition is achieved,while the real-time performance is also ensured.Finally,this paper integrates all above research results,and develops an online Oring quality inspection software.This software runs on PC and connects with industrial cameras,which is developed by Python,industrial camera SDK and framework Qt.The system runs smoothly with high robustness achieves the preset functional and performance requirements,effectively improves the accuracy and speed of O-ring quality inspection at a lower cost.The paper provides a solution which can not only improve the efficiency,but also reduce the time and labor cost for the quality inspection of small and medium-sized O-ring manufactors. |