SYSTEM FOR DECODING TWO DIMENSIONAL CODE AND METHOD THEREOF
First Claim
1. A method for decoding a two dimensional code, the method comprising:
- performing a binarization process on a two dimensional code image to obtain a binary image, the binarization process comprising;
dividing the two dimensional code image into a plurality of block regions;
obtaining grayscale values of all pixels in each block region, and obtaining a grayscale value for each block region according to the grayscale values of all the pixels;
determining, a grayscale threshold for each block region according to an average grayscale value of a predetermined area where the block region locates;
binarizing pixels in the block region to obtain a binary image, according to a grayscale threshold corresponding to each block region;
decoding the binary image to obtain information content contained in the two dimensional code.
1 Assignment
0 Petitions
Accused Products
Abstract
Method and system for decoding a two dimensional code is disclosed. In the binarization process of a two dimensional code image, through performing a dividing operation on the two dimensional code image, each block region has a different grayscale threshold. For each block region, whether a pixel in the block region is determined as black or white is not solely based on the grayscale value of the pixel itself, but also an average grayscale value of a predetermined area set for the block region where the pixel locates. When the predetermined area in which the block region locates has a larger grayscale value as a whole, the grayscale threshold corresponding to the block region may become larger, and vice versa.
16 Citations
35 Claims
-
1. A method for decoding a two dimensional code, the method comprising:
-
performing a binarization process on a two dimensional code image to obtain a binary image, the binarization process comprising; dividing the two dimensional code image into a plurality of block regions; obtaining grayscale values of all pixels in each block region, and obtaining a grayscale value for each block region according to the grayscale values of all the pixels; determining, a grayscale threshold for each block region according to an average grayscale value of a predetermined area where the block region locates; binarizing pixels in the block region to obtain a binary image, according to a grayscale threshold corresponding to each block region; decoding the binary image to obtain information content contained in the two dimensional code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A system for decoding a two dimensional code, the system comprising:
-
a binarization module for performing a binarization process on a two dimensional code image to obtain a binary image, further comprising; a dividing unit for dividing the two dimensional code image into a plurality of block regions; a grayscale value obtaining unit for obtaining grayscale values of all pixels in each block region, and obtaining a grayscale value for each block region according to the grayscale values of all the pixels; a grayscale threshold obtaining unit for determining, a grayscale threshold for each block region according to an average grayscale value of a predetermined area where the block region locates; a binary image obtaining unit for binarizing pixels in the block region to obtain a binary image, according to a grayscale threshold corresponding to each block region; a decoding module for decoding the binary image to obtain information content contained in the two dimensional code. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34)
-
-
35. A system for decoding two dimensional code, the system comprising;
-
a processor, the processor is configured to performing a binarization process on a two dimensional code image to obtain a binary image, the binarization process comprising; dividing the two dimensional code image into a plurality of block regions; obtaining grayscale values of all pixels in each block region, and obtaining a grayscale value for each block region according to the grayscale values of all the pixels; determining, a grayscale threshold for each block region according to an average grayscale value of a predetermined area where the block region locates; binarizing pixels in the block region to obtain a binary image, according to a grayscale threshold corresponding to each block region; decoding the binary image to obtain information content contained in the two dimensional code.
-
Specification