Electronic Science and Technology ›› 2022, Vol. 35 ›› Issue (7): 27-31.doi: 10.16180/j.cnki.issn1007-7820.2022.07.005

Previous Articles     Next Articles

Quality Inspection Algorithm of Chemical Packaging Bag Coding Based on Tesseract_OCR

ZHANG Maolin1,YE Qingzhou1,PAN Xin2,LU Hua3   

  1. 1. School of Electronic, Electrical Engineering and Physics,Fujian University of Technology,Fuzhou 350118,China
    2. School of Computer Science and Mathematics,Fujian University of Technology,Fuzhou 350118,China
    3. Fuzhou Sunlong Inkjetprint Technology Co., Ltd.,Fuzhou 350014,China
  • Received:2021-02-05 Online:2022-07-15 Published:2022-08-16
  • Supported by:
    National Natural Science Foundation of China(41971340);National Natural Science Foundation of China(41471333);Project of Fujian Provincial Department of Science and Technology(2018H001);Project of Fujian Provincial Department of Science and Technology(2019I0019)


For the problems of low efficiency and high leakage rate in manual quality inspection of information printing on chemical packaging bags, a machine vision-based quality inspection method for printing codes on chemical packaging bags is designed in this study. Mean filtering and Gaussian bilateral filtering algorithms are used to pre-process the captured image, and then the character area is localized through a variable threshold algorithm based on local statistics. To solve the problem that the distance between the dots of the printout characters may be larger than the gap size between the characters, which leads to the formation of a connected domain with multiple characters sticking together after the binary image closure operation, the study proposes a dynamic character segmentation algorithm to improve the connected domain. The segmented character images are trained and recognized by Tesseract_OCR engine for classification. The experimental results show that the algorithm has the accuracy rate of 95.62% for coding quality detection, which can meet the requirements of chemical packaging bag coding quality inspection.

Key words: machine vision, Tesseract_OCR, chemical packaging bags, coding quality inspection, preprocessing, character localization, improved concatenated domain, character segmentation

CLC Number: 

  • TP391.41