With the continuous improvement of industrial production speed,the efficiency of product quality inspection is required to be higher and higher In order to realize the development needs of demanualization of the manufacturing industry,various online inspection equipment and online inspection methods have emerged.Among them,machine vision inspection methods have gradually developed into one of the main methods for online inspection of workpieces due to their low cost,fast speed,non-contact and other advantages.The main research content of this paper is the visual measurement of disc workpiece size and the visual recognition of workpiece label.In order to improve measurement accuracy,the moment method is used to complete the sub-pixel precision measurement.T hrough the study of character positioning,segmentation and recognition methods,the visual recognition of circularly distributed workpiece labels is realized.The detection system helps to improve the detection efficiency of disc type workpieces and reduce labor costs.The main research contents of this paper are as follows:1.Based on the principle of small hole imaging,the conversion relationship from pixel coordinate system to world coordinate system is derived,and an ideal camera imaging model is established.According to Zhang Zhengyou’s camera calibration method,the camera’s internal parameters matrix,external parameters matrix and distortion coefficients are calculated,and the image distortion correction is completed.Correction of image distortion.Based on the standard block,the pixel equivalent calibration is realized,and the actual physical size represented by the unit pixel is calculated,which is used for the conversion from the pixel size to the actual size.2.Based on the machine vision image preprocessing method,combined with the structural parameters of the synchronization ring of the automobile gearbox,bilateral filtering is used to perform edge preservation and noise reduction processing on the workpiece image.Using the Canny edge detection method,the pixel-level workpiece contour extraction is completed.Based on the ideal sub-pixel edge model,combined with the 7×7 Zernike moment template,the improved sub-pixel edge detection algorithm is used to realize the precise positioning of the edge of the disc workpiece and improve the measurement accuracy of the system.Based on the computational geometry method,a visual measurement algorithm for multiple parameters of the synchronization ring is designed,and 6 types of geometric structure dimensions such as the diameter of the addendum circle of the synchronization ring,the diameter of the root circle,the large aperture,the small aperture,the width and angle of the inner j aw,etc.have been completed.Sub-pixel precision measurement.3.Based on the gray eigenvalue method,combined with the distribution characteristics of the synchronous ring workpiece label,a ring-distributed workpiece label region positioning algorithm is realized.Based on the result of the polar coordinate inverse transformation of the workpiece ROI,using the horizontal and vertical projection method,the single character range is determined,and the single character segmentation of the workpiece label is realized.Based on the ResNet50,a prediction model for artifact label characters is constructed.Aiming at the problem that too few training samples are not enough to train the prediction model,a set of scene-like character sample generation algorithm is proposed.The generated samples and minute quantity of actual samples are added to the prediction model training,and a network model with higher prediction accuracy is obtained,and the accuracy of the detection system OCR(Optical Character Recognition)is increased to more than 95%.Finally,based on the task objectives of vision measurement and part label OCR,the hardware platform of the disc type part vision inspection system is designed.Based on Qt,MySQL,OpenCV and TensorFlow,the development of the disc-type workpiece visual inspection system software was completed using C++language.The system mainly integrates four parts:size measurement,label recognition,information management,and human-computer interaction interface.Dimension measurement completes the sub-pixel precision measurement of various parameters of the synchronization ring.Label recognition completes the positioning,segmentation and recognition of workpiece labels.Information management realizes the detection information statistics of standard parts management,batch workpieces,and data visualization display,which is convenient for product quality traceability. |