Metal parts are widely present in various places where we live.There are many shapes and styles of metal parts.In the actual use process,due to friction and lack of timely maintenance and other factors,the surface of the metal sheet will inevitably appear a variety of wear,mostly manifested as depression,scratch and size loss.With the appearance of defects,the service life of metal parts will be reduced,and even they will not be able to be used normally.With the increasing degree of automation in modern industry,the demand for a single type of defect in metal parts can no longer be met.This article will classify the defects of the parts and effectively detect all three types of defects proposed.Based on this,the main research content of this paper is as follows:(1)Design and build a set of imaging system equipment.The device is used to acquire images.Since the metal parts are long strips,it is impossible for the camera to image at one time,so the image stitching scheme is designed,the selected hinges are taken three times,the image filtering operation is performed first,and an algorithm to improve the median filtering is proposed,which effectively improves the filtering speed.Then,the SIFT algorithm is used to match the images,and the accurate image matching matrix is obtained,The results show that the image stitching algorithm has a significant effect.(2)Classification of defects in metal parts.This article will be divided into the following three categories,namely edge depression,size and scratch defects.For the edge depression class,the defect feature map can be obtained after comparing the binary image of the standard part and the part to be inspected: for the scratch class,the front background segmentation algorithm is used to extract,and an improved iterative threshold segmentation algorithm is proposed,which effectively improves the processing effect: for the defects of the depression class and the scratch class.An improved subpixel fitting method for defect data measurement is proposed,and the improved Canny operator and quadric curve fitting method are combined to effectively improve the measurement accuracy compared with traditional manual measurement.(3)For size defects,the image template matching is studied in Chapter 4.The realtime matching of the status map and the template image was studied.Due to the polygons and circles in the part,the least squares method and the Haris corner point detection method were used for measurement,respectively.Compared with manual inspection,the detection accuracy is also improved... |