Font Size: a A A

Research On Key Techniques For Automatic Bottle Testing System

Posted on:2021-12-02Degree:MasterType:Thesis
Country:ChinaCandidate:Z Q BaiFull Text:PDF
GTID:2491306473998989Subject:Mechanical and electrical engineering
Abstract/Summary:
This article takes the medicine bottle defect detection as the project background and designs an automatic medicine bottle inspection system based on machine vision in response to the needs of enterprises for the automation and intelligence of the inspection line.The key technologies such as image enhancement,segmentation,feature extraction,classification,etc.are researched and the function of detecting the height of the liquid surface of the medicine bottle and the detection of internal foreign body defects are realized.In the software and hardware design of the automatic medicine bottle inspection system,basic workflow is set up.Considering low transparency of some medicine bottles as a difficult problem,X-rays with strong penetration are used as light source based on the analysis of the advantages and disadvantages of the existing products.Based on X-ray light source,DR image acquisition system,mechanical structure and control system are built.In terms of software design,the function of image acquisition,light source control,image processing algorithm,human-computer interaction interface and lower computer control are supposed to be satisfied.In addition,generality are supposed to be considered in this project.Function modules are completed based on MVC model and Qt is used as the main development tool.In the study of the medicine bottle X-ray image enhancement method,the problems of low contrast,uneven illumination,noise interference and difficult detection of small targets in the gradient background are considered as the main difficulties.In order to solve these problems,image filter and image enhancement are researched.In image filtering,an adaptive median filtering method is adopted to filter out the image noise.In order to enhance the structure and defects under the gradient background,the LVD method was first used to extract the structure layer.Then,a method of morphological extreme value extraction is proposed for defect layer extraction.Finally,the structure layer and the defect layer after noise suppression are used for image fusion based on morphological reconstruction.The fused image solves the above four difficulties to a certain extent,and lays the foundation for image segmentation and defect detection.Based on the enhanced images,research is done on the medicine bottle defect segmentation to realize the liquid level line detection and the defect regions segmentation.First,a segmentation method based on OTSU and connected domain analysis are used to segment a single bottle image from the original image.Secondly,for the detection of the liquid level line in the medicine bottle,gamma enhancement and region segmentation are used to realize the liquid level line detection.Again,using the improved boundary tracking algorithm to extract the boundary line of the liquid level line area.Finally,based on the morphology-related methods,the defect regions of the foreign body in the medicine bottle are segmented.Because the noise in the image is strong,and the defect area obtained by segmentation contains much noise,it is difficult to directly determine the quality of the medicine bottle through the segmentation result,so defect detection is required after the defect is segmented.Defects detecting in medicine bottles is also researched to judge the quality of medicine bottles according to the area of defects.First of all,based on the geometric,grayscale and texture feature descriptors,23 features of the defect area were extracted and a sample library was established.Secondly,an oversampling method is adopted to manually generate sample points,which solves the problem of class imbalance of samples and increases the number of sample points.With PCA dimensionality reduction,eight features with a cumulative contribution rate greater than 95% were extracted as input to subsequent classifiers.Finally,the integrated algorithm based on decision tree is used as the classifier to effectively detect the defects of the medicine bottle.The automatic medicine bottle inspection system is designed and manufactured.An experimental of software and hardware is also conducted.In the experiment,image acquisition,light source control,human-computer interaction,and lower computer control functions were operating normally.The image enhancement and defect segmentation algorithms were tested with existing sample pictures to verify the effectiveness of the algorithm.The defect detection algorithm is tested in the existing medicine bottle sample library after 5-fold cross-validation.At last,the detection accuracy of the test set reached 98%,which verified the effectiveness of the detection method designed in this paper.
Keywords/Search Tags:Digital Radiography, Image Inhancement, Image Segmentation, Defect Detection
Related items