Font Size: a A A

Research On Capsule Surface Defect Detection Technology Based On Machine Vision

Posted on:2021-03-07Degree:MasterType:Thesis
Country:ChinaCandidate:Z WangFull Text:PDF
GTID:2438330623484421Subject:Mechanical engineering
Abstract/Summary:PDF Full Text Request
With the rapid development of manufacturing industry,the production of medical capsules is gradually increasing.In the automatic production line of capsule,due to the small size,large number of capsules and soft shell,manufacturing defects such as shell surface sag,crack,shell fragmentation and so on often occur during the installation of capsule shell.Among them,shell surface sag is the most common,and defect detection after the production line of capsule is particularly important.Nowadays,relying on manual random batch capsules for defect detection is not enough to meet the market production demand.The on-line appearance defect detection method of capsules is the fundamental to improve the quality of capsules.Improving the accuracy and robustness of the surface defect detection algorithm is a hot topic in industry and academia.Based on the characteristics of complex positions and diverse backgrounds during online production of capsules,this paper conducted research on the detection algorithm for surface defects of capsules in complex backgrounds.The main research work is as follows:(1)Aiming at the defect of capsule appearance,a visual detection test platform was built.Collect and make the capsule defect data set,including the capsule atlas of defect capsule,normal capsule and the capsule atlas of the simultaneous existence of defect capsule and normal capsule in the field of vision of the same camera.The capsule defect information was labeled according to PASCAL VOC data set format.(2)To solve the problem of complex background caused by dust and uneven illumination in capsule production line,a complex background weakening method based on image filtering was proposed.After the average filtering of the original capsule image,the double filtering method of gaussian filtering was used to weaken the background of the capsule image to a certain extent while retaining the main features of the capsule.Ensure the accuracy of follow-up capsule defect localization.(3)On the basis of background weakening,image gradient operator,threshold segmentation and other methods were used to extract the contour of the capsule.An adaptive threshold segmentation method is proposed.An adaptive threshold segmentation method is proposed.The capsule body is usually kept in the center of the visual field of the image.The average grayscale value of the template image is calculated after the template image of specific size is collected in the background of the four corners of the image,which is taken as the threshold value of the current image.This improves the stability of threshold segmentation.(4)Combining image processing with YOLOv3 algorithm to improve the YOLOv3 algorithm model,a more accurate YOLO-OL algorithm was proposed.Firstly,the k-means clustering method was used to perform clustering calculation on the capsule defect data set,and 9 anchors for the capsule defect size were obtained,which improved the IOU(Intersection over Union)value of the model and stabilized the downward trend of Loss during model training.Through image processing technology,the complex background of the capsule image is weakened.After the capsule contour is extracted,the feature map is marked and input into YOLO-OL for defect positioning and classification,which improves the accuracy of defect recognition of the model.(5)Based on Python-Tkinter library,a capsule surface defect detection system was developed,and the online detection and location of capsule surface defects were realized.The system can satisfy the functions of single image detection,continuous detection,video detection,log saving and expandable updating,etc.,which provides convenience for algorithm combination and improvement.
Keywords/Search Tags:Image filtering, threshold segmentation, image gradient, contour extraction, YOLOv3
PDF Full Text Request
Related items