| Strain gauges are elements used to measure deformation due to an applied force or load,which are widely used in manufacturing of sensors,testing and diagnosis of materials.It is essential to perform defect detection on strain gauges because of their bumps,dents and pinholes occurred in production process.Currently,the detection is mainly done through manual optical devices,which is of three disadvantages:(1)Low production efficiency and high error rate;(2)High labor intensity and physical harm to workers;(3)Difficulties in implementing informationization.Therefore,defect detection automation of strain gauges is imperative.This thesis focuses on specific types of strain gauges produced by a company and a surface defect detection algorithm is designed based on image processing of strain gauges,including 3 parts:image segmentation,image registration,and surface defect detection.The specific work and research results are as follows.In order to solve the problem of inadequate segmentation performance for low brightness images of strain gauges based on OTSU method,a brightness-based threshold-weighted OTSU(TW-OTSU)is proposed.A weighting coefficient of segmentation threshold based on the average gray level of images is led in,and a mapping relationship between the weighting coefficient of segmentation threshold and the average gray level is created.It is taken as the final segmentation threshold that the segmentation threshold calculated by the OTSU method weighted with the gray level value,which is corresponding to the peak in the foreground of the image gray level distribution.The experiments show that the TW-OTSU method not only improves the segmentation effect on low brightness images,but also has obvious advantages in the overall performances of accuracy and running time.Each region of strain gauge images has different image features and corresponding defect types and standards.In order to improve the efficiency of defect detection,each strain gauge image is divided into three regions:wire,end of wire and solder pad.And corresponding templates for each region are designed for position registration.Then a similarity measure based on the proportion of the foreground pixels of strain gauge images is proposed,which solves the problem that existing similarity measure standards cannot accurately judge whether the position of a strain gauge image is qualified.To achieve efficient registration of strain gauge images,experiments are designed to extract feature points for normal and defective strain gauge images.The ORB(Oriented FAST and rotated BRIEF),SIFT(Scale-invariant feature transform)and SURF(Speeded up robust features)algorithms are analyzed and compared in terms of the optimal number of feature points.Finally,the SURF algorithm is chosen for image registration of strain gauges,and through numerous experiments,the optimal number of feature points and the Hessian matrix response threshold for the SURF algorithm are determined.Based on the segmentation and registration of strain gauge images,a non-reference method for detecting surface defects in different regions of strain gauge images is proposed.A defect detection algorithm based on image thinning algorithm is designed,which detects the connected and broken wires in the wire region by endpoint backtracking,and detects all defects in the end of wire region by node analysis.An algorithm based on morphology is designed to detect bumps,dents,pinholes and black spot in the wire region.Then,an algorithm based on convexity defects is designed to effectively detect pinholes,bumps,and dents on the solder pad region.The experimental results show that the missed rate and the false detection rate for various defects are less than 5%,and the detection efficiency is about 3-6 times higher than manual detection,which demonstrates the potential engineering value of the proposed algorithms. |