| Oral liquid is a traditional Chinese medicine product in China.With the improvement of economy and health,the demand for oral liquid has increased year by year.In recent years,due to a series of food and drug safety problems,the quality and safety issues of oral liquid products have attracted widespread attention.Traditional oral liquid product quality inspection mainly relies on artificial vision detection.Because of the disadvantages of slow speed and low efficiency,the way of artificial vision detection is difficult to meet the detection requirements of oral liquid products on high-speed production lines.The machine vision-based oral liquid quality detection system can effectively overcome the drawbacks of manual detection,with the advantages of rapid detection,high precision and stable performance,which can increase production efficiency and reduce costs.In this paper,the detection of appearance defects in the oral liquid product quality inspection was studied.A defect detection system for appearance was designed and designed to meet the detection requirements.The main research contents of this paper are as follows:1.The research background and significance of the subject were introduced,and the requirements for the appearance quality of the oral liquid vial were analyzed.Introduces machine vision technology and its specific applications in the industry.Summarized the research status of oral liquid vial quality testing at home and abroad.2.The design of the defect detection platform for the appearance of the oral liquid vial is based on the requirements of the oral liquid vial detection.The detailed introduction is made from three aspects:mechanical structure,imaging scheme and electrical control.The oral liquid vial is analyzed during transmission,omnidirectional photographing and analysis.The principle of picking,and according to the characteristics of the detection area designed a corresponding imaging program,including industrial cameras,lenses,light sources and imaging methods.3.The detection algorithm for the appearance defect of the oral liquid vial was studied,including the vial cap and the vial body detection area.For vial cap detection area,the vial cap typical defects were introduced first,then the cap image noise reduction and enhancement principle was analyzed,and a horizontal intercept projection method was proposed to extract the vial cap defect characteristics,and finally the defect judgment was given.In the vial defect detection algorithm,a rapid template convolution method is proposed to locate the bottle image.Then the edge detection method is used to extract the suspected defect area in the vial image based on the vial defect feature.Finally,the connected domain analysis method is applied to the suspected defect,and the judgment of vial body detects were made.4.The software for the appearance defect detection system of oral liquid vial was developed.Firstly,the overall structure of the detection system was designed according to the software requirements.Then the software implementation process was introduced in terms of software interface,framework and database management.Finally,a solution based on rotation coding was proposed for the positioning of oral liquid vial in the detection system. |