| The method of clinical drug treatment is inseparable from intravenous infusion,and the preparation of drugs takes up a lot of work.In order to reduce the workload of medical personnel,automatic dispensing robots have played a huge role and have been gradually introduced to major hospitals.However,in the actual operation of the automatic dispensing robot,it is found that the effect of drug label recognition has a greater impact on the accuracy of drug sorting.Since each drug has its own unique label with the Chinese medicine standard,this article uses the Chinese medicine standard label as the only basis for drug identification.In order to improve the accuracy of target drug label identification,this paper uses machine vision technology to study the key technologies of the drug sorting system,which improves the accuracy of drug identification and sorting.According to the actual needs and functions of the sorting system,the overall scheme of the sorting system is designed.The system is divided into a hardware part and a software part.There are five key steps in the software part,which are the preprocessing of the medicine image,the edge segmentation of the medicine image,the extraction of the region of interest of the medicine image,the positioning and segmentation of the Chinese medicine standard label,and the identification of the medicine label.First,use gray-scale processing,Gaussian filter denoising,gray-scale enhancement algorithm to achieve image enhancement.Then,the Canny operator is used to detect the edge of the glass medicine bottle that the gray difference value of the edge is not obvious,and it is improved.Aiming at the shortcomings of the traditional two-dimensional maximum entropy algorithm of low segmentation accuracy and accuracy,it is proposed to use the whale algorithm to improve it to improve the segmentation accuracy and accuracy.Aiming at the characteristic of binary image "non-zero or one",the positioning algorithm of mathematical morphology combined with line scanning is used to locate the Chinese medicine standard characters and segment them.Analyze the commonly used character segmentation algorithms,and design an improved projection segmentation algorithm to segment a single character of the Sinopharm quasi-character based on the characteristics of the Sinopharm quasi-character.Finally,research on the recognition technology of drug labels.In order to improve the recognition rate and recognition accuracy,based on the traditional Le Net-5 convolutional neural network,an optimized version of the Le Net-5 network is proposed to optimize its network structure and parameters,and use Adam to optimize Instead,use the Re LU excitation function to improve the accuracy of Sinopharm’s quasi-character label recognition.After improvement,the recognition rate of the numeric characters and letters of the Sinopharm quasi-character label can reach 98.7%.Through a large amount of image data collected in the actual environment of the pharmaceutical factory,the single character of the Sinopharm quasi-character label is normalized to construct a character data set.Use Python 3.7.4 development environment to carry out simulation experiments.In order to facilitate the operation of the staff,the system software platform was designed to verify whether the abovementioned algorithm can accurately identify the national drug label of the drug.Carry out the selection and design of the hardware part of the sorting unit,and complete the design of the process of grabbing medicines.A sorting experiment was carried out on the built sorting system in a pharmaceutical factory,and 400 bottles of medicines were selected for sorting test.Through experiments,the accuracy of drug sorting is about 97.8%. |