Distance Transform and Template Matching Based Methods for Localization of Barcodes and QR Codes

Melinda Katona1, Péter Bodnár1 and László G. Nyúl1

  1. Department of Image Processing and Computer Graphics, University of Szeged
    Árpád tér 2., H-6720 Szeged, Hungary
    {mkatona, bodnaar, nyul}@inf.u-szeged.hu

Abstract

Visual codes play an important role in automatic identification, which became an inseparable part of industrial processes. Thanks to the revolution of smartphones and telecommunication, it also becomes more and more popular in everyday life, containing embedded web addresses or other small informative texts. While barcode reading is straightforward in images having optimal parameters (focus, illumination, code orientation, and position), localization of code regions is still challenging in many scenarios. Every setup has its own characteristics, therefore many approaches are justifiable. Industrial applications are likely to have more fixed parameters like illumination, camera type and code size, and processing speed and accuracy are the most important requirements. In everyday use, like with smartphone cameras, a wide variety of code types, sizes, noise levels and blurring can be observed, but the processing speed is often not crucial, and the image acquisition process can be repeated in order for successful detection. In this paper, we address this problem with two novel methods for localization of 1D barcodes based on template matching and distance transformation, and a third method for QR codes. Our proposed approaches can simultaneously localize several different types of codes. We compare the effectiveness of the proposed methods with several approaches from the literature using public databases and a large set of synthetic images as a benchmark. The evaluation shows that the proposed methods are efficient, having 84.3 % Jaccard accuracy, superior to other approaches. One of the presented approaches is an improvement on our previous work. Our template matching based method is computationally more complex, however, it can be adapted to specific code types producing high accuracy. The other method uses distance transformation, which is fast and gives rough regions of interests that can contain valid visual code candidates.

Key words

barcode localization, QR code localization, feature extraction, distance transform, template matching

Digital Object Identifier (DOI)

https://doi.org/10.2298/CSIS181011020K

Publication information

Volume 17, Issue 1 (January 2020)
Year of Publication: 2020
ISSN: 2406-1018 (Online)
Publisher: ComSIS Consortium

Full text

DownloadAvailable in PDF
Portable Document Format

How to cite

Katona, M., Bodnár, P., Nyúl, L. G.: Distance Transform and Template Matching Based Methods for Localization of Barcodes and QR Codes. Computer Science and Information Systems, Vol. 17, No. 1, 161-180. (2020), https://doi.org/10.2298/CSIS181011020K