An Edge-driven Framework for Barcode Localization and Recognition Using OpenCV
https://doi.org/10.46610/IJIPSS.2026.v02i01.002
DOI:
https://doi.org/10.46610/IJIPSS.2026.v02i01.002Keywords:
Barcode, Computer vision, Edge detected, OpenCV, PyzbarAbstract
Barcodes have become a part of our lives, from scanning groceries at the supermarket to buying apparel at the mall. Barcodes are used extensively by all businesses, whether retail or production lines at a factory. Thus, it becomes necessary to scan all the barcodes efficiently with the barcode scanner. Scanning these barcodes seems like a cakewalk, but there is a lot of work behind the scenes. Barcodes may not be scanned properly if they are blurred, not well-lit or if the image of the barcode is rotated. This study has taken into account such barcodes with some environmental noise and applied traditional edge-based processing with Pyzbar. The traditional edge detection techniques that were applied on the barcode images are Canny, Sobel, Scharr and Prewitt. These techniques were applied to the Medium Barcode 1D dataset. The dataset is an open dataset. On applying the edge-based techniques, it was found that Scharr obtained the highest F1-score of 0.697 with a success rate of 76.15%. Though various machine learning and deep learning methods are present, they are computationally expensive. Thus, traditional edge-based processing must be evaluated as they consume less computing resources and memory.
References
J. Chen, N. Dai, X. Hu, and Y. Yuan, “A lightweight barcode detection algorithm based on deep learning,” Applied Sciences, vol. 14, no. 22, pp. 10417–10417, Nov. 2024.
T. Sangkharat and J. La-or, “Application of smart phone for industrial barcode scanner,” 2021 7th International Conference on Engineering, Applied Sciences and Technology (ICEAST), Pattaya, Thailand, pp. 9–12, Apr. 2021.
C. S. Kusur and M. S. Shirdhonkar, “Barcode recognition using sequential and parallel approach,” 2024 International Conference on Innovation and Novelty in Engineering and Technology (INNOVA), Vijayapura, India, pp. 1–5, Dec. 2024.
S. Sukasem, N. Maneerat, J. Thudthong, C. Wongsomboon, K. Yajima, and K. Sepsirisuk, “Manufacturing process improvement by barcode reader using image processing,” 2024 10th International Conference on Engineering, Applied Sciences, and Technology (ICEAST), Luang Prabang, Laos, pp. 49–52.
N. Odeh and C. Direkoglu, “Automated shopping system using computer vision,” Multimedia Tools and Applications, vol. 79, no. 41–42, pp. 30151–30161, Aug. 2020.
D. M. Ershova, A. V. Gayer, P. V. Bezmaternykh, and V. V. Arlazarov, “YOLO-Barcode: Towards universal real-time barcode detection on mobile devices,” Computer Optics, vol. 48, no. 4, pp. 592–600, Aug. 2024.
M. Shekaramiz, B. Pinney, S. Duncan, and M. Masoum, “Drone path planning and object detection via QR codes: A surrogate case study for wind turbine inspection,” in Proc. IEEE Int. Eng. Technol. Conf. (IETC), 2022.
F. Alsulami and N. Z. Jhanjhi, “Deep learning framework for barcode localization and decoding using simulated UAV imagery,” Scientific Reports, vol. 16, no. 1, 2025.
G. V. Lakshmi, S. Gogulamudi, B. Nagaeswari, and S. Reehana, “Blockchain-based inventory management by QR code using OpenCV,” in Proc. 2021 Int. Conf. Computer Communication and Informatics (ICCCI), Coimbatore, India, Jan. 2021.
D. Corpuz, L. Rosario, J. Cempron, P. Lozano, and J. Ilao, “QR code detection with perspective correction and decoding in real-world conditions using deep learning and enhanced image processing,” in Proc. 20th Int. Conf. Computer Vision Theory and Applications (VISAPP), pp. 685–690, Jan. 2025.
S. K. Tiwari, P. M. Girade, B. P. Khobe, A. Rambhajani, S. Wazalwar, and M. Khanapurkar, “The novel approach of QR code detection with smart glasses,” in Proc. 2022 10th Int. Conf. Emerging Trends in Engineering and Technology–Signal and Information Processing (ICETET-SIP), Apr. 2022.
C. S. Kusur, M. S. Shirdhonkar, and M. M. Bachalapur, “An efficient parallel barcode recognition system,” in Cognitive Science and Technology, pp. 243–255, 2025.
R. E. Arevalo-Ancona and M. Cedillo-Hernandez, “Zero-watermarking for medical images based on regions of interest detection using K-means clustering and discrete Fourier transform,” International Journal of Advanced Computer Science and Applications, vol. 14, no. 6, pp. 1–10, 2023.
R. Chen et al., “Rapid detection of multi-QR codes based on multistage stepwise discrimination and a compressed MobileNet,” IEEE Internet of Things Journal, vol. 10, no. 18, pp. 15966–15979, Sep. 2023.
P. Skurowski, K. Nurzyńska, M. Pawlyta, and K. A. Cyran, “Performance of QR code detectors near Nyquist limits,” Sensors, vol. 22, no. 19, pp. 7230–7230, Sep. 2022.
J. Zheng and K. Li, “The logistics barcode ID character recognition method based on AKAZE feature localization,” in Proc. 2022 IEEE 10th Joint Int. Information Technology and Artificial Intelligence Conf. (ITAIC), Chongqing, China, pp. 275–279, Jun. 2022.
K. K. Pappula and S. Anasuri, “Deep learning for industrial barcode recognition at high throughput,” International Journal of Artificial Intelligence and Data Science Machine Learning, vol. 4, no. 1, 2026.
X. Xu, Z. Xue, and Y. Zhao, “Research on an algorithm of express parcel sorting based on deeper learning and multi-information recognition,” Sensors, vol. 22, no. 17, pp. 6705–6705, Sep. 2022.
V. J., H. Y. S., R. V., and S. S., “Smart barcode scanning using X-ray technology with computer vision and machine learning,” in Proc. 2025 Int. Conf. Smart Applications and Data Analytics (ICSADL), pp. 1495–1498, Feb. 2025.
ArteLab, “Barcode Dataset,” Università degli Studi dell’Insubria, Varese, Italy, 2016.