With the economic development and improvement of people’s living standards,people have posed higher demands for beer.The production date is an important criterion to make sure whether the beer can be safely drunk.The beer manufacturer should spray the recognition information such as the production date of the beer bottle onto the beer bottle cap clearly.Manufacturer causing error spraying will be punished by the relevant departments;worse,it will impair the brand image,and seriously affect customers’ health.Therefore,it is of great importance to identify and verify the sprayed information of the bottle cap before the beer leaves the factory.The process above mainly entails manual work at present,which brings high costs,reduces enterprise’s profits,has a slow verification speed and influences the production efficiency of the automated production line;workers feel tired when repeating the same process in the long run.To solve the problem,this paper proposes an automatic coding character recognition algorithm of beer bottle cap base on Optical Character Recognition(OCR)technology.The research contents mainly include:(1)This paper designs the data collection system of coding image for beer bottle cap,which is composed of UI-3080CP-M-GL high-speed industrial camera of IDS Company from Germany,PC integrated with image collection card and LED auxiliary light source and able to acquire the clear coding image of single-channel beer bottle cap.(2)As reflective round ring is generated at the edge of bottle cap in the coding image of beer bottle cap with a grey value closed to the character area,it is difficult to locate the character area using the traditional location method.This paper proposes a method to locate the character area through using U-Net semantic segmentation network.The test result proves the accurate location of U-Net semantic segmentation network.(3)As the coding image of beer bottle cap has many kinds of shadings and character deflection of small angle,this paper uses coding image pre-processing process consisting of four steps,namely,binaryzation,smoothening,rotary correction and character segmentation,to process the coding image after character location.It also proposes a character segmentation algorithm where projection method is combined with upper outline method.When there is no adhesion between characters,the projection method is used for segmentation.On the basis of the adhesion between characters,the upper outline of the character is obtained so as to use its shape for segmentation.The test shows that the algorithm can clearly and completely segment the character images with adhesion.(4)This paper proposes two improved character recognition algorithms.(a)In order to reduce the changes of covariates inside data,and improve network generalization ability,this paper adds Batch Normalization(BN)in CNN to get a layer of improved CNN.(b)In order to reduce the training time and accelerate the network convergence speed,this paper omits the extension layer of the middle-linear bottleneck in MobileNet,and generates an improved MobileNet.The test shows that the loss curve of the improved CNN has a faster convergence speed,which improves the training speed and maintains favorable recognition accuracy.That the improved MobileNet greatly reduces the number of network layers improves not only the training speed but also the recognition accuracy.The improved MobileNet is superior to the improved CNN in terms of recognition accuracy.(5)This paper determines U-Net character location process,the coding image pre-processing process consisting of four steps,namely,binaryzation,smoothening,rotary correction and character segmentation,as well as automatic recognition algorithm of beer bottle cap coding image consisting of the improved MobileNet character recognition process.The test shows that the recognition accuracy of the whole image is 98.7%,and the whole process costs 0.8 s.The automatic coding image recognition of beer bottle cap based on OCR technology proves to be high in recognition accuracy and efficiency. |