A universal algorithm for discretizing bichromatic two-dimensional graphic codes

Cover Page

Cite item

Full Text

Open Access Open Access
Restricted Access Access granted
Restricted Access Subscription Access

Abstract

Mathematical foundations and algorithms for recognizing bichromatic two-dimensional graphic codes, regardless of their type (QR codes, DataMatrix, GridMatrix, etc.) are presented. The stages of achieving the result include detecting the code, localizing it within an arbitrary quadrilateral, transforming the quadrilateral to a canonical square, constructing a grid of elements (modules) of the square code, and filling it with a sequence of bits. It is shown that perspective transformation formulas make it possible to transform localized quadrangular regions to canonical squares with an acceptable error level for further processing. A flat grid of square code elements is formed based on the search for extrema of the derivatives of the pixel intensity distribution of the square image along the axes x and y. The algorithm for filling grid cells (code modules) with a sequence of zeros and ones uses information about the average intensity of each such cell. At the end of the paper, the algorithms are tested on a variety of real images of two-dimensional codes, and the limitations of the proposed algorithms are examined.

Full Text

Restricted Access

About the authors

A. A. Trubitsyn

Ryazan State Radio Engineering University named after V.F. Utkina; Kvantron Group LLC

Author for correspondence.
Email: assur@bk.ru
Russian Federation, 59/1 st. Gagarina, Ryazan, 390005; 28a st. Engelsa, room. H2, Ryazan, 390010

M. V. Shadrin

Kvantron Group LLC

Email: m.shadrin@kvantron.com
Russian Federation, 28a st. Engelsa, room. H2, Ryazan, 390010

S. I. Holkin

LLC “Operator-CRPT”

Email: assur@bk.ru
Russian Federation, 15 Rochdelskaya st., building 16A, premises I, Moscow, 123376

References

  1. Trubitsyn A.A., Shadrin M.V., Serezhin A.A. Localization of image fragments with high frequency intensity oscillation. Journal of Autonomous Intelligence. 2023. V. 6. № 2. P. 1–16.
  2. Trubitsyn A.A., Shadrin M.V. Obnaruzheniye, lokalizatsiya i transformatsiya dvumernogo graficheskogo koda (Detection, localization and transformation of two-dimensional graphics code). GraphiCon 2023: 33rd International Conference on Computer Graphics and Computer Vision, September 19–21, 2023, Institute of Control Problems. V.A. Trapeznikov Russian Academy of Sciences, Moscow, Russia. 2023. P. 509–516.
  3. Karrach L., Pivarciova E. Options to use data matrix codes in production engineering. Management Systems in Production Engineering. 2018. V. 26. № 4. P. 231–236.
  4. Yamaguchi et al. Code type determining method and code boundary detecting method. US Patent 2005/O121520 A1. 09.06.2005.
  5. Szentandrási I., Herout A., Dubská M. Fast detection and recognition of QR codes in high-resolution images. SCCG '12: Proceedings of the 28th Spring Conference on Computer Graphics March. 2013. P. 129–136.
  6. Lin J.A., Fuh C.S. 2D barcode image decoding. Mathematical Problems in Engineering. 2013. 2013: 848276.
  7. Heckbert P.S. Fundamentals of texture mapping and image warping [M.S. thesis]. Department of Electrical Engineering, University of California, Berkeley, Calif, USA. 1989.
  8. Gonzalez R, Rafael R. Digital image processing. NY: Pearson. 2018. 1168 p.
  9. Abramowitz M., Stegun I.A. Handbook of Mathematical Functions: With Formulas, Graphs, and Mathematical Tables. NY: Dover Publications Inc. 1965. 1046 p.
  10. Otsu N.A. Threshold Selection Method from Gray-Level Histograms. IEEE Trans. Sys. Man. Cyber. 1979. V. 9. № 1. P. 62–66.
  11. Koleda P, Hrčková M. Global and Local Thresholding Techniques for Sawdust Analysis. Acta Facultatis Technicae. 2018. Vol XXIII. No 1. P. 33–42.
  12. Trubitsyn A., Grachev E. Switching median filter for suppressing multi-pixel impulse noise. Computer Optics. 2021. V. 45. № 4. P. 580–588.

Supplementary files

Supplementary Files
Action
1. JATS XML
2. Fig. 1. Transformation of a quadrilateral (1ʹ2ʹ3ʹʹ) into a square (1234): (a) diagram of the inverse transformation, (b) diagram of pixel intensity calculation.

