| At present,the ice scoop defect automatic detection system used by ice scoop manufacturers still has the problems of not meeting the enterprise quality inspection standards and frequent missed inspections.After market research,the existing online detection system for cold drink auxiliary bars still needs to be improved in algorithm design.The existing ice scoop defect detection algorithm is relatively mature for the serious defect detection technology of the ice scoop,while the minor defect detection has the game of missed detection and false detection.At present,the algorithm is still unable to efficiently detect minor surface defects such as small burrs,shallow splits,mineral lines,pollution,chromatic aberration,and decay of ice scoops.Aiming at such problems,this paper divides ice scoop defects into two categories: contour defects and surface defects,and use corresponding algorithms to detect them.In this paper,a method based on the amplitude of concave convex line segment is proposed to extract the contour of ice scoop and contour defects,such as spending burr,breaking burr and waist splitting.The transition line segment reflecting the contour position in the gray distribution curve of each column of the ice scoop is extracted by the amplitude,and then the contour pixels of the expenditure burr and the broken burr are accurately located on the transition line segment by the gradient maximum,and the expenditure burr defect is identified by searching whether there are endpoints on the contour line.According to the distance between the broken burr contour pixel and the outer contour of the ice scoop,the broken burr is identified.The waist splitting defect locates the waist splitting pixels on the selected transition line by the gradient extreme value double threshold method,and then determines the waist splitting defect according to the marked splitting pixel coordinates and the distance between the ice scoop contour.The head splitting is characterized by large splitting and small splitting.In this paper,a method based on the amplitude of the concave-convex line segment is proposed to detect the large splitting defect of the head.The splitting lines whose value meets the threshold and whose width of concave line segment is greater than the threshold are extracted.It was discriminated by the connectivity of the split line with the head contour of the ice scoop.For the small split of the head,the small split line is extracted according to the symmetry of the relative amplitude and the absolute amplitude of the gray minimum value point of the concave line segment in the gray distribution curve,and the small split is determined by the connectivity of the head contour..The detection speed of the algorithm is fast,and the accuracy rate is improved.Aiming at surface defects,this paper firstly tries the method based on the amplitude of the concave-convex line segment.According to the characteristic that the absolute amplitude of the surface defect is larger than the normal area,the absolute amplitude feature is used to extract the surface defect.After testing,this method has a good effect on the extraction of thin strips,mineral lines and deep knot sub-defects,but it fails to meet the expected requirements for the detection of sheet-like shallow pollution and large-scale decay.Finally,a method combining a small-area defect detection algorithm based on the least squares iterative fitting and a large-area defect detection algorithm based on the gray peak horizontal straight line equation is proposed.This method is universal to the detection of various surface defects.This paper is verified by the algorithm,and the test results show that the highlight of the ice scoop defect detection algorithm proposed in this paper is that it can detect small burrs and mild surface defects,and can accurately detect such weak signal defects.It has significant advantages in detection accuracy and detection efficiency.It has certain practical application value and provides a new solution path for ice scoop defect detection. |