Patent ID: 8534560
Filing Date: 2013-09-17
Classification: G06K

Abstract:
1. A two-dimensional code reader comprising: an image acquisition unit acquiring an image formed by shooting a region including a plurality of two-dimensional code regions that are configured to include a plurality of cells arranged, the cells each being colored such that the cells include cells of a plurality of kinds in different colors to code one or more pieces of information in accordance with colors given to the cells or a combination of colors, and the cells are divided by a separator given a predetermined color; a component conversion unit converting the image acquired by the image acquisition unit into an edge image indicating the distribution of edge components included in the image; a region extraction unit extracting a region formed in conformity with a predetermined rule that is a rule for determining whether a region should be a candidate region of the two-dimensional code based on a parameter of an outer shape of the two-dimensional code, from the edge image converted by the component conversion unit, as a candidate region containing the corresponding two-dimensional code region; a pattern determination unit determining, for a corresponding region that corresponds to the candidate region that is extracted by the region extraction unit in the image acquired by the image acquisition unit, whether a characteristic pattern that is a pattern for determining whether a pattern formed in the corresponding region is the two-dimensional code region is included in elements forming the corresponding region; a region detection unit being capable of detecting each of the two-dimensional code regions included in the image by detecting, as the two-dimensional code region, the corresponding region that is determined by the pattern determination unit to include the characteristic pattern; a color determination unit determining a color given to a region of each cell in each of the two-dimensional code regions detected by the region detection unit; an information identifying unit identifying the coded information on the basis of a color given to the region of each cell or a combination of colors, based on the assumption that the region of each cell in the two-dimensional code region is given the color determined for the region of the cell by the color determination unit; a separator-region specifying unit specifying the location of a region of the separator in the two-dimensional code region by performing color determination processing on respective pixels in the two-dimensional code region on the basis of the predetermined color; and a cell-region specifying unit specifying the location of a region of each cell of the two-dimensional code region on the basis of the location of the region of the separator specified by the separator-region specifying unit, and the color determination unit successively determining a color of a region of each cell in the two-dimensional code region, pixel by pixel by determining whether a color corresponds to any one of a plurality of colors used in the two-dimensional code, omitting color determination processing for remaining pixels not yet subjected to color determination processing when a particular number of determination results with a valid color, the valid color is a color corresponds to any one of the plurality of colors, has been obtained, and then determining a color given to the region of each cell on the basis of the particular number of determination results with a valid color.