Patent Document ID: 10095903
Application ID: 15871188
Patent Status: 1

Claim One:
1. A block decoding method for a two-dimensional code, characterized by comprising: storing a received two-dimensional code image in an image data backup register; binarizing the received two-dimensional code image based on a gray-scale value of a pixel; searching for a boundary line of the two-dimensional code image based on a position detection pattern; searching for a version number and a correction pattern of the two-dimensional code image; segmenting the two-dimensional code image into regions based on the boundary line of the two-dimensional code image, a straight line where a boundary line of the position detection pattern is located and a straight line where a boundary line of the correction pattern is located; calculating the number of bits in each of the regions based on the position detection pattern, the correction pattern and the version number; segmenting each of the regions into bit regions each of which corresponds to one bit data, based on deformation amount of the position detection pattern and deformation amount of the correction pattern; re-acquiring the received two-dimensional code image stored in the image data backup register; calculating an average gray-scale value of all the pixels in the bit region as a gray-scale value of the bit region; calculating a gray-scale threshold of each of the bit regions based on the gray-scale value of the bit region using the Otsu method; binarizing the bit region based on the gray-scale threshold so as to obtain a binarized two-dimensional code image; and decoding the binarized two-dimensional code image.