Pharmaceutical industry is a high-tech industrial group integration between multi-science advanced technologies and instruments, involving health, social stability and economic development. Ampoule injection is one of the five major injection of pharmaceutical industry in China, and it plays a significant role in clinical practice.Due to the production environment, production technology and so on, the ampoule injection may be mixed with visible foreign matter or the ampoule bottle may crack. Most of the domestic pharmaceutical enterprises to ensure the quality of products by artificial light inspection chamber, but the efficiency of artificial light inspection methods is low, the precision is not high, it is more and more difficult to meet the requirements of modern production. And the introduction of foreign ampoule injection quality visual inspection equipment is not only the price is very expensive, and the maintenance cost is not cheap, nor does it tally with the Chinese liquor detection standard. So this paper has great practical significance and application value to study on the quality of visual inspection system for ampoule injection.Relying on the National Natural Science Foundation of China and National Science and technology support program project, this paper conducted a research on the ampoule injection quality inspection system, the main work of this paper is as follows:1. It described the quality detection industrial background and the national requirements of ampoule injection, and analyzed the foreign and domestic development and research status application in the liquid machine vision detection technology.2. According to the manual testing process, the design ideas of foreign body detection equipment, This paper designed electrical control system overall structure, visual imaging system, system and defective sorting mechanism,which making up of ampoule injection quality inspection system.3. By analyzing the visible foreign matters motions in ampoule injection, this paper selected the appropriate algorithm for image filtering and image segmentation algorithm.by Robert operator edge extraction, Put forward a method for locating the axial line of the bottle body in the multi edge point fitting method,which can determine the area of the target area after the non - zero pixel area and set the threshold to identify the size of the bottle body crack.4.Through the analysis of visible ampoule injection visible foreign matter commonly used visual detection method.Based on the background modeling method and the frame difference method, a new method of visible foreign matter detection is proposed, which is based on the combination of the background modeling and the frame difference method.5. It designed the ampoule injection quality detection system software, through the cooperation of IPC and PLC, achieved sorting function of defective products and good products. The software provides a good interactive features, and can achieve high speed and accuracy requirements of automated production. |