1. Technical Field of the Invention
The present invention relates to a two-dimensional code, and in particular, to a two-dimensional code having a rectangular region delineated by a plurality of cells and formed to have specific patterns for specifying the positions of cells in the rectangular region and distinguishing the code from the background.
2. Related Art
Various types of two-dimensional codes (hereinafter also referred to as “2D code(s)”) have been supplied, in which a plurality of cells are arranged in a matrix. A typical reader (2D code reader) for reading such 2D codes is disclosed, for example, in Japanese Patent No. 2938338. The 2D code reader disclosed in this reference is configured to acquire image data that includes a type of such a 2D code, carry out an analyzing process for defining a region (code region) of the 2D code from the image data, and carry out a decoding process based on image contents of the defined code region.
As mentioned above, in reading a 2D code, a 2D code region is required to be specifically defined from the acquired image data. Therefore, a 2D code is required to have a structure that enables prompt and correct definition of the code region in carrying out reading.
As a method for defining a code region, dark cells (dark squares) may be consecutively arranged in an L-shaped specific pattern along two sides of a rectangular code region, and different specific patterns (e.g. patterns in each of which dark cells and bright cells are alternated) are arranged along the remaining two sides. Thus, enclosing all of the four sides of a rectangular region with specific patterns may facilitate distinction between a background and a code region (rectangular region), in carrying out reading. However, such a method needs a large number of cells that have to be allocated to the specific patterns which do not include data (data to be decoded, or data for correcting errors). Therefore, the number of cells that are to be allocated to data has to be reduced.
On the other hand, in the method disclosed in the above reference, bright cells (white cells) and dark cells (black cells) are alternately arranged first in a data area, and then the characteristics of the cells are changed according to a given rule. Specifically, plural types of mask patterns (matrix patterns for changing cell characteristics) are prepared in advance. Then, after arranging data, the mask patterns are superposed over the data when a 2D code is produced. After the superposition, a pattern containing less consecutive white cells and black cells is employed as an optimal arrangement pattern.
In this method as well, the bright cells (white cells) and dark cells (black cells) can be suppressed from being consecutively provided in portions next to the background to thereby make a good distinction between the background and a code region (rectangular region). However, the method disclosed in the above reference necessitates allocation of information in a code in advance, which information is indicative of the type of the mask pattern in use (mask pattern information). Accordingly, in this method as well, the number of cells allocated for data (data to be decoded, or data for correcting errors) has to be decreased.