Digital image processing in the creation of an intelligent system prototype for text detection and recognition in the labeling process of electrical cable
Abstract
Cable labeling allows identifying different configurations and batches of cables, as well as their characteristics. In the cable labeling process, different types of errors or defects can occur in the printed text, such as the absence of the label, ink bleeding, text parts missing, illegible text, and ink drops. In this paper, a prototype of a system for text validation in electrical cables using image processing techniques is presented. The proposed system consists of two stages. In the first stage, a method based on K-means clustering was proposed, allowing preprocessing images to condition them. In the second stage, optical character recognition using the Tesseract OCR engine is performed, allowing the text in the images to be converted into character strings. The experimentation was carried out using a collection of 909 images of electrical cables containing eight different types of cables, where the images are individually labeled with the ground truth. The evaluation obtained an average error rate of 6.54%, 3.97%, and 2.53% when validating the text using three, five, and seven label sequences, respectively.
Downloads
References
SAMPSISTEMI, “Cable Extrusion,” [Online]. Available: https://www.sampsistemi.com/cable-extrusion/ [accessed Oct. 20, 2020].
“Wire and cable marking machines.” [Online]. Available: https://www.schleuniger.com/en-us/products/peripherals/marking-/-printing-/-labeling/ [accessed Oct. 20, 2020].
“Coding & Marking Printers | Gem Gravure.” [Online]. Available: https://www.gemgravure.com/coding-marking-printers/ [accessed Oct. 20, 2020].
“Impresoras para tubos y cables | Videojet México.” [Online]. Available: https://www.videojet.mx/mx/homepage/industry-solutions/wire-cablepipe.html [accessed Oct. 20, 2020].
A. K. Bhunia, G. Kumar, P. P. Roy, R. Balasubramanian, and U. Pal, “Text recognition in scene image and video frame using Color Channel selection,” Multimed. Tools Appl., vol. 77, no. 7, pp. 8551–8578, Apr. 2018, doi: 10.1007/s11042-017-4750-6
S. M. Lucas, A. Panaretos, L. Sosa, A. Tang, S. Wong, and R. Young, “ICDAR 2003 robust reading competitions,” in Seventh International Conference on Document Analysis and Recognition, 2003. Proceedings., Aug. 2003, pp. 682–687, doi: 10.1109/ICDAR.2003.1227749.
N. V. Rao et al., “Optical character recognition technique algorithms,” vol. 16, no. 2, pp. 275-282, 2016.
L. von Ahn, M. Blum, N. J. Hopper, and J. Langford, “CAPTCHA: Using Hard AI Problems for Security,” in Advances in Cryptology — EUROCRYPT, pp. 294–311, 2003.
J. B. Pedersen, K. Nasrollahi, and T. B. Moeslund, “Quality inspection of printed texts,” in 2016 International Conference on Systems, Signals and Image Processing (IWSSIP), Bratislava, Slovakia, May 2016, pp. 1–4, doi: 10.1109/IWSSIP.2016.7502718.
F. De Sousa Ribeiro et al., “An End-to-End Deep Neural Architecture for Optical Character Verification and Recognition in Retail Food Packaging,” in 2018 25th IEEE International Conference on Image Processing (ICIP), Athens, Oct. 2018, pp. 2376–2380, doi: 10.1109/ICIP.2018.8451555.
E. Shelhamer, J. Long, and T. Darrell, “Fully Convolutional Networks for Semantic Segmentation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 39, no. 4, pp. 640–651, Apr. 2017, doi: 10.1109/TPAMI.2016.2572683.
D. Chen, J.-M. Odobez, and H. Bourlard, “Text detection and recognition in images and video frames,” Pattern Recognit., vol. 37, no. 3, pp. 595–608, Mar. 2004, doi: 10.1016/j.patcog.2003.06.001.
K. Messer, J. Kittler, and W. Christmas, “Automatic Sports Classification,” in Pattern Recognition, International Conference on, Los Alamitos, CA, USA, Aug. 2002, vol. 2, pp.1005-1008, doi: 10.1109/ICPR.2002.1048475.
J. C. Rodríguez-Rodríguez, A. Quesada-Arencibia, R. Moreno-Díaz, and C. R. García, “A Character Segmentation Proposal for High-Speed Visual Monitoring of Expiration Codes on Beverage Cans,” Sensors, vol. 16, no. 4, Apr. 2016, doi: 10.3390/s16040527
W. Q. Khan and R. Q. Khan, “Urdu optical character recognition technique using point feature matching; a generic approach,” in 2015 International Conference on Information and Communication Technologies (ICICT), Dec. 2015, pp. 1–7, doi: 10.1109/ICICT.2015.7469576.
M. A. H. Monil, M. S. Q. Z. Nine, B. Poon, M. A. Amini, and H. Yan, “Bangla text processing and recognition based on Fuzzy unsupervised Feature Extraction and SVM,” in 2013 International Conference on Machine Learning and Cybernetics, Jul. 2013, vol. 03, pp. 1272–1278, doi: 10.1109/ICMLC.2013.6890784.
T. Hassan and H. A. Khan, “Handwritten Bangla numeral recognition using Local Binary Pattern,” in 2015 International Conference on Electrical Engineering and Information Communication Technology (ICEEICT), May 2015, pp. 1–4, doi: 10.1109/ICEEICT.2015.7307371.
N. Das, R. Sarkar, S. Basu, M. Kundu, M. Nasipuri, and D. K. Basu, “A Genetic Algorithm Based Region Sampling for Selection of Local Features in Handwritten Digit Recognition Application,” Appl Soft Comput, vol. 12, no. 5, pp. 1592–1606, May 2012, doi: 10.1016/j.asoc.2011.11.030
S. Pasha and M. C. Padma, “Handwritten Kannada character recognition using wavelet transform and structural features,” in 2015 International Conference on Emerging Research in Electronics, Computer Science and Technology (ICERECT), Dec. 2015, pp. 346–351, doi: 10.1109/ERECT.2015.7499039.
C. Liyanage, T. Nadungodage, and R. Weerasinghe, “Developing a commercial grade Tamil OCR for recognizing font and size independent text,” in 2015 Fifteenth International Conference on Advances in ICT for Emerging Regions (ICTer), Aug. 2015, pp. 130–134, doi: 10.1109/ICTER.2015.7377678
A. Singh and S. Desai, “Optical character recognition using template matching and back propagation algorithm,” in 2016 International Conference on Inventive Computation Technologies (ICICT), Aug. 2016, vol. 3, pp. 1–6, doi: 10.1109/INVENTIVE.2016.7830161
GitHub, “tesseract-ocr/tesseract,” [Online]. Available: https://github.com/tesseract-ocr/tesseract [accessed Oct. 20, 2020].
G. Van Rossum and F. L. Drake, Python 3 Reference Manual. Scotts Valley, CA: CreateSpace, 2009.
G. Bradski, “The OpenCV Library,” Dr Dobbs J. Softw. Tools, 2000
“OpenCV: Color conversions,” [Online]. Available: https://bit.ly/3CmqHqi [accessed Oct. 20, 2020].
S. Raschka and V. Mirjalili, Python machine learning: machine learning and deep learning with Python, scikit-learn, and TensorFlow, Second edition, Fourth release, [fully revised and Updated]. Birmingham Mumbai: Packt Publishing, 04
A. Kaehler and G. R. Bradski, Learning OpenCV 3: computer vision in C++ with the OpenCV library, First edition, Second release. Sebastopol, CA: O’Reilly Media, 2017.
“Improving the quality of the output,” tessdoc. https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html (accessed Oct. 20, 2020).
N. Otsu, “A Threshold Selection Method from Gray-Level Histograms,” IEEE Trans. Syst. Man Cybern., vol. 9, no. 1, pp. 62–66, Jan. 1979, doi: 10.1109/TSMC.1979.4310076
This article is published by LAJC under a Creative Commons Attribution-Non-Commercial-Share-Alike 4.0 International License. This means that non-exclusive copyright is transferred to the National Polytechnic School. The Author (s) give their consent to the Editorial Committee to publish the article in the issue that best suits the interests of this Journal. Find out more in our Copyright Notice.
Disclaimer
LAJC in no event shall be liable for any direct, indirect, incidental, punitive, or consequential copyright infringement claims related to articles that have been submitted for evaluation, or published in any issue of this journal. Find out more in our Disclaimer Notice.