| In today’s society,the pharmaceutical industry is constantly developing,people have put forward higher requirements for the quality of medicines,including internal quality,packaging quality.Whether the quantity can reach the standard is related to the benefits of consumers,pharmaceutical factories as the origin of medicines,the upgrading of automation,intelligence and digitization are very important.As the mainstream product of medicines,the quantity detection of medicine plates before sealing is mostly based on manual work or traditional automatic detection technology.The thesis proposes and designs an intelligent counting system of medicine plates based on machine vision,which improves the efficiency of medicine plates counting and reduce the production cost.The main research contents are as follows:(1)According to the shape of medicine particle is round,the thesis proposes an algorithm for counting based on the characteristics of medicine particles.A noise removal algorithm based on pixel screening is designed to obtain the edges of pills and remove noise.The counting of medicine boards is realized by the algorithm of contour searching and area screening.The algorithm runs fast and has high accuracy in counting large and clear images.(2)Because the longitudinal edge feature of the medicine plate is strip,a counting algorithm for the feature is proposed.High frequency information extraction and threshold segmentation are combined to obtain the longitudinal edges of medicine boards.In order to remove the noise and breakpoints of the edges,an algorithm combining morphological processing and Sobel longitudinal edge extraction is proposed.A subregional multi-objective contour statistical algorithm is proposed to realize counting of medicine plates,which has certain applicability and can satisfy the needs of real-time and fast production line.(3)According to the actual production environment of the pharmaceutical factory and a lot of algorithms researched,the thesis designs a medicine plate counting system,including selection and construction of hardware,design and implementation of interface,counting algorithm selection.The system has the functions of parameter setting,medicine plates counting and result comparison,which ensures the accuracy and efficiency of medicine plates counting,and is easy to be applied to the production line of pharmaceutical factory. |