Skip to main content
Log in

A Universal Algorithm for Discretizing Bichromatic Two-Dimensional Graphic Codes

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1.
Fig. 2.
Fig. 3.
Fig.4.
Fig. 5.
Fig. 6.

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

REFERENCES

  1. Trubitsyn, A.A., Shadrin, M.V, and Serezhin, A.A., “Localization of image fragments with high frequency intensity oscillation,” J. Autonomous Intell., 2023, vol. 6, no. 2, pp. 1–16.

    Article  Google Scholar 

  2. Trubitsyn, A.A. and Shadrin, M.V, “Detection, localization and transformation of two-dimensional graphics code,” 33rd Int. Conf. on Computer Graphics and Computer Vision, GraphiCon 2023, 2023, Trapeznikov Institute of Control Problems, Russian Academy of Sciences, Moscow, Russia, pp. 509–516.

  3. Karrach, L. and Pivarciova, E., “Options to use data matrix codes in production engineering,” Manag. Syst. Production Eng., 2018, vol. 26, no. 4, pp. 231–236.

    Article  Google Scholar 

  4. Yamaguchi et al., “Code type determining method and code boundary detecting method,” US Patent 2005/O121520 A1, 2005.

  5. Szentandrási, I., Herout, A., and Dubská, M., “Fast detection and recognition of QR codes in high-resolution images, Proc. of the 28th Spring Conference on Computer Graphics, SCCG '12, 2013, pp. 129–136.

  6. Lin, J.A. and Fuh, C.S., “2D barcode image decoding,” Math. Probl. Eng., 2013, p. 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. and Rafael, R., Digital Image Processing, New York: Pearson, 2018.

    Google Scholar 

  9. Abramowitz, M. and Stegun, I.A., Handbook of Mathematical Functions, New York: Dover, 1965.

    Google Scholar 

  10. Otsu, N., “A. threshold selection method from gray-level histograms,” IEEE Trans. Sys. Man. Cyber. 1979, vol. 9, no. 1, pp. 62–66.

    Article  Google Scholar 

  11. Koleda, P. and Hrčková, M., “Global and local thresholding techniques for sawdust analysis,” Acta Facultatis Technicae. 2018, vol. XXIII, no. 1, pp. 33–42.

    Google Scholar 

  12. Trubitsyn, A. and Grachev, E., “Switching median filter for suppressing multi-pixel impulse noise,”. Comput. Optics, 2021, vol. 45, no. 4, pp 580–588.

    Article  Google Scholar 

Download references

Funding

This work was supported by ongoing institutional funding. No additional grants to carry out or direct this particular research were obtained.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to A. A. Trubitsyn or M. V. Shadrin.

Ethics declarations

The authors declare that they have no conflicts of interest.

Additional information

Translated by A. Klimontovich

Publisher’s Note.

Pleiades Publishing remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Trubitsyn, A.A., Shadrin, M.V. & Kholkin, S.I. A Universal Algorithm for Discretizing Bichromatic Two-Dimensional Graphic Codes. Program Comput Soft 50, 366–375 (2024). https://doi.org/10.1134/S0361768824700178

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S0361768824700178

Keywords:

Navigation