| With the increasing production of glass,manual inspection has been unable to meet the needs of social production.Machine vision technology has the advantages of high stability,reliability,intuitiveness and non-contact detection,which makes it widely used in online detection system.At present,domestic glass defect detection equipment mainly depends on imports.Domestic research work is not mature enough,and the technology is not comprehensive enough.In-depth research and system development are required.In this paper,a multi-channel glass defect on-line detection system is researched.With a reasonable light module,glass defects such as bubbles,stains,scratches and glass reams can be detected at the same time,and fast positioning and accurate classification of defects are achieved.It has good application value.In order to improve the efficiency of defect detection,a multi-channel detect system is constructed.Three independent lighting methods are designed to maximize the highlighting of bubbles,stain defects and scratches defects in channel one and glass reams defects in channel two,which effectively reduces the false error rate;A multi-channel image acquisition module is designed to obtain multiple defect images of the same area in one scan,which reduces the omissions in defect detection to a certain extent.The research of glass defect image preprocessing algorithm was carried out.The algorithm of filtering noise reduction,edge detection and threshold segmentation suitable for each defect is compared,and the defect target is preliminarily separated.The top hat operation is used to solve the problem of uneven lighting caused by the lighting defect of the scratch defect.Aiming at the defect of glass reams,the standard template glass image is extracted,using difference operation to get its general shape.Considering the defect discontinuity caused by this operation,the morphological close operation is used to close the slits and make the defects of glass reinforcement complete.Through experimental analysis and comparison,it is proved that the preprocessing algorithm designed in this paper is fast,effective and convenient for subsequent feature extraction.In this paper,a contour extraction algorithm is designed.The algorithm includes the contour searching algorithm and the contour filtering algorithm,which respectively solves the double contour problem of the bubble defect that cannot be removed in the preprocessing and the environmental interference that cannot be eliminated by the filtering.According to the characteristics of glass defects,the geometric parameters with strong correlation are selected,and the bubble and stain defects are identified and classified by threshold.Combining different channels and the gray value of the whole picture,a classifier is designed.The algorithm of defect location and marking is designed,which can realize fast and accurate defect location,and use different color rectangle frame to make the classification result more intuitive.Finally,the experimental platform is built to verify the algorithm and system design,and the upper computer software is designed to realize the human-computer interaction.The experimental results show that the accuracy of the algorithm is 0.1mm,and the matching speed of the algorithm depends on actual situation of production line. |