Download (103KB)
3. Fig. 2. Transformation of a QR code (a), previously localized by a quadrangle (1234) on the upper face of a cube according to the formulas: (b) – (2), (c) – (3).

Download (247KB)
4. Fig. 3. Transformation and discretization of DataMatrix: (a) – original localized code for processing, (b) – result of transformation of quadrangle (1234) into canonical square, (c) – average modulus of derivative with respect to y of intensity of square code and piecewise linear background, (d) – average modulus of derivative after subtracting piecewise linear background, (d) – overlay of grid with n × n = 24 × 24 cells, (e) – code with binary modules.

Download (312KB)
5. Fig. 4. Processing of two-dimensional codes: (a) – Aztec, (b) – GridMatrix. Top row 1 – original images, middle row 2 – result of detection, localization, transformation into a canonical square and discretization into modules of two-dimensional code, bottom row 3 – result of binarization of code modules (two-dimensional sequence of 0 and 1).

Download (334KB)
6. Fig. 5. Results of a full cycle of low-quality DataMatrix recognition: (a) – original image of the code on a tin can, (b) – code after detection and localization, transformation and discretization, (c) – binarized canonically oriented code.

Download (163KB)
7. Fig. 6. Effect of QR code defocusing: (a) – ideal code and intensity profile of the selected line (σ = 0.49), (b) – defocused code and intensity profile of the selected line (σ = 0.20).

Download (185KB)

Copyright (c) 2024 Russian Academy of Sciences

Согласие на обработку персональных данных с помощью сервиса «Яндекс.Метрика»

1. Я (далее – «Пользователь» или «Субъект персональных данных»), осуществляя использование сайта https://journals.rcsi.science/ (далее – «Сайт»), подтверждая свою полную дееспособность даю согласие на обработку персональных данных с использованием средств автоматизации Оператору - федеральному государственному бюджетному учреждению «Российский центр научной информации» (РЦНИ), далее – «Оператор», расположенному по адресу: 119991, г. Москва, Ленинский просп., д.32А, со следующими условиями.

2. Категории обрабатываемых данных: файлы «cookies» (куки-файлы). Файлы «cookie» – это небольшой текстовый файл, который веб-сервер может хранить в браузере Пользователя. Данные файлы веб-сервер загружает на устройство Пользователя при посещении им Сайта. При каждом следующем посещении Пользователем Сайта «cookie» файлы отправляются на Сайт Оператора. Данные файлы позволяют Сайту распознавать устройство Пользователя. Содержимое такого файла может как относиться, так и не относиться к персональным данным, в зависимости от того, содержит ли такой файл персональные данные или содержит обезличенные технические данные.

3. Цель обработки персональных данных: анализ пользовательской активности с помощью сервиса «Яндекс.Метрика».

4. Категории субъектов персональных данных: все Пользователи Сайта, которые дали согласие на обработку файлов «cookie».

5. Способы обработки: сбор, запись, систематизация, накопление, хранение, уточнение (обновление, изменение), извлечение, использование, передача (доступ, предоставление), блокирование, удаление, уничтожение персональных данных.

6. Срок обработки и хранения: до получения от Субъекта персональных данных требования о прекращении обработки/отзыва согласия.

7. Способ отзыва: заявление об отзыве в письменном виде путём его направления на адрес электронной почты Оператора: info@rcsi.science или путем письменного обращения по юридическому адресу: 119991, г. Москва, Ленинский просп., д.32А

8. Субъект персональных данных вправе запретить своему оборудованию прием этих данных или ограничить прием этих данных. При отказе от получения таких данных или при ограничении приема данных некоторые функции Сайта могут работать некорректно. Субъект персональных данных обязуется сам настроить свое оборудование таким способом, чтобы оно обеспечивало адекватный его желаниям режим работы и уровень защиты данных файлов «cookie», Оператор не предоставляет технологических и правовых консультаций на темы подобного характера.

9. Порядок уничтожения персональных данных при достижении цели их обработки или при наступлении иных законных оснований определяется Оператором в соответствии с законодательством Российской Федерации.

10. Я согласен/согласна квалифицировать в качестве своей простой электронной подписи под настоящим Согласием и под Политикой обработки персональных данных выполнение мною следующего действия на сайте: https://journals.rcsi.science/ нажатие мною на интерфейсе с текстом: «Сайт использует сервис «Яндекс.Метрика» (который использует файлы «cookie») на элемент с текстом «Принять и продолжить».