How to find time information in a QR code?

Suppose I have a QR code, how would I look for time information (and therefore determine the version and size of the code)?

When I discover the code, I look for three dark squares, alignment information. Then I can convert the image so that the image is vertical, all the edges and modules are the same size and the correct orientation. The next step is to search for time information, so I can start to decode the code. But how do I find him? I do not know how many modules are in one line at this point, and therefore I do not know the exact location. How to define timelines?

Please note that I cannot use the library to decode image information. The idea is to recognize picture information.

+4
source share
1 answer

There are many ways to estimate the size of a module.

ZXing evaluates it based on a 1-1-3-1-1 ring finder pattern.

In fact, there is a set of synchronization patterns between crawlers, if you know their exact position. This is just a pixel question and calculating the average length of the white and black areas.

The ZXing score is a little rougher, but works very well. There are times when he gives an incorrect assessment that walking the timer pattern is likely to be eliminated. But a common use case for ZXing is a live stream of images, and one incorrect assessment is not a big problem.

+2
source

Source: https://habr.com/ru/post/1410895/


All Articles