Research on laser weld defect detection algorithm based on optimal threshold segmentation
In response to the problems of low efficiency,high missed detection rate,and high workload in traditional quality inspection methods for welding points in new energy vehicle battery materials,this paper proposes a laser welding point defect detection algorithm based on optimal threshold segmentation.By improving the maximum between-class variance method to crop the image into multiple small images for threshold segmentation,and based on the optimal threshold,the algorithm solves the challenge of accurately extracting welding points under unclear material background brightness.This algorithm improves the detection accuracy of the width,height,and area of the welding points,and also helps detect welding point position offsets.Finally,the detection of welding point shape and angle is achieved using template matching.The algorithm is implemented using Halcon vision software,and experimental results show that the proposed method effectively solves the problem of difficult extraction of welding points and has greater advantages over other methods such as local variance method and adaptive threshold method.In practical applications,the welding point detection pass rate reaches 98.55%with zero false positive rate,fully meeting the requirements of industrial production